2
0
mirror of https://github.com/boostorg/build.git synced 2026-02-19 14:22:10 +00:00

tools/build/v2/tools/python.jam:

* add ".lib" to the target name for libpython.  *** This is a kluge!
   I don't know why it should be necessary ***, but when I was
   inserting debugging code that did

      ECHO [ $(target).name ] ;

   it would always drop the 2nd digit, e.g. python-2.4 would come out
   as "python-2".  This change prevented it.

 * Fixed spelling and grammar in comments

 * Fix the incorrect assumption in capture-output that only one Python
   extension will participate (also in tools/build/v2/testing.jam).


[SVN r37215]
This commit is contained in:
Dave Abrahams
2007-03-17 20:25:04 +00:00
parent 549a94389e
commit ac28d1cb89
3 changed files with 19 additions and 15 deletions

View File

@@ -855,7 +855,7 @@ else
# Windows Manifests is a new way to specify dependencies
# on managed DotNet assemblies and Windows native DLLs. The
# manifests are embedded as resourses and are useful in
# manifests are embedded as resources and are useful in
# any PE targets (both DLL and EXE)
if [ os.name ] in NT

View File

@@ -635,7 +635,7 @@ local rule declare-libpython-target ( version ? : sys.platform ? : requirements
# Compute the name of the target to declare
local libpython-target-name = python $(version) $(sys.platform) ;
libpython-target-name = $(libpython-target-name:J=-) ;
libpython-target-name = $(libpython-target-name:J=-).lib ;
# Declare and return it
lib $(libpython-target-name) : : <name>python$(lib-version) $(requirements) ;
@@ -886,10 +886,10 @@ rule configured ( )
type.register PYTHON_EXTENSION : : SHARED_LIB ;
# We can't give "dll" suffix to PYTHON_EXTENSION, because
# we would not know what "a.dll" is: python extenstion or
# ordinary library. Therefore, we specify only suffixes
# used for generation of targets.
# We can't simply assign the "dll" or "so" suffix to PYTHON_EXTENSION,
# because then we wouldn't know whether "x.dll" is a python extension
# or an ordinary library. Therefore, we specify only the suffixes used
# for target generation.
type.set-generated-target-suffix PYTHON_EXTENSION : : so ;
type.set-generated-target-suffix PYTHON_EXTENSION : <target-os>windows : pyd ;
type.set-generated-target-suffix PYTHON_EXTENSION : <target-os>cygwin : dll ;
@@ -984,12 +984,15 @@ class python-test-generator : generator
local extension = [ generators.construct $(project) $(name) :
PYTHON_EXTENSION : $(property-set) : $(s) $(libs) ] ;
# The important part of usage requirements returned from
# PYTHON_EXTENSION genrator are xdll-path properties that
# will allow to find python extension at runtime.
# The important part of usage requirements returned
# from PYTHON_EXTENSION generator are xdll-path
# properties that will allow us to find the python
# extension at runtime.
property-set = [ $(property-set).add $(extension[1]) ] ;
# Ignore usage requirements. We're top-level generator and
# nobody is going to use us.
# Ignore usage requirements. We're a top-level
# generator and nobody is going to use what we
# generate.
new-sources += $(extension[2-]) ;
}
}
@@ -1032,13 +1035,14 @@ rule capture-output ( target : sources * : properties * )
# DLL. Only $(sources[1]) is passed to testing.capture-output,
# so RUN_PATH variable on $(sources[2]) is not consulted. Move it
# over explicitly.
RUN_PATH on $(sources[1]) = [ on $(sources[2]) return $(RUN_PATH) ] ;
RUN_PATH on $(sources[1]) = [ on $(sources[2-]) return $(RUN_PATH) ] ;
PYTHONPATH = [ on $(sources[2-]) return $(LOCATE) $(SEARCH) ] ;
PYTHONPATH = [ on $(sources[2]) return $(LOCATE) ] ;
# After test is run, we remove the Python module, but not the Python
# script.
testing.capture-output $(target) : $(sources[1]) : $(properties)
: $(sources[2]) ;
: $(sources[2-]) ;
# PYTHONPATH is different; it will be interpreted by whichever
# Python is invoked and so must follow path rules for the target

View File

@@ -354,7 +354,7 @@ toolset.flags testing.capture-output LAUNCHER <testing.launcher> ;
# - if 'none', does not remove anything, ever
# - if empty, removes 'source'
# - if non-empty and not 'none', contains a list of sources to remove.
rule capture-output ( target : source : properties * : targets-to-remove ? )
rule capture-output ( target : source : properties * : targets-to-remove * )
{
output-file on $(target) = $(target:S=.output) ;
LOCATE on $(target:S=.output) = [ on $(target) return $(LOCATE) ] ;