From 90829714cc606ecffabb2a151091f10f81e28259 Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Sat, 10 Jun 2017 18:22:57 -0400 Subject: [PATCH] Fix `BOOST_LIB_NAME` for Python 3 This was reusing the Python 2 name on Python 3, which is incorrect since the Python 3 library for Boost.Python now has a `3` in it. Hence this checks against the Python version and defines this correctly. --- include/boost/python/detail/config.hpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/include/boost/python/detail/config.hpp b/include/boost/python/detail/config.hpp index c92ecb32..3e4b7c9e 100644 --- a/include/boost/python/detail/config.hpp +++ b/include/boost/python/detail/config.hpp @@ -105,7 +105,11 @@ // Set the name of our library, this will get undef'ed by auto_link.hpp // once it's done with it: // -#define BOOST_LIB_NAME boost_python +#if PY_MAJOR_VERSION == 2 +# define BOOST_LIB_NAME boost_python +#elif PY_MAJOR_VERSION == 3 +# define BOOST_LIB_NAME boost_python3 +#endif // // If we're importing code from a dll, then tell auto_link.hpp about it: //