Boost logo

Boost-Build :

From: Vladimir Prus (ghost_at_[hidden])
Date: 2006-03-31 08:32:55


On Thursday 30 March 2006 13:27, Bojan Resnik wrote:
> I installed the new Python 2.4.3 on Windows and discovered that
> python was no longer found by bjam. The problem turned out to be that
> the path to Python installation folder was stored with an ending
> backslash by the installer. I modified the python-config.jam to use
> path.make before passing the root path to python script.
>
> I also needed to use the python interpreter from my Jamfiles, so I
> added a new rule 'interpreter' to the python module that returns the
> interpreter command as detected by the toolset. During the course of
> this I also modified the initialization code to store the detected
> interpreter for all platforms.

There's one issue -- the Python module can be now initialized several times,
with different versions for different compilers. For example:

  using python : 2.3 : /some/root : : :
          <toolset>gcc <toolset-gcc:version>3.3 ;

  using python : 2.3 : /some/other/root : : :
          <toolset>gcc <toolset-gcc:version>4.0 ;

But your code will return just one version. What do you think be the right
solution for you case?

> Please find attached the diffs for python.jam and python-config.jam.

Except for the issue above, the patch looks good. For future patches, though,
it's better to not use UPPERCASE_VARIABLES for your own variables, this way
they can be confused with environment variables. Instead, prepend "." to
names of module-global variables as documented in hacking.txt

Thanks,
Volodya

-- 
Vladimir Prus
http://vladimir_prus.blogspot.com
Boost.Build V2: http://boost.org/boost-build2

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