Skip to content

Commit d6554d6

Browse files
jakirkhamstefanseefeld
authored andcommitted
Handle BOOST_LIB_NAME for NumPy on Python 2/3
This was reusing the Python 2 name on Python 3, which is incorrect since the Python 3 library for Boost.NumPy has a `3` in it. Hence this checks against the Python version and defines this correctly.
1 parent 9082971 commit d6554d6

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

include/boost/python/numpy/config.hpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,11 @@
6262
// Set the name of our library, this will get undef'ed by auto_link.hpp
6363
// once it's done with it:
6464
//
65-
#define BOOST_LIB_NAME boost_numpy
65+
#if PY_MAJOR_VERSION == 2
66+
# define BOOST_LIB_NAME boost_numpy
67+
#elif PY_MAJOR_VERSION == 3
68+
# define BOOST_LIB_NAME boost_numpy3
69+
#endif
6670
//
6771
// If we're importing code from a dll, then tell auto_link.hpp about it:
6872
//

0 commit comments

Comments
 (0)