Boost logo

Boost-Build :

From: Jurko Gospodnetić (jurko.gospodnetic_at_[hidden])
Date: 2008-07-11 19:33:49


   Hi William.

> I would like to use my own compiled python.exe but there is something i
> don't understand, i did like in the doc :
>
> using python : 2.5 : c:/temp/python_d.exe
> : $(kenginPath)/libs/Python/include $(kenginPath)/libs/Python/PC
> : $(kenginPath)/libs/Python/lib/windows
> : <target-os>windows <toolset>msvc <python-debugging>on <variant>debug ;
>
>
> When i build an extension with the --debug-configuration argument i can see
> that :
>
[...snipped...]
>
> where i can see that everything is correctly set for boost python but here
> it is, the capture-output rule ( for the python extension test ) runs that :
>
> capture-output
> build\testsea_ext.test\msvc-8.0\debug\python-debugging-on\threading-multi\testsea_ext
>
[...snipped...]
>
> c:/temp/python_d.exe python "src\extensions\test_sea.py" >
> "build\testsea_ext.test\msvc-8.0\debug\python-debugging-on\threading-multi\testsea_ext.output"
> 2>&1
>
[...snipped...]
>
> So finally my question is : why this "python" is inserted in the command, i
> tried to have a look in the python.jam but i didn't find out.

   Unfortunately I was not able to reproduce this. Which version of
Boost Build are you using? Tried it with the current trunk version?

   This python launching command is being prepared in the capture-output
rule in python.jam in the line:

> LAUNCHER on $(target) = $(set-PYTHONPATH) [ on $(target) return $(PYTHON) ] ;

   You can perhaps add some debugging messages around that to see if the
python command interpreter executable got messed somehow here or if
something else is causing the problem. For example add the following
code after this line:

> local xxx1 = [ on $(target) return $(PYTHON) ] ;
> local ...xxx... PYTHON = /$(xxx1)/
> local xxx2 = [ on $(target) return $(LAUNCHER) ] ;
> local ...xxx... LAUNCHER = /$(xxx2)/

   Another option where this extra 'python' parameter could have be
added is the capture-output action in the testing.jam module. That
action could have been called with and incorrect source parameters. To
make sure you can try modifying this action and adding the following
commands to the start of the action:

> echo LAUNCHER: /$(LAUNCHER)/
> echo sources: /$(>)/
> echo target: /$(<)/
> echo INPUT_FILES: /$(INPUT_FILES)/

   Perhaps that can shed some more light on the problem.

   Hope this helps.

   Best regards,
     Jurko Gospodnetić

P.S.
   I sent in a patch on in separate thread to make python.jam work
correctly when the python command interpreter's path contains spaces.
Could you please test it and see if it causes any problems on your system?


Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk