[C++-sig] Boost.Python and python 3.x?
Hi, I'm trying to build Boost.Python to use Python 3.1, however I'm getting a bunch of errors (missing functions/members, etc.). I was able to get Boost.Python to compile correctly when using Python 2.6 so I don't think the problem is in my setup. I did a search and as far as I can tell there's no support for python 3.x being built at Boost 1.41, however I haven't found anything for Boost 1.45. There were references to a GSoC project to fix this, did this ever get finished? If so, is there something different between the Python 3.x and Python 2.x jam files that would cause this (other than referencing the correct includes & libs)? Here's my jam file for python 3.1 (C:\Python31 contains the source download of Python 3.1.2, built for Windows x64 release platforms): using msvc ; import os ; using python : 3.1 : # sources C:\\Python31 : # requirements C:\\Python31\\Include C:\\Python31\\PC C:\\Python31\\PCBuild\\amd64 ; And I'm compile with this command: bjam link=static threading=multi address-model=64 variant=release toolset=msvc-9.0 -a --with-python ___ Cplusplus-sig mailing list [email protected] http://mail.python.org/mailman/listinfo/cplusplus-sig
[C++-sig] Boost.Python and python 3.x?
Hi, I'm trying to build Boost.Python to use Python 3.1, however I'm getting a bunch of errors (missing functions/members, etc.). I was able to get Boost.Python to compile correctly when using Python 2.6 so I don't think the problem is in my setup. I did a search and as far as I can tell there's no support for python 3.x being built at Boost 1.41, however I haven't found anything for Boost 1.45. There were references to a GSoC project to fix this, did this ever get finished? If so, is there something different between the Python 3.x and Python 2.x jam files that would cause this (other than referencing the correct includes & libs)? Here's my jam file for python 3.1 (C:\Python31 contains the source download of Python 3.1.2, built for Windows x64 release platforms): using msvc ; import os ; using python : 3.1 : # sources C:\\Python31 : # requirements C:\\Python31\\Include C:\\Python31\\PC C:\\Python31\\ PCBuild\\amd64 ; And I'm compile with this command: bjam link=static threading=multi address-model=64 variant=release toolset=msvc-9.0 -a --with-python ___ Cplusplus-sig mailing list [email protected] http://mail.python.org/mailman/listinfo/cplusplus-sig
Re: [C++-sig] Boost.Python and python 3.x?
Hi Andrew, Yes, the GSoC project was finished. I checked in a few Python3 related fixes after the 1.45 release that may be important for you, in particular the one below, which you could easily apply manually to your installation. Ralf Index: boost/python/converter/builtin_converters.hpp === --- boost/python/converter/builtin_converters.hpp (revision 67431) +++ boost/python/converter/builtin_converters.hpp (revision 67432) @@ -122,7 +122,7 @@ BOOST_PYTHON_TO_INT(int) BOOST_PYTHON_TO_INT(long) -# if defined(_MSC_VER) && defined(_WIN64) +# if defined(_MSC_VER) && defined(_WIN64) && PY_VERSION_HEX < 0x0300 /* Under 64-bit Windows std::size_t is "unsigned long long". To avoid getting a Python long for each std::size_t the value is checked before the conversion. A std::size_t is converted to a simple Python int > >From: Andrew Ho >To: boost.python mailing list >Sent: Thu, December 30, 2010 12:04:12 AM >Subject: [C++-sig] Boost.Python and python 3.x? > >Hi, I'm trying to build Boost.Python to use Python 3.1, however I'm getting a >bunch of errors (missing functions/members, etc.). >I was able to get Boost.Python to compile correctly when using Python 2.6 so I >don't think the problem is in my setup. >I did a search and as far as I can tell there's no support for python 3.x >being >built at Boost 1.41, however I haven't found anything for Boost 1.45. There >were >references to a GSoC project to fix this, did this ever get finished? If so, >is >there something different between the Python 3.x and Python 2.x jam files that >would cause this (other than referencing the correct includes & libs)? > >Here's my jam file for python 3.1 (C:\Python31 contains the source download of >Python 3.1.2, built for Windows x64 release platforms): > >using msvc ; >import os ; >using python : 3.1 > : # sources >C:\\Python31 >: # requirements >C:\\Python31\\Include >C:\\Python31\\PC >C:\\Python31\\PCBuild\\amd64 >; > >And I'm compile with this command: >bjam link=static threading=multi address-model=64 variant=release >toolset=msvc-9.0 -a --with-python >___ Cplusplus-sig mailing list [email protected] http://mail.python.org/mailman/listinfo/cplusplus-sig
