summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/MANIFEST17
-rw-r--r--src/engine/MANIFEST16
-rw-r--r--src/engine/SCons/.aeignore (renamed from src/scons/Sig/.aeignore)0
-rw-r--r--src/engine/SCons/Builder.py (renamed from src/scons/Builder.py)8
-rw-r--r--src/engine/SCons/BuilderTests.py (renamed from src/scons/BuilderTests.py)26
-rw-r--r--src/engine/SCons/Defaults.py (renamed from src/scons/Defaults.py)10
-rw-r--r--src/engine/SCons/Environment.py (renamed from src/scons/Environment.py)6
-rw-r--r--src/engine/SCons/EnvironmentTests.py (renamed from src/scons/EnvironmentTests.py)4
-rw-r--r--src/engine/SCons/Errors.py (renamed from src/scons/Errors.py)4
-rw-r--r--src/engine/SCons/ErrorsTests.py (renamed from src/scons/ErrorsTests.py)10
-rw-r--r--src/engine/SCons/Job.py (renamed from src/scons/Job.py)2
-rw-r--r--src/engine/SCons/JobTests.py (renamed from src/scons/JobTests.py)10
-rw-r--r--src/engine/SCons/Node/.aeignore (renamed from src/scons/Scanner/.aeignore)0
-rw-r--r--src/engine/SCons/Node/FS.py (renamed from src/scons/Node/FS.py)8
-rw-r--r--src/engine/SCons/Node/FS/.aeignore (renamed from src/scons/Node/FS/.aeignore)0
-rw-r--r--src/engine/SCons/Node/FSTests.py (renamed from src/scons/Node/FSTests.py)14
-rw-r--r--src/engine/SCons/Node/NodeTests.py (renamed from src/scons/Node/NodeTests.py)6
-rw-r--r--src/engine/SCons/Node/__init__.py (renamed from src/scons/Node/__init__.py)4
-rw-r--r--src/engine/SCons/Scanner/.aeignore (renamed from src/scons/Node/.aeignore)0
-rw-r--r--src/engine/SCons/Scanner/C.py (renamed from src/scons/Scanner/C.py)6
-rw-r--r--src/engine/SCons/Scanner/CTests.py (renamed from src/scons/Scanner/CTests.py)16
-rw-r--r--src/engine/SCons/Scanner/ScannerTests.py (renamed from src/scons/Scanner/ScannerTests.py)10
-rw-r--r--src/engine/SCons/Scanner/__init__.py (renamed from src/scons/Scanner/__init__.py)4
-rw-r--r--src/engine/SCons/Sig/.aeignore (renamed from src/scons/.aeignore)0
-rw-r--r--src/engine/SCons/Sig/MD5.py (renamed from src/scons/Sig/MD5.py)6
-rw-r--r--src/engine/SCons/Sig/MD5Tests.py (renamed from src/scons/Sig/MD5Tests.py)18
-rw-r--r--src/engine/SCons/Sig/TimeStamp.py (renamed from src/scons/Sig/TimeStamp.py)4
-rw-r--r--src/engine/SCons/Sig/TimeStampTests.py (renamed from src/scons/Sig/TimeStampTests.py)14
-rw-r--r--src/engine/SCons/Sig/__init__.py (renamed from src/scons/Sig/__init__.py)4
-rw-r--r--src/engine/SCons/__init__.py (renamed from src/scons/__init__.py)4
-rw-r--r--src/engine/SCons/exitfuncs.py (renamed from src/scons/exitfuncs.py)4
-rw-r--r--src/engine/setup.py16
-rw-r--r--src/script/MANIFEST3
-rw-r--r--src/script/scons.py (renamed from src/scons.py)29
-rw-r--r--src/script/setup.py (renamed from src/setup.py)1
35 files changed, 155 insertions, 129 deletions
diff --git a/src/MANIFEST b/src/MANIFEST
deleted file mode 100644
index 33e888c..0000000
--- a/src/MANIFEST
+++ /dev/null
@@ -1,17 +0,0 @@
-MANIFEST
-scons/__init__.py
-scons/Builder.py
-scons/Defaults.py
-scons/Environment.py
-scons/Errors.py
-scons/Job.py
-scons/exitfuncs.py
-scons/Node/__init__.py
-scons/Node/FS.py
-scons/Scanner/__init__.py
-scons/Scanner/C.py
-scons/Sig/__init__.py
-scons/Sig/MD5.py
-scons/Sig/TimeStamp.py
-scons.py
-setup.py
diff --git a/src/engine/MANIFEST b/src/engine/MANIFEST
new file mode 100644
index 0000000..51c6822
--- /dev/null
+++ b/src/engine/MANIFEST
@@ -0,0 +1,16 @@
+MANIFEST
+SCons/__init__.py
+SCons/Builder.py
+SCons/Defaults.py
+SCons/Environment.py
+SCons/Errors.py
+SCons/Job.py
+SCons/exitfuncs.py
+SCons/Node/__init__.py
+SCons/Node/FS.py
+SCons/Scanner/__init__.py
+SCons/Scanner/C.py
+SCons/Sig/__init__.py
+SCons/Sig/MD5.py
+SCons/Sig/TimeStamp.py
+setup.py
diff --git a/src/scons/Sig/.aeignore b/src/engine/SCons/.aeignore
index 43fe851..43fe851 100644
--- a/src/scons/Sig/.aeignore
+++ b/src/engine/SCons/.aeignore
diff --git a/src/scons/Builder.py b/src/engine/SCons/Builder.py
index 8b19bd5..f1ab100 100644
--- a/src/scons/Builder.py
+++ b/src/engine/SCons/Builder.py
@@ -1,4 +1,4 @@
-"""scons.Builder
+"""SCons.Builder
XXX
@@ -9,8 +9,8 @@ __revision__ = "Builder.py __REVISION__ __DATE__ __DEVELOPER__"
import os
+import SCons.Node.FS
import types
-from scons.Node.FS import Dir, File, lookup
@@ -23,7 +23,7 @@ class Builder:
action = None,
input_suffix = None,
output_suffix = None,
- node_class = File):
+ node_class = SCons.Node.FS.File):
self.name = name
self.action = Action(action)
self.insuffix = input_suffix
@@ -38,7 +38,7 @@ class Builder:
return cmp(self.__dict__, other.__dict__)
def __call__(self, env, target = None, source = None):
- node = lookup(self.node_class, target)
+ node = SCons.Node.FS.lookup(self.node_class, target)
node.builder_set(self)
node.env_set(self)
node.sources = source # XXX REACHING INTO ANOTHER OBJECT
diff --git a/src/scons/BuilderTests.py b/src/engine/SCons/BuilderTests.py
index 822b64c..67435bc 100644
--- a/src/scons/BuilderTests.py
+++ b/src/engine/SCons/BuilderTests.py
@@ -4,7 +4,7 @@ import sys
import unittest
import TestCmd
-from scons.Builder import Builder, CommandAction, FunctionAction
+import SCons.Builder
# Initial setup of the common environment for all tests,
@@ -34,16 +34,16 @@ class BuilderTestCase(unittest.TestCase):
Verify that we can retrieve the supplied action attribute.
"""
- builder = Builder(action = "foo")
+ builder = SCons.Builder.Builder(action = "foo")
assert builder.action.command == "foo"
def test_cmp(self):
"""Test simple comparisons of Builder objects
"""
- b1 = Builder(input_suffix = '.o')
- b2 = Builder(input_suffix = '.o')
+ b1 = SCons.Builder.Builder(input_suffix = '.o')
+ b2 = SCons.Builder.Builder(input_suffix = '.o')
assert b1 == b2
- b3 = Builder(input_suffix = '.x')
+ b3 = SCons.Builder.Builder(input_suffix = '.x')
assert b1 != b3
assert b2 != b3
@@ -54,7 +54,7 @@ class BuilderTestCase(unittest.TestCase):
and one is an internal Python function.
"""
cmd = "python %s %s xyzzy" % (act_py, outfile)
- builder = Builder(action = cmd)
+ builder = SCons.Builder.Builder(action = cmd)
builder.execute()
assert test.read(outfile, 'r') == "act.py: xyzzy\n"
@@ -65,7 +65,7 @@ class BuilderTestCase(unittest.TestCase):
f.close()
return not None
- builder = Builder(action = function)
+ builder = SCons.Builder.Builder(action = function)
builder.execute(out = outfile)
assert test.read(outfile, 'r') == "function\n"
@@ -75,15 +75,15 @@ class BuilderTestCase(unittest.TestCase):
Make sure that the '.' separator is appended to the
beginning if it isn't already present.
"""
- builder = Builder(input_suffix = '.c')
+ builder = SCons.Builder.Builder(input_suffix = '.c')
assert builder.insuffix == '.c'
- builder = Builder(input_suffix = 'c')
+ builder = SCons.Builder.Builder(input_suffix = 'c')
assert builder.insuffix == '.c'
def test_name(self):
"""Test Builder creation with a specified name
"""
- builder = Builder(name = 'foo')
+ builder = SCons.Builder.Builder(name = 'foo')
assert builder.name == 'foo'
def test_node_class(self):
@@ -91,7 +91,7 @@ class BuilderTestCase(unittest.TestCase):
"""
class Foo:
pass
- builder = Builder(node_class = Foo)
+ builder = SCons.Builder.Builder(node_class = Foo)
assert builder.node_class is Foo
def test_outsuffix(self):
@@ -100,9 +100,9 @@ class BuilderTestCase(unittest.TestCase):
Make sure that the '.' separator is appended to the
beginning if it isn't already present.
"""
- builder = Builder(input_suffix = '.o')
+ builder = SCons.Builder.Builder(input_suffix = '.o')
assert builder.insuffix == '.o'
- builder = Builder(input_suffix = 'o')
+ builder = SCons.Builder.Builder(input_suffix = 'o')
assert builder.insuffix == '.o'
diff --git a/src/scons/Defaults.py b/src/engine/SCons/Defaults.py
index 0aa2b82..56a15f7 100644
--- a/src/scons/Defaults.py
+++ b/src/engine/SCons/Defaults.py
@@ -1,4 +1,4 @@
-"""scons.Defaults
+"""SCons.Defaults
Builders and other things for the local site. Here's where we'll
duplicate the functionality of autoconf until we move it into the
@@ -10,11 +10,13 @@ __revision__ = "local.py __REVISION__ __DATE__ __DEVELOPER__"
-from scons.Builder import Builder
+import SCons.Builder
-Object = Builder(name = 'Object', action = 'cc -c -o %(target)s %(source)s')
-Program = Builder(name = 'Program', action = 'cc -o %(target)s %(source)s')
+Object = SCons.Builder.Builder(name = 'Object',
+ action = 'cc -c -o %(target)s %(source)s')
+Program = SCons.Builder.Builder(name = 'Program',
+ action = 'cc -o %(target)s %(source)s')
Builders = [Object, Program]
diff --git a/src/scons/Environment.py b/src/engine/SCons/Environment.py
index 9b050d1..a3fe27a 100644
--- a/src/scons/Environment.py
+++ b/src/engine/SCons/Environment.py
@@ -1,4 +1,4 @@
-"""scons.Environment
+"""SCons.Environment
XXX
@@ -59,8 +59,8 @@ class Environment:
if not type(builders) is types.ListType:
kw['BUILDERS'] = [builders]
else:
- import scons.Defaults
- kw['BUILDERS'] = scons.Defaults.Builders[:]
+ import SCons.Defaults
+ kw['BUILDERS'] = SCons.Defaults.Builders[:]
self.Dictionary.update(copy.deepcopy(kw))
class BuilderWrapper:
diff --git a/src/scons/EnvironmentTests.py b/src/engine/SCons/EnvironmentTests.py
index 2f13c81..6ac4cb7 100644
--- a/src/scons/EnvironmentTests.py
+++ b/src/engine/SCons/EnvironmentTests.py
@@ -1,9 +1,9 @@
-__revision__ = "EnivronmentTests.py __REVISION__ __DATE__ __DEVELOPER__"
+__revision__ = "EnvironmentTests.py __REVISION__ __DATE__ __DEVELOPER__"
import sys
import unittest
-from scons.Environment import *
+from SCons.Environment import *
diff --git a/src/scons/Errors.py b/src/engine/SCons/Errors.py
index 2709c19..52facf7 100644
--- a/src/scons/Errors.py
+++ b/src/engine/SCons/Errors.py
@@ -1,7 +1,7 @@
-"""scons.Errors
+"""SCons.Errors
This file contains the exception classes used to handle internal
-and user errors in scons.
+and user errors in SCons.
"""
diff --git a/src/scons/ErrorsTests.py b/src/engine/SCons/ErrorsTests.py
index 8d27332..911b11b 100644
--- a/src/scons/ErrorsTests.py
+++ b/src/engine/SCons/ErrorsTests.py
@@ -2,22 +2,22 @@ __revision__ = "ErrorsTests.py __REVISION__ __DATE__ __DEVELOPER__"
import sys
import unittest
-from scons.Errors import InternalError, UserError
+import SCons.Errors
class ErrorsTestCase(unittest.TestCase):
def test_InternalError(self):
"""Test the InternalError exception."""
try:
- raise InternalError, "test internal error"
- except InternalError, e:
+ raise SCons.Errors.InternalError, "test internal error"
+ except SCons.Errors.InternalError, e:
assert e.args == "test internal error"
def test_UserError(self):
"""Test the UserError exception."""
try:
- raise UserError, "test user error"
- except UserError, e:
+ raise SCons.Errors.UserError, "test user error"
+ except SCons.Errors.UserError, e:
assert e.args == "test user error"
diff --git a/src/scons/Job.py b/src/engine/SCons/Job.py
index 09bfcb8..aa9d92a 100644
--- a/src/scons/Job.py
+++ b/src/engine/SCons/Job.py
@@ -1,4 +1,4 @@
-"""scons.Job
+"""SCons.Job
This module defines the Serial and Parallel classes that execute tasks to
complete a build. The Jobs class provides a higher level interface to start,
diff --git a/src/scons/JobTests.py b/src/engine/SCons/JobTests.py
index 2d9eff0..ec4c46d 100644
--- a/src/scons/JobTests.py
+++ b/src/engine/SCons/JobTests.py
@@ -3,7 +3,7 @@ __revision__ = "JobTests.py __REVISION__ __DATE__ __DEVELOPER__"
import unittest
import random
import math
-import scons.Job
+import SCons.Job
import sys
# a large number
@@ -134,7 +134,7 @@ class ParallelTestCase(unittest.TestCase):
raise NoThreadsException()
taskmaster = Taskmaster(num_tasks, self, Task)
- jobs = scons.Job.Jobs(num_jobs, taskmaster)
+ jobs = SCons.Job.Jobs(num_jobs, taskmaster)
jobs.start()
jobs.wait()
@@ -152,7 +152,7 @@ class SerialTestCase(unittest.TestCase):
"test a serial job"
taskmaster = Taskmaster(num_tasks, self, Task)
- jobs = scons.Job.Jobs(1, taskmaster)
+ jobs = SCons.Job.Jobs(1, taskmaster)
jobs.start()
jobs.wait()
@@ -170,7 +170,7 @@ class SerialExceptionTestCase(unittest.TestCase):
"test a serial job with tasks that raise exceptions"
taskmaster = Taskmaster(num_tasks, self, ExceptionTask)
- jobs = scons.Job.Jobs(1, taskmaster)
+ jobs = SCons.Job.Jobs(1, taskmaster)
jobs.start()
jobs.wait()
@@ -186,7 +186,7 @@ class ParallelExceptionTestCase(unittest.TestCase):
"test parallel jobs with tasks that raise exceptions"
taskmaster = Taskmaster(num_tasks, self, ExceptionTask)
- jobs = scons.Job.Jobs(num_jobs, taskmaster)
+ jobs = SCons.Job.Jobs(num_jobs, taskmaster)
jobs.start()
jobs.wait()
diff --git a/src/scons/Scanner/.aeignore b/src/engine/SCons/Node/.aeignore
index 43fe851..43fe851 100644
--- a/src/scons/Scanner/.aeignore
+++ b/src/engine/SCons/Node/.aeignore
diff --git a/src/scons/Node/FS.py b/src/engine/SCons/Node/FS.py
index 7640a7a..e7956c2 100644
--- a/src/scons/Node/FS.py
+++ b/src/engine/SCons/Node/FS.py
@@ -1,4 +1,4 @@
-"""scons.Node.FS
+"""SCons.Node.FS
File system nodes.
@@ -10,7 +10,7 @@ __revision__ = "Node/FS.py __REVISION__ __DATE__ __DEVELOPER__"
import os
import os.path
-from scons.Node import Node
+import SCons.Node
@@ -94,7 +94,7 @@ def lookup(fsclass, name, directory = Top):
# linked_targets
# is_accessible
-class Dir(Node):
+class Dir(SCons.Node.Node):
"""A class for directories in a file system.
"""
@@ -130,7 +130,7 @@ class Dir(Node):
# is_under
# relpath
-class File(Node):
+class File(SCons.Node.Node):
"""A class for files in a file system.
"""
diff --git a/src/scons/Node/FS/.aeignore b/src/engine/SCons/Node/FS/.aeignore
index 43fe851..43fe851 100644
--- a/src/scons/Node/FS/.aeignore
+++ b/src/engine/SCons/Node/FS/.aeignore
diff --git a/src/scons/Node/FSTests.py b/src/engine/SCons/Node/FSTests.py
index 14b62c2..aa8cf2a 100644
--- a/src/scons/Node/FSTests.py
+++ b/src/engine/SCons/Node/FSTests.py
@@ -4,7 +4,7 @@ import os
import sys
import unittest
-from scons.Node.FS import init, lookup, Dir, File
+import SCons.Node.FS
@@ -39,10 +39,10 @@ class FSTestCase(unittest.TestCase):
os.chdir(sub_dir)
- init()
+ SCons.Node.FS.init()
def Dir_test(lpath, path, abspath, up_path):
- dir = lookup(Dir, lpath)
+ dir = SCons.Node.FS.lookup(SCons.Node.FS.Dir, lpath)
assert(dir.path == path)
assert(dir.abspath == abspath)
assert(dir.up().path == up_path)
@@ -58,14 +58,14 @@ class FSTestCase(unittest.TestCase):
Dir_test('./.', '.', sub_dir, sub)
Dir_test('foo/./bar', 'foo/bar/', sub_dir_foo_bar, 'foo/')
- d1 = lookup(Dir, 'd1')
+ d1 = SCons.Node.FS.lookup(SCons.Node.FS.Dir, 'd1')
- f1 = lookup(File, 'f1', directory = d1)
+ f1 = SCons.Node.FS.lookup(SCons.Node.FS.File, 'f1', directory = d1)
assert(f1.path == 'd1/f1')
try:
- f2 = lookup(File, 'f1/f2', directory = d1)
+ f2 = SCons.Node.FS.lookup(SCons.Node.FS.File, 'f1/f2', directory = d1)
except TypeError, x:
node = x.args[0]
assert(node.path == 'd1/f1')
@@ -74,7 +74,7 @@ class FSTestCase(unittest.TestCase):
raise
try:
- dir = lookup(Dir, 'd1/f1')
+ dir = SCons.Node.FS.lookup(SCons.Node.FS.Dir, 'd1/f1')
except TypeError, x:
node = x.args[0]
assert(node.path == 'd1/f1')
diff --git a/src/scons/Node/NodeTests.py b/src/engine/SCons/Node/NodeTests.py
index 46292bc..2249a96 100644
--- a/src/scons/Node/NodeTests.py
+++ b/src/engine/SCons/Node/NodeTests.py
@@ -4,7 +4,7 @@ import os
import sys
import unittest
-from scons.Node import Node
+import SCons.Node
@@ -22,7 +22,7 @@ class NodeTestCase(unittest.TestCase):
def test_build(self):
"""Test building a node
"""
- node = Node()
+ node = SCons.Node.Node()
node.builder_set(Builder())
node.path = "xxx" # XXX FAKE SUBCLASS ATTRIBUTE
node.sources = "yyy" # XXX FAKE SUBCLASS ATTRIBUTE
@@ -32,7 +32,7 @@ class NodeTestCase(unittest.TestCase):
def test_builder_set(self):
"""Test setting a Node's Builder
"""
- node = Node()
+ node = SCons.Node.Node()
b = Builder()
node.builder_set(b)
assert node.builder == b
diff --git a/src/scons/Node/__init__.py b/src/engine/SCons/Node/__init__.py
index e4eb45a..fb77c65 100644
--- a/src/scons/Node/__init__.py
+++ b/src/engine/SCons/Node/__init__.py
@@ -1,6 +1,6 @@
-"""scons.Node
+"""SCons.Node
-The Node package for the scons software construction utility.
+The Node package for the SCons software construction utility.
"""
diff --git a/src/scons/Node/.aeignore b/src/engine/SCons/Scanner/.aeignore
index 43fe851..43fe851 100644
--- a/src/scons/Node/.aeignore
+++ b/src/engine/SCons/Scanner/.aeignore
diff --git a/src/scons/Scanner/C.py b/src/engine/SCons/Scanner/C.py
index fcb3a46..ce6f9c6 100644
--- a/src/scons/Scanner/C.py
+++ b/src/engine/SCons/Scanner/C.py
@@ -1,4 +1,4 @@
-"""scons.Scanner.C
+"""SCons.Scanner.C
This module implements the depenency scanner for C/C++ code.
@@ -7,7 +7,7 @@ This module implements the depenency scanner for C/C++ code.
__revision__ = "Scanner/C.py __REVISION__ __DATE__ __DEVELOPER__"
-import scons.Scanner
+import SCons.Scanner
import re
import os.path
@@ -16,7 +16,7 @@ quote_re = re.compile('^[ \t]*#[ \t]*include[ \t]+"([\\w./\\\\]+)"', re.M)
def CScan():
"Return a Scanner instance for scanning C/C++ source files"
- return scons.Scanner.Scanner(scan)
+ return SCons.Scanner.Scanner(scan)
def find_files(filenames, paths):
"""
diff --git a/src/scons/Scanner/CTests.py b/src/engine/SCons/Scanner/CTests.py
index 326e9b8..6a85120 100644
--- a/src/scons/Scanner/CTests.py
+++ b/src/engine/SCons/Scanner/CTests.py
@@ -1,11 +1,11 @@
__revision__ = "Scanner/CTests.py __REVISION__ __DATE__ __DEVELOPER__"
-from TestCmd import TestCmd
-import scons.Scanner.C
+import TestCmd
+import SCons.Scanner.C
import unittest
import sys
-test = TestCmd(workdir = '')
+test = TestCmd.TestCmd(workdir = '')
# create some source files and headers:
@@ -75,7 +75,7 @@ def deps_match(deps, headers):
class CScannerTestCase1(unittest.TestCase):
def runTest(self):
env = DummyEnvironment
- s = scons.Scanner.C.CScan()
+ s = SCons.Scanner.C.CScan()
deps = s.scan(test.workpath('f1.cpp'), env)
self.failUnless(deps_match(deps, ['f1.h', 'f2.h']))
@@ -83,7 +83,7 @@ class CScannerTestCase2(unittest.TestCase):
def runTest(self):
env = DummyEnvironment
env.CPPPATH = [test.workpath("d1")]
- s = scons.Scanner.C.CScan()
+ s = SCons.Scanner.C.CScan()
deps = s.scan(test.workpath('f1.cpp'), env)
headers = ['f1.h', 'd1/f2.h']
self.failUnless(deps_match(deps, headers))
@@ -92,7 +92,7 @@ class CScannerTestCase3(unittest.TestCase):
def runTest(self):
env = DummyEnvironment
env.CPPPATH = [test.workpath("d1")]
- s = scons.Scanner.C.CScan()
+ s = SCons.Scanner.C.CScan()
deps = s.scan(test.workpath('f2.cpp'), env)
headers = ['f1.h', 'd1/f2.h', 'd1/d2/f1.h']
self.failUnless(deps_match(deps, headers))
@@ -102,7 +102,7 @@ class CScannerTestCase4(unittest.TestCase):
def runTest(self):
env = DummyEnvironment
env.CPPPATH = [test.workpath("d1"), test.workpath("d1/d2")]
- s = scons.Scanner.C.CScan()
+ s = SCons.Scanner.C.CScan()
deps = s.scan(test.workpath('f2.cpp'), env)
headers = ['f1.h', 'd1/f2.h', 'd1/d2/f1.h', 'd1/d2/f4.h']
self.failUnless(deps_match(deps, headers))
@@ -110,7 +110,7 @@ class CScannerTestCase4(unittest.TestCase):
class CScannerTestCase5(unittest.TestCase):
def runTest(self):
env = DummyEnvironment
- s = scons.Scanner.C.CScan()
+ s = SCons.Scanner.C.CScan()
deps = s.scan(test.workpath('f3.cpp'), env)
headers = ['f1.h', 'f2.h', 'f3.h', 'd1/f1.h', 'd1/f2.h', 'd1/f3.h']
self.failUnless(deps_match(deps, headers))
diff --git a/src/scons/Scanner/ScannerTests.py b/src/engine/SCons/Scanner/ScannerTests.py
index 9761cd0..9c7163d 100644
--- a/src/scons/Scanner/ScannerTests.py
+++ b/src/engine/SCons/Scanner/ScannerTests.py
@@ -1,7 +1,7 @@
__revision__ = "Scanner/ScannerTests.py __REVISION__ __DATE__ __DEVELOPER__"
import unittest
-import scons.Scanner
+import SCons.Scanner
import sys
class ScannerTestBase:
@@ -36,7 +36,7 @@ class DummyEnvironment:
class ScannerPositionalTestCase(ScannerTestBase, unittest.TestCase):
"Test the Scanner class using the position argument"
def runTest(self):
- s = scons.Scanner.Scanner(self.func)
+ s = SCons.Scanner.Scanner(self.func)
env = DummyEnvironment()
env.VARIABLE = "var1"
self.test(s, env, 'f1.cpp', ['f1.h', 'f1.hpp'])
@@ -44,7 +44,7 @@ class ScannerPositionalTestCase(ScannerTestBase, unittest.TestCase):
class ScannerKeywordTestCase(ScannerTestBase, unittest.TestCase):
"Test the Scanner class using the keyword argument"
def runTest(self):
- s = scons.Scanner.Scanner(function = self.func)
+ s = SCons.Scanner.Scanner(function = self.func)
env = DummyEnvironment()
env.VARIABLE = "var2"
self.test(s, env, 'f2.cpp', ['f2.h', 'f2.hpp'])
@@ -53,7 +53,7 @@ class ScannerPositionalArgumentTestCase(ScannerTestBase, unittest.TestCase):
"Test the Scanner class using the position argument and optional argument"
def runTest(self):
arg = "this is the argument"
- s = scons.Scanner.Scanner(self.func, arg)
+ s = SCons.Scanner.Scanner(self.func, arg)
env = DummyEnvironment()
env.VARIABLE = "var3"
self.test(s, env, 'f3.cpp', ['f3.h', 'f3.hpp'], arg)
@@ -62,7 +62,7 @@ class ScannerKeywordArgumentTestCase(ScannerTestBase, unittest.TestCase):
"Test the Scanner class using the keyword argument and optional argument"
def runTest(self):
arg = "this is another argument"
- s = scons.Scanner.Scanner(function = self.func, argument = arg)
+ s = SCons.Scanner.Scanner(function = self.func, argument = arg)
env = DummyEnvironment()
env.VARIABLE = "var4"
self.test(s, env, 'f4.cpp', ['f4.h', 'f4.hpp'], arg)
diff --git a/src/scons/Scanner/__init__.py b/src/engine/SCons/Scanner/__init__.py
index 7ce602c..225c7f3 100644
--- a/src/scons/Scanner/__init__.py
+++ b/src/engine/SCons/Scanner/__init__.py
@@ -1,6 +1,6 @@
-"""scons.Scanner
+"""SCons.Scanner
-The Scanner package for the scons software construction utility.
+The Scanner package for the SCons software construction utility.
"""
diff --git a/src/scons/.aeignore b/src/engine/SCons/Sig/.aeignore
index 43fe851..43fe851 100644
--- a/src/scons/.aeignore
+++ b/src/engine/SCons/Sig/.aeignore
diff --git a/src/scons/Sig/MD5.py b/src/engine/SCons/Sig/MD5.py
index 36e4230..9d461d9 100644
--- a/src/scons/Sig/MD5.py
+++ b/src/engine/SCons/Sig/MD5.py
@@ -1,6 +1,6 @@
-"""scons.Sig.MD5
+"""SCons.Sig.MD5
-The MD5 signature package for the scons software construction
+The MD5 signature package for the SCons software construction
utility.
"""
@@ -16,7 +16,7 @@ def hexdigest(s):
"""Return a signature as a string of hex characters.
"""
# NOTE: This routine is a method in the Python 2.0 interface
- # of the native md5 module, but we want scons to operate all
+ # of the native md5 module, but we want SCons to operate all
# the way back to at least Python 1.5.2, which doesn't have it.
h = string.hexdigits
r = ''
diff --git a/src/scons/Sig/MD5Tests.py b/src/engine/SCons/Sig/MD5Tests.py
index efcec7f..ac67f1d 100644
--- a/src/scons/Sig/MD5Tests.py
+++ b/src/engine/SCons/Sig/MD5Tests.py
@@ -3,7 +3,7 @@ __revision__ = "Sig/MD5Tests.py __REVISION__ __DATE__ __DEVELOPER__"
import sys
import unittest
-import scons.Sig.MD5
+import SCons.Sig.MD5
@@ -18,11 +18,11 @@ class my_obj:
def signature(self):
if not self.sig:
- self.sig = scons.Sig.MD5.signature(self.value)
+ self.sig = SCons.Sig.MD5.signature(self.value)
return self.sig
def current(self, sig):
- return scons.Sig.MD5.current(self, sig)
+ return SCons.Sig.MD5.current(self, sig)
@@ -40,9 +40,9 @@ class MD5TestCase(unittest.TestCase):
Simple comparison of different "signature" values.
"""
o111 = my_obj(value = '111')
- assert not o111.current(scons.Sig.MD5.signature('110'))
- assert o111.current(scons.Sig.MD5.signature('111'))
- assert not o111.current(scons.Sig.MD5.signature('112'))
+ assert not o111.current(SCons.Sig.MD5.signature('110'))
+ assert o111.current(SCons.Sig.MD5.signature('111'))
+ assert not o111.current(SCons.Sig.MD5.signature('112'))
def test_set(self):
pass # XXX
@@ -56,9 +56,9 @@ class MD5TestCase(unittest.TestCase):
o1 = my_obj(value = '111')
o2 = my_obj(value = '222')
o3 = my_obj(value = '333')
- assert '698d51a19d8a121ce581499d7b701668' == scons.Sig.MD5.collect(o1)
- assert '8980c988edc2c78cc43ccb718c06efd5' == scons.Sig.MD5.collect(o1, o2)
- assert '53fd88c84ff8a285eb6e0a687e55b8c7' == scons.Sig.MD5.collect(o1, o2, o3)
+ assert '698d51a19d8a121ce581499d7b701668' == SCons.Sig.MD5.collect(o1)
+ assert '8980c988edc2c78cc43ccb718c06efd5' == SCons.Sig.MD5.collect(o1, o2)
+ assert '53fd88c84ff8a285eb6e0a687e55b8c7' == SCons.Sig.MD5.collect(o1, o2, o3)
def test_signature(self):
pass # XXX
diff --git a/src/scons/Sig/TimeStamp.py b/src/engine/SCons/Sig/TimeStamp.py
index cab44bf..b821742 100644
--- a/src/scons/Sig/TimeStamp.py
+++ b/src/engine/SCons/Sig/TimeStamp.py
@@ -1,6 +1,6 @@
-"""scons.Sig.TimeStamp
+"""SCons.Sig.TimeStamp
-The TimeStamp signature package for the scons software construction
+The TimeStamp signature package for the SCons software construction
utility.
"""
diff --git a/src/scons/Sig/TimeStampTests.py b/src/engine/SCons/Sig/TimeStampTests.py
index 4fb1920..4cc72e4 100644
--- a/src/scons/Sig/TimeStampTests.py
+++ b/src/engine/SCons/Sig/TimeStampTests.py
@@ -3,7 +3,7 @@ __revision__ = "Sig/TimeStampTests.py __REVISION__ __DATE__ __DEVELOPER__"
import sys
import unittest
-import scons.Sig.TimeStamp
+import SCons.Sig.TimeStamp
@@ -37,9 +37,9 @@ class TimeStampTestCase(unittest.TestCase):
Simple comparison of different timestamp values.
"""
o1 = my_obj(value = 111)
- assert scons.Sig.TimeStamp.current(o1, 110)
- assert scons.Sig.TimeStamp.current(o1, 111)
- assert not scons.Sig.TimeStamp.current(o1, 112)
+ assert SCons.Sig.TimeStamp.current(o1, 110)
+ assert SCons.Sig.TimeStamp.current(o1, 111)
+ assert not SCons.Sig.TimeStamp.current(o1, 112)
def test_set(self):
pass # XXX
@@ -54,9 +54,9 @@ class TimeStampTestCase(unittest.TestCase):
o1 = my_obj(value = 111)
o2 = my_obj(value = 222)
o3 = my_obj(value = 333)
- assert 111 == scons.Sig.TimeStamp.collect(o1)
- assert 222 == scons.Sig.TimeStamp.collect(o1, o2)
- assert 333 == scons.Sig.TimeStamp.collect(o1, o2, o3)
+ assert 111 == SCons.Sig.TimeStamp.collect(o1)
+ assert 222 == SCons.Sig.TimeStamp.collect(o1, o2)
+ assert 333 == SCons.Sig.TimeStamp.collect(o1, o2, o3)
def test_signature(self):
pass # XXX
diff --git a/src/scons/Sig/__init__.py b/src/engine/SCons/Sig/__init__.py
index 411a94b..c3b06ed 100644
--- a/src/scons/Sig/__init__.py
+++ b/src/engine/SCons/Sig/__init__.py
@@ -1,6 +1,6 @@
-"""scons.Sig
+"""SCons.Sig
-The Signature package for the scons software construction utility.
+The Signature package for the SCons software construction utility.
"""
diff --git a/src/scons/__init__.py b/src/engine/SCons/__init__.py
index 9e279c2..56c5fad 100644
--- a/src/scons/__init__.py
+++ b/src/engine/SCons/__init__.py
@@ -1,6 +1,6 @@
-"""scons
+"""SCons
-The main package for the scons software construction utility.
+The main package for the SCons software construction utility.
"""
diff --git a/src/scons/exitfuncs.py b/src/engine/SCons/exitfuncs.py
index e26a031..86d1990 100644
--- a/src/scons/exitfuncs.py
+++ b/src/engine/SCons/exitfuncs.py
@@ -1,6 +1,6 @@
-"""scons.exitfuncs
+"""SCons.exitfuncs
-Register functions which are executed when scons exits for any reason.
+Register functions which are executed when SCons exits for any reason.
"""
diff --git a/src/engine/setup.py b/src/engine/setup.py
new file mode 100644
index 0000000..10fbef5
--- /dev/null
+++ b/src/engine/setup.py
@@ -0,0 +1,16 @@
+__revision__ = "setup.py __REVISION__ __DATE__ __DEVELOPER__"
+
+from string import join, split
+
+from distutils.core import setup
+
+setup(name = "scons-pylib",
+ version = "__VERSION__",
+ description = "scons",
+ author = "Steven Knight",
+ author_email = "knight@baldmt.com",
+ url = "http://www.scons.org/",
+ packages = ["SCons",
+ "SCons.Node",
+ "SCons.Scanner",
+ "SCons.Sig"])
diff --git a/src/script/MANIFEST b/src/script/MANIFEST
new file mode 100644
index 0000000..98e74a0
--- /dev/null
+++ b/src/script/MANIFEST
@@ -0,0 +1,3 @@
+MANIFEST
+scons.py
+setup.py
diff --git a/src/scons.py b/src/script/scons.py
index 78cfece..d433773 100644
--- a/src/scons.py
+++ b/src/script/scons.py
@@ -11,11 +11,16 @@ import string
import sys
import traceback
-from scons.Node.FS import init, Dir, File, lookup
-from scons.Environment import Environment
-import scons.Job
-from scons.Builder import Builder
-from scons.Errors import *
+import SCons.Node.FS
+import SCons.Job
+from SCons.Errors import *
+
+#
+# Modules and classes that we don't use directly in this script, but
+# which we want available for use in SConstruct and SConscript files.
+#
+from SCons.Environment import Environment
+from SCons.Builder import Builder
class Task:
"XXX: this is here only until the build engine is implemented"
@@ -361,7 +366,7 @@ def options_init():
help = "Don't build; list files and where defined.")
def opt_n(opt, arg):
- scons.Builder.execute_actions = None
+ SCons.Builder.execute_actions = None
Option(func = opt_n,
short = 'n', long = ['no-exec', 'just-print', 'dry-run', 'recon'],
@@ -392,7 +397,7 @@ def options_init():
help = "Build dependencies in random order.")
def opt_s(opt, arg):
- scons.Builder.print_actions = None
+ SCons.Builder.print_actions = None
Option(func = opt_s,
short = 's', long = ['silent', 'quiet'],
@@ -496,7 +501,7 @@ def main():
# XXX The commented-out code here adds any "scons" subdirs in anything
# along sys.path to sys.path. This was an attempt at setting up things
- # so we can import "node.FS" instead of "scons.Node.FS". This doesn't
+ # so we can import "node.FS" instead of "SCons.Node.FS". This doesn't
# quite fit our testing methodology, though, so save it for now until
# the right solutions pops up.
#
@@ -512,7 +517,7 @@ def main():
sys.path = include_dirs + sys.path
# initialize node factory
- init()
+ SCons.Node.FS.init()
while Scripts:
file, Scripts = Scripts[0], Scripts[1:]
@@ -532,9 +537,11 @@ def main():
PrintUsage()
sys.exit(0)
- taskmaster = Taskmaster(map(lambda x: lookup(File, x), targets))
+ taskmaster = Taskmaster(map(
+ lambda x: SCons.Node.FS.lookup(SCons.Node.FS.File, x),
+ targets))
- jobs = scons.Job.Jobs(num_jobs, taskmaster)
+ jobs = SCons.Job.Jobs(num_jobs, taskmaster)
jobs.start()
jobs.wait()
diff --git a/src/setup.py b/src/script/setup.py
index ad93cac..8732e3b 100644
--- a/src/setup.py
+++ b/src/script/setup.py
@@ -10,5 +10,4 @@ setup(name = "scons",
author = "Steven Knight",
author_email = "knight@baldmt.com",
url = "http://www.baldmt.com/scons",
- packages = ["scons"],
scripts = ["scons.py"])