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

Add stub port of os.jam.

[SVN r64444]
This commit is contained in:
Vladimir Prus
2010-07-29 14:33:56 +00:00
parent 9531774f5a
commit 6fafa45f50
2 changed files with 20 additions and 1 deletions

View File

@@ -1003,11 +1003,14 @@ attribute is allowed only for top-level 'project' invocations""")
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]

16
v2/util/os_j.py Normal file
View File

@@ -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