|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r64303 - trunk/tools/build/v2/build
From: ghost_at_[hidden]
Date: 2010-07-23 10:15:47
Author: vladimir_prus
Date: 2010-07-23 10:15:46 EDT (Fri, 23 Jul 2010)
New Revision: 64303
URL: http://svn.boost.org/trac/boost/changeset/64303
Log:
Fix processing of build request.
Text files modified:
trunk/tools/build/v2/build/build_request.py | 18 ++++++++++--------
trunk/tools/build/v2/build/feature.py | 2 +-
trunk/tools/build/v2/build/property_set.py | 5 ++++-
3 files changed, 15 insertions(+), 10 deletions(-)
Modified: trunk/tools/build/v2/build/build_request.py
==============================================================================
--- trunk/tools/build/v2/build/build_request.py (original)
+++ trunk/tools/build/v2/build/build_request.py 2010-07-23 10:15:46 EDT (Fri, 23 Jul 2010)
@@ -8,8 +8,8 @@
# warranty, and with no claim as to its suitability for any purpose.
import feature
-from b2.util import set
from b2.util.utility import *
+import b2.build.property_set as property_set
def expand_no_defaults (property_sets):
""" Expand the given build request by combining all property_sets which don't
@@ -21,7 +21,7 @@
# Now combine all of the expanded property_sets
product = __x_product (expanded_property_sets)
- return product
+ return [property_set.create(p) for p in product]
def __x_product (property_sets):
@@ -29,8 +29,7 @@
that would contain conflicting values for single-valued features.
"""
x_product_seen = set()
- x_product_used = set()
- return __x_product_aux (property_sets, x_product_seen, x_product_used)
+ return __x_product_aux (property_sets, x_product_seen)[0]
def __x_product_aux (property_sets, seen_features):
"""Returns non-conflicting combinations of property sets.
@@ -64,14 +63,17 @@
if these_features & seen_features:
(inner_result, inner_seen) = __x_product_aux(property_sets[1:], seen_features)
- return (inner_result, inner_seen + these_features)
+ return (inner_result, inner_seen | these_features)
else:
result = []
(inner_result, inner_seen) = __x_product_aux(property_sets[1:], seen_features | these_features)
- for inner in inner_result:
- result.append(properties + inner)
+ if inner_result:
+ for inner in inner_result:
+ result.append(properties + inner)
+ else:
+ result.append(properties)
if inner_seen & these_features:
# Some of elements in property_sets[1:] conflict with elements of property_sets[0],
@@ -79,7 +81,7 @@
(inner_result2, inner_seen2) = __x_product_aux(property_sets[1:], seen_features)
result.extend(inner_result2)
- return (result, inner_seen + these_features)
+ return (result, inner_seen | these_features)
Modified: trunk/tools/build/v2/build/feature.py
==============================================================================
--- trunk/tools/build/v2/build/feature.py (original)
+++ trunk/tools/build/v2/build/feature.py 2010-07-23 10:15:46 EDT (Fri, 23 Jul 2010)
@@ -416,7 +416,7 @@
if __implicit_features.has_key(v):
raise BaseException ("'%s' is already associated with the feature '%s'" % (v, __implicit_features [v]))
- __implicit_features[v] = name
+ __implicit_features[v] = feature
if len (feature.values()) == 0 and len (values) > 0:
# This is the first value specified for this feature,
Modified: trunk/tools/build/v2/build/property_set.py
==============================================================================
--- trunk/tools/build/v2/build/property_set.py (original)
+++ trunk/tools/build/v2/build/property_set.py 2010-07-23 10:15:46 EDT (Fri, 23 Jul 2010)
@@ -250,6 +250,9 @@
"""
return self.free_
+ def non_free(self):
+ return self.base_ + self.incidental_
+
def dependency (self):
""" Returns dependency properties.
"""
@@ -297,7 +300,7 @@
self.composites_ = create(feature.expand_composires(self.all_raw_))
return self.composites_
- def expand_subfeature(self):
+ def expand_subfeatures(self):
if not self.subfeatures_:
self.subfeatures_ = create(feature.expand_subfeatures(self.all_))
return self.subfeatures_
Boost-Commit 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