
******************************************************************** *** The Boost release has been waiting on this; I would *really* *** *** appreciate it if people would take a little time to test it. *** ******************************************************************** I've just checked into the RC_1_34_0 branch most of the support for building and testing Python extensions and Boost.Python in BBv2. It took me over a week, and it's almost completely revamped. In case you're wondering, yes, it was necessary. Support for Windows, Darwin, and Cygwin was essentially nonexistent or broken. If it was working for you on any of these platforms, you were probably getting "lucky." I would appreciate it if those who can test this would invoke bjam with --debug-configuration, and look at the output to make sure the python configuration stuff looks sensible. Here's the new comment on python.init: # Initializes the Python toolset. Note that all parameters are # optional. # # - version -- the version of Python to use. Should be in Major.Minor # format, for example 2.3. Do not include the subminor version. # # - cmd-or-prefix: Preferably, a command that invokes a Python # interpreter. Alternatively, the installation prefix for Python # libraries and includes. If empty, will be guessed from the # version, the platform's installation patterns, and the python # executables that can be found in PATH. # # - includes: the include path to Python headers. If empty, will be # guessed. # # - libraries: the path to Python library binaries. If empty, will be # guessed. On MacOS/Darwin, you can also pass the path of the # Python framework. # # - condition: if specified, should be a set of properties that are # matched against the build configuration when Boost.Build selects a # Python configuration to use. # # Example usage: # # using python : 2.3 ; # using python : 2.3 : /usr/local/bin/python ; # You can set up your user-config.jam so a bjam built under Windows will can build/test both windows and cygwin python extensions. Just pass <target-os>cygwin in the "condition" parameter to "using python..." for the cygwin python installation. using python ; # windows installation using python : : /usr/bin/python2.5 : : : <target-os>cygwin ; when you put target-os=cygwin in your build request, it should build with the cygwin version of python: bjam target-os=cygwin toolset=gcc This is supposed to work the other way, too (targeting windows python with a cygwin bjam) but it seems as though the code in the compiler toolsets for building that way is broken (i.e., it's not a python-specific problem). What's still broken =================== 1. When targeting Cygwin, PYTHONPATH setup information is not properly passed from Python extension targets to test targets, because the information is getting attached to an import library (one we don't even need to generate) instead of the shared library. This affects one test (builtin_converters) in the Boost.Python test suite. We're waiting on Vladimir Prus to fix that one. I hope he'll be able to do that in the next few days. 2. There's no support for debug-python builds (the ones that require the trailing "_d" in the executable and extension module names -- see http://boost.org/libs/python/doc/building.html#variants). I think I can implement that tomorrow. If you got this far in the message, thank you *very* much for your attention :) -- Dave Abrahams Boost Consulting www.boost-consulting.com

David Abrahams wrote:
# Example usage: # # using python : 2.3 ; # using python : 2.3 : /usr/local/bin/python ; #
Hmm, not sure yet what this means for regression testing on cygwin/mingw.
You can set up your user-config.jam so a bjam built under Windows will can build/test both windows and cygwin python extensions. Just pass <target-os>cygwin in the "condition" parameter to "using python..." for the cygwin python installation.
using python ; # windows installation using python : : /usr/bin/python2.5 : : : <target-os>cygwin ;
when you put target-os=cygwin in your build request, it should build with the cygwin version of python:
bjam target-os=cygwin toolset=gcc
Does this mean, that invoking bjam with toolset=gcc from CMD.EXE (where gcc is the cygwin or more correctly: cygming version) will now build against the MSVC.DLL's by default? (I.e. pass on the -mno-cygwin switch to the compile and link stages). Hmm, this would mean I should run my regression setup unaltered...? http://engineering.meta-comm.com/boost-regression/CVS-RC_1_34_0/speedsnail-g... Roland

on Thu Mar 15 2007, Roland Schwarz <roland.schwarz-AT-chello.at> wrote:
David Abrahams wrote:
# Example usage: # # using python : 2.3 ; # using python : 2.3 : /usr/local/bin/python ; #
Hmm, not sure yet what this means for regression testing on cygwin/mingw.
You can set up your user-config.jam so a bjam built under Windows will can build/test both windows and cygwin python extensions. Just pass <target-os>cygwin in the "condition" parameter to "using python..." for the cygwin python installation.
using python ; # windows installation using python : : /usr/bin/python2.5 : : : <target-os>cygwin ;
when you put target-os=cygwin in your build request, it should build with the cygwin version of python:
bjam target-os=cygwin toolset=gcc
Does this mean, that invoking bjam with toolset=gcc from CMD.EXE (where gcc is the cygwin or more correctly: cygming version) will now build against the MSVC.DLL's by default? (I.e. pass on the -mno-cygwin switch to the compile and link stages).
No. IIUC if you want that, you still need to pass the flavor=mingw option. In my opinion that should be automatically tied to target-os, but that feature is outside my direct responsibility and not strictly required for the release.
Hmm, this would mean I should run my regression setup unaltered...?
http://engineering.meta-comm.com/boost-regression/CVS-RC_1_34_0/speedsnail-g...
That setup will not generate successful tests of Boost.Python with the cygwin flavor of GCC, since you haven't got a "using python" with <target-os>cygwin in the condition. Naturally, that would have to refer to a cygwin build of Python, not the same one that's used for your mingw tests. Also, although that configuration *will* work for native windows builds, note that the preferred way to configure Python is now to specify a command, not a prefix directory as you have done. You can also leave it out in most cases; when Python is installed on Windows, it creates registry entries that can be used to find the installations. using python ; ought to be enough. -- Dave Abrahams Boost Consulting www.boost-consulting.com

David Abrahams wrote:
on Thu Mar 15 2007, Roland Schwarz <roland.schwarz-AT-chello.at> wrote:
http://engineering.meta-comm.com/boost-regression/CVS-RC_1_34_0/speedsnail-g...
That setup will not generate successful tests of Boost.Python with the cygwin flavor of GCC, since you haven't got a "using python" with <target-os>cygwin in the condition. Naturally, that would have to refer to a cygwin build of Python, not the same one that's used for your mingw tests.
I tried with user-config.jam: using gcc : 3.4.4 : "C:/Cygwin/bin/g++.exe" : <flavor>cygwin <root>"C:/Cygwin/" ; using python : 2.5 : "C:/Programme/Python25" ; using python : 2.4 : "C:/Cygwin/bin" : : : <target-os>cygwin ; And invoked with (from BoostRoot/libs/python/test) : bjam gcc-3.4.4/toolset-gcc:flavor=cygwin/target-os=cygwin The first few lines of output: warning: No working Python interpreter found. warning: falling back to "C:/Cygwin/bin\bin\python2.4" Building Boost.Regex with the optional Unicode/ICU support disabled. Please refer to the Boost.Regex documentation for more information (don't panic: this is a strictly optional feature). error: No best alternative for /python_for_extensions next alternative: required properties: <python>2.5 <target-os>windows not matched next alternative: required properties: <python>2.4 <target-os>cygwin not matched I either still understand something wrong, or there is a bug? [ ... ]
note that the preferred way to configure Python is now to specify a command, not a prefix directory as you have done.
Sorry, I am lost now. I am doing exactly as you were showing in the prvious mail, not? One additional observation: When trying to C:\Cygwin\bin\python from a CMD.EXE shell I get a message box from the 16bit windows subsystem, complaining about some illegal instructions or such. I do not get this box when invoking bjam with the above configuration though. Roland

David Abrahams said: (by the date of Thu, 15 Mar 2007 00:30:20 -0400)
If you got this far in the message, thank you *very* much for your attention :)
oh, you are welcome :) I had read this, because I was wondering if maybe this time, the debian team will get the boost::python support right. -- Janek Kozicki |

on Thu Mar 15 2007, Neal Becker <ndbecker2-AT-gmail.com> wrote:
David Abrahams wrote:
I've just checked into the RC_1_34_0 branch most of the support for building and testing Python extensions and Boost.Python in BBv2.
Will this appear in the cvs head?
Yeah, eventually. How soon do you need it? -- Dave Abrahams Boost Consulting www.boost-consulting.com

David Abrahams wrote:
on Thu Mar 15 2007, Neal Becker <ndbecker2-AT-gmail.com> wrote:
David Abrahams wrote:
I've just checked into the RC_1_34_0 branch most of the support for building and testing Python extensions and Boost.Python in BBv2.
Will this appear in the cvs head?
Yeah, eventually. How soon do you need it?
Eventually, I guess. I must be lucky, I didn't even notice I needed it. Just thought I'd test it.

On 3/15/07, David Abrahams <dave@boost-consulting.com> wrote:
on Thu Mar 15 2007, Neal Becker <ndbecker2-AT-gmail.com> wrote:
David Abrahams wrote:
I've just checked into the RC_1_34_0 branch most of the support for building and testing Python extensions and Boost.Python in BBv2.
Will this appear in the cvs head?
Yeah, eventually. How soon do you need it?
If you want to know problems sooner than later, than it is better to add it to cvs head. Python-Ogre project has new users, who join the project almost every day. The only way to use it on MAC and Linux is to build it from source code. Thus Boost.Python is built and tested on MAC, Linux and Windows. It is built against Python 2.4 and 2.5. -- Roman Yakovenko C++ Python language binding http://www.language-binding.net/

on Thu Mar 15 2007, Neal Becker <ndbecker2-AT-gmail.com> wrote:
David Abrahams wrote:
I've just checked into the RC_1_34_0 branch most of the support for building and testing Python extensions and Boost.Python in BBv2.
Will this appear in the cvs head?
It's in the HEAD now. -- Dave Abrahams Boost Consulting www.boost-consulting.com Don't Miss BoostCon 2007! ==> http://www.boostcon.com
participants (5)
-
David Abrahams
-
Janek Kozicki
-
Neal Becker
-
Roland Schwarz
-
Roman Yakovenko