$include_dir="/home/hyper-archives/boost-commit/include"; include("$include_dir/msg-header.inc") ?>
From: ghost_at_[hidden]
Date: 2007-10-13 13:52:26
Author: vladimir_prus
Date: 2007-10-13 13:52:25 EDT (Sat, 13 Oct 2007)
New Revision: 39980
URL: http://svn.boost.org/trac/boost/changeset/39980
Log:
Change project rules declaration so that dummy 'self'
argument is not required. 
Text files modified: 
   branches/build/python_port/python/boost/build/build/alias.py   |     2 +-                                      
   branches/build/python_port/python/boost/build/build/project.py |     8 ++++++--                                
   branches/build/python_port/python/boost/build/tools/make.py    |     3 +--                                     
   3 files changed, 8 insertions(+), 5 deletions(-)
Modified: branches/build/python_port/python/boost/build/build/alias.py
==============================================================================
--- branches/build/python_port/python/boost/build/build/alias.py	(original)
+++ branches/build/python_port/python/boost/build/build/alias.py	2007-10-13 13:52:25 EDT (Sat, 13 Oct 2007)
@@ -42,7 +42,7 @@
         # look like 100% alias.
         return base.add(subvariant.sources_usage_requirements())
 
-def alias(self, name, sources, requirements=[], default_build=[], usage_requirements=[]):
+def alias(name, sources, requirements=[], default_build=[], usage_requirements=[]):
     project = get_manager().projects().current()
     targets = get_manager().targets()
     targets.main_target_alternative(AliasTarget(
Modified: branches/build/python_port/python/boost/build/build/project.py
==============================================================================
--- branches/build/python_port/python/boost/build/build/project.py	(original)
+++ branches/build/python_port/python/boost/build/build/project.py	2007-10-13 13:52:25 EDT (Sat, 13 Oct 2007)
@@ -695,10 +695,11 @@
 class ProjectRules:
     """Class keeping all rules that are made available to Jamfile."""
 
-    def __init__(self): pass
+    def __init__(self):
+        self.rules = {}
 
     def add_rule(self, name, callable):
-        self.__class__.__dict__[name] = callable
+        self.rules[name] = callable
 
     def init_project(self, project_module):
         
@@ -712,6 +713,9 @@
                 print "Importing '%s' to bjam" % n
                 bjam.import_rule(project_module, n, v)
 
+        for n in self.rules:
+            bjam.import_rule(project_module, n, self.rules[n])
+
     def foobar(self, param):
         print "foobar called!"
     
Modified: branches/build/python_port/python/boost/build/tools/make.py
==============================================================================
--- branches/build/python_port/python/boost/build/tools/make.py	(original)
+++ branches/build/python_port/python/boost/build/tools/make.py	2007-10-13 13:52:25 EDT (Sat, 13 Oct 2007)
@@ -28,8 +28,7 @@
         return [ boost.build.build.property_set.empty(),
                  [self.project().manager().virtual_targets().register(target)]]
 
-# FIXME: should not have 'self' at all.
-def make (self, target_name, sources, generating_rule,
+def make (target_name, sources, generating_rule,
           requirements=None, usage_requirements=None):
 
     target_name = target_name[0]