Skip to content

Commit

Permalink
Add patch for problem with python module suffixes.
Browse files Browse the repository at this point in the history
ndarray now uses on pybind11's cmake tools to build its Python
test module, and those don't seem to get the suffix right in
pybind11 2.1.x.

This patch can be removed once we've upgraded to pybind11 2.2.x.
  • Loading branch information
TallJimbo committed Feb 12, 2018
1 parent 664c45d commit b87255d
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions patches/050-pymodule-suffix.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
diff -ru ndarray-1.4.0.orig/tests/CMakeLists.txt ndarray-1.4.0/tests/CMakeLists.txt
--- ndarray-1.4.0.orig/tests/CMakeLists.txt 2018-02-12 14:41:13.000000000 -0500
+++ ndarray-1.4.0/tests/CMakeLists.txt 2018-02-12 16:41:39.023079756 -0500
@@ -88,6 +88,12 @@

include_directories(${PYBIND11_INCLUDE_DIR})

+ # Either pybind11 2.1.x doesn't set the module extension appropriately,
+ # or ndarray is inadvertently squashing it. In any case, the problem
+ # goes away with pybind11 2.2.x, and in the meantime this fixes it.
+ # It probably wouldn't work on Windows, but we don't care about that.
+ set(PYTHON_MODULE_EXTENSION ".so")
+
pybind11_add_module(pybind11_test_mod pybind11_test_mod.cc)

configure_file(pybind11_test.py pybind11_test.py COPYONLY)

0 comments on commit b87255d

Please sign in to comment.