2
0
mirror of https://github.com/boostorg/build.git synced 2026-02-15 00:52:16 +00:00

Merge pull request #33 from frenchtoast747/features/bug-fixes

Python Port: Bug fixes
This commit is contained in:
Vladimir Prus
2014-09-08 16:10:20 +04:00
5 changed files with 18 additions and 5 deletions

View File

@@ -362,7 +362,7 @@ def __add_flag (rule_or_module, variable_name, condition, values):
assert m
module = m.group(1)
__module_flags.setdefault(m, []).append(f)
__module_flags.setdefault(module, []).append(f)
__flags.setdefault(rule_or_module, []).append(f)
__requirements = []

View File

@@ -173,6 +173,7 @@ def check_init_parameters(toolset, requirement, *args):
The return value from this rule is a condition to be used for flags settings.
"""
from b2.build import toolset as b2_toolset
# The type checking here is my best guess about
# what the types should be.
assert(isinstance(toolset, str))
@@ -233,6 +234,11 @@ def check_init_parameters(toolset, requirement, *args):
sig = sig + value + '-'
# if a requirement is specified, the signature should be unique
# with that requirement
if requirement:
sig += '-' + requirement
if __all_signatures.has_key(sig):
message = "duplicate initialization of '%s' with the following parameters: " % toolset
@@ -255,7 +261,7 @@ def check_init_parameters(toolset, requirement, *args):
if requirement:
r = ['<toolset>' + toolset, requirement]
r = ','.join(r)
toolset.add_requirements([r + ':' + c for c in subcondition])
b2_toolset.add_requirements([r + ':' + c for c in subcondition])
# We add the requirements, if any, to the condition to scope the toolset
# variables and options to this specific version.

View File

@@ -22,7 +22,7 @@ type.register('IDL', ['idl'])
# to resources of an application (.rc). In order to be found by a resource
# compiler its target type should be derived from 'H' - otherwise
# the property '<implicit-dependency>' will be ignored.
type.register('MSTYPELIB', 'tlb', 'H')
type.register('MSTYPELIB', ['tlb'], 'H')
# Register scanner for MIDL files
class MidlScanner(scanner.Scanner):

View File

@@ -115,7 +115,10 @@ def init(version = None, command = None, options = None):
command = to_seq(command)
if command:
options.append("<command>"+command)
if isinstance(command, str):
options.append('<command>' + command)
else:
options.extend("<command>"+cmd for cmd in command)
configure(version,options)
def configure(version=None, options=None):

View File

@@ -446,7 +446,11 @@ def programs_path ():
for elem in raw:
if elem:
for p in elem.split(os.path.pathsep):
result.append(make(p))
# it's possible that the user's Path has
# double path separators, thus it is possible
# for p to be an empty string.
if p:
result.append(make(p))
return result