$include_dir="/home/hyper-archives/boost-commit/include"; include("$include_dir/msg-header.inc") ?>
Subject: [Boost-commit] svn:boost r64444 - in trunk/tools/build/v2: build util
From: ghost_at_[hidden]
Date: 2010-07-29 10:33:57
Author: vladimir_prus
Date: 2010-07-29 10:33:56 EDT (Thu, 29 Jul 2010)
New Revision: 64444
URL: http://svn.boost.org/trac/boost/changeset/64444
Log:
Add stub port of os.jam.
Added:
   trunk/tools/build/v2/util/os_j.py   (contents, props changed)
Text files modified: 
   trunk/tools/build/v2/build/project.py |     5 ++++-                                   
   1 files changed, 4 insertions(+), 1 deletions(-)
Modified: trunk/tools/build/v2/build/project.py
==============================================================================
--- trunk/tools/build/v2/build/project.py	(original)
+++ trunk/tools/build/v2/build/project.py	2010-07-29 10:33:56 EDT (Thu, 29 Jul 2010)
@@ -1003,11 +1003,14 @@
     def import_(self, name, names_to_import=None, local_names=None):
 
         name = name[0]
+        py_name = name
+        if py_name == "os":
+            py_name = "os_j"
         jamfile_module = self.registry.current().project_module()
         attributes = self.registry.attributes(jamfile_module)
         location = attributes.get("location")
 
-        m = self.registry.load_module(name, [location])
+        m = self.registry.load_module(py_name, [location])
 
         for f in m.__dict__:
             v = m.__dict__[f]
Added: trunk/tools/build/v2/util/os_j.py
==============================================================================
--- (empty file)
+++ trunk/tools/build/v2/util/os_j.py	2010-07-29 10:33:56 EDT (Thu, 29 Jul 2010)
@@ -0,0 +1,16 @@
+# Status: stub, just enough to make tests work.
+#
+# Named os_j to avoid conflicts with standard 'os'. See
+# project.py:import for special-casing.
+#
+# Copyright 2001, 2002, 2003, 2005 Dave Abrahams
+# Copyright 2006 Rene Rivera
+# Copyright 2003, 2005 Vladimir Prus
+# Distributed under the Boost Software License, Version 1.0.
+# (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
+
+
+import os
+
+def name():
+    return os.name