+__COPYRIGHT__
+
Here you'll find plain text documentation of how to handle various SCons
project procedures. Files contained herein:
distributing aedist change sets, and updating the CVS repository
on SourceForge.
+new-platform.txt
+ Steps to add a new Platform/*.py file. This is probably out
+ of date.
+
+new-script.txt
+ Steps to add a new script or utility (like scons and sconsign)
+ to what we ship.
+
+new-tool.txt
+ Steps to add a new Tool/*.py file. This is probably out of date.
+
release.txt
Steps to go through when releasing a new version of SCons.
+
+subrelease.txt
+ Steps to go through when releasing a new subsidiary version
+ of SCons--for example, 0.95.1 after we've released 0.95.
+ So far, we've only done this to get some early testing on major
+ refactorings.
+__COPYRIGHT__
+
Handling a change set:
-- Start the change:
+__COPYRIGHT__
+
Adding a new Platform to the SCons distribution:
-- Add the following files (aenf):
+__COPYRIGHT__
+
Steps for adding a new script/utility to the SCons packages. Assume
that you're creating a new man page, too. In the template steps
below, "newscript" is the name of the new script/utility being added.
+__COPYRIGHT__
+
Adding a new Tool to the SCons distribution:
-- Add the following files (aenf):
+__COPYRIGHT__
+
This document covers how to prepare major releases of SCons--that is,
releases numbered with X.Y format, such as 0.93, 1.0, etc.
aecp rpm/scons.spec.in
vi rpm/scons.spec.in
+ aecp src/copyrightTests.py
+ vi src/copyrightTests.py
+
aecp src/setupTests.py
vi src/setupTests.py
project = 'scons'
default_version = '0.95'
-copyright = "Copyright (c) %s Steven Knight" % copyright_years
+copyright = "Copyright (c) %s The SCons Foundation" % copyright_years
Default('.')
#!/usr/bin/env python
#
+# __COPYRIGHT__
+#
# Count statistics about SCons test and source files. This must be run
# against a fully-populated tree (for example, one that's been freshly
# checked out).
#
-# A test file is anything under the src/ directory that ends in
-# 'Tests.py', or anything under the test/ directory that ends in '.py'.
+# A test file is anything under the src/ directory that begins with
+# 'test_' or ends in 'Tests.py', or anything under the test/ directory
+# that ends in '.py'. Note that runtest.py script does *not*, by default,
+# consider the files that begin with 'test_' to be tests, because they're
+# tests of SCons packaging and installation, not functional tests of
+# SCons code.
#
# A source file is anything under the src/engine/ or src/script/
-# directories that ends in '.py' but does NOT end in 'Tests.py'. (We
-# should probably ignore the stuff in src/engine/SCons/Optik, since it
-# doesn't originate with SCons, but what the hell.)
+# directories that ends in '.py' but does NOT begin with 'test_'
+# or end in 'Tests.py'. (We should probably ignore the stuff in
+# src/engine/SCons/Optik, since it doesn't originate with SCons, but
+# what the hell.)
#
# We report the number of tests and sources, the total number of lines
# in each category, the number of non-blank lines, and the number of
# interesting one for most purposes.
#
+__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
+
import os.path
import string
tests = []
sources = []
+def is_test(x):
+ return x[:5] == 'test_' or x[-8:] == 'Tests.py'
+def is_python(x):
+ return x[-3:] == '.py'
+
def t(arg, dirname, names):
- names = filter(lambda n: n[-8:] == 'Tests.py', names)
+ names = filter(is_test, names)
arg.extend(map(lambda n, d=dirname: os.path.join(d, n), names))
os.path.walk('src', t, tests)
def p(arg, dirname, names):
- names = filter(lambda n: n[-3:] == '.py', names)
+ names = filter(is_python, names)
arg.extend(map(lambda n, d=dirname: os.path.join(d, n), names))
os.path.walk('test', p, tests)
def s(arg, dirname, names):
- names = filter(lambda n: n[-3:] == '.py' and n[-8:] != 'Tests.py', names)
+ names = filter(lambda n: is_python(n) and not is_test(n), names)
arg.extend(map(lambda n, d=dirname: os.path.join(d, n), names))
os.path.walk('src/engine', s, sources)
os.path.walk('src/script', s, sources)
"""
#
-# Copyright (c) 2001, 2002, 2003 Steven Knight
+# __COPYRIGHT__
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
#
#
-# Copyright (c) 2001, 2002, 2003 Steven Knight
+# __COPYRIGHT__
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
.fi
.RE
..
-.TH SCONS 1 "November 2003"
+.TH SCONS 1 "August 2004"
.SH NAME
scons \- a software construction tool
.SH SYNOPSIS
-.\" Copyright (c) 2001, 2002, 2003 Steven Knight
+.\" __COPYRIGHT__
.\"
.\" Permission is hereby granted, free of charge, to any person obtaining
.\" a copy of this software and associated documentation files (the
.\" OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
.\" WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
.\"
-.\" doc/man/scons.1 0.90.D006 2003/07/02 09:02:19 knight
+.\" __FILE__ __REVISION__ __DATE__ __DEVELOPER__
.\"
.\" ES - Example Start - indents and turns off line fill
.de ES
.RE
.fi
..
-.TH SCONSIGN 1 "September 2003"
+.TH SCONSIGN 1 "August 2004"
.SH NAME
sconsign \- print SCons .sconsign file information
.SH SYNOPSIS
Version: %{version}
Release: %{release}
Source0: %{name}-%{version}.tar.gz
-#Copyright: Steven Knight
+#Copyright: The SCons Foundation
License: MIT, freely distributable
Group: Development/Tools
BuildRoot: %{_tmppath}/%{name}-buildroot
#!/usr/bin/env python
#
+# __COPYRIGHT__
+#
# runtest.py - wrapper script for running SCons tests
#
# This script mainly exists to set PYTHONPATH to the right list of
for g in glob.glob(a):
tests.append(Test(g))
elif all:
+ # Find all of the SCons functional tests in the local directory
+ # tree. This is anything under the 'src' subdirectory that ends
+ # with 'Tests.py', or any Python script (*.py) under the 'test'
+ # subdirectory.
+ #
+ # Note that there are some tests under 'src' that *begin* with
+ # 'test_', but they're packaging and installation tests, not
+ # functional tests, so we don't execute them by default. (They can
+ # still be executed by hand, though, and are routinely executed
+ # by the Aegis packaging build to make sure that we're building
+ # things correctly.)
tdict = {}
- def find_Test_py(arg, dirname, names, tdict=tdict):
+ def find_Tests_py(arg, dirname, names, tdict=tdict):
for n in filter(lambda n: n[-8:] == "Tests.py", names):
t = os.path.join(dirname, n)
if not tdict.has_key(t):
tdict[t] = Test(t)
- os.path.walk('src', find_Test_py, 0)
+ os.path.walk('src', find_Tests_py, 0)
def find_py(arg, dirname, names, tdict=tdict):
for n in filter(lambda n: n[-3:] == ".py", names):
selection method.
"""
-__revision__ = ""
+
+#
+# __COPYRIGHT__
+#
+# Permission is hereby granted, free of charge, to any person obtaining
+# a copy of this software and associated documentation files (the
+# "Software"), to deal in the Software without restriction, including
+# without limitation the rights to use, copy, modify, merge, publish,
+# distribute, sublicense, and/or sell copies of the Software, and to
+# permit persons to whom the Software is furnished to do so, subject to
+# the following conditions:
+#
+# The above copyright notice and this permission notice shall be included
+# in all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
+# KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
+# WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+#
+
+__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
import os.path
selection method.
"""
-__revision__ = ""
+
+#
+# __COPYRIGHT__
+#
+# Permission is hereby granted, free of charge, to any person obtaining
+# a copy of this software and associated documentation files (the
+# "Software"), to deal in the Software without restriction, including
+# without limitation the rights to use, copy, modify, merge, publish,
+# distribute, sublicense, and/or sell copies of the Software, and to
+# permit persons to whom the Software is furnished to do so, subject to
+# the following conditions:
+#
+# The above copyright notice and this permission notice shall be included
+# in all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
+# KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
+# WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+#
+
+__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
import os.path
+REM __COPYRIGHT__
+REM __FILE__ __REVISION__ __DATE__ __DEVELOPER__
@echo off
if "%OS%" == "Windows_NT" goto WinNT
REM for 9x/Me you better not have more than 9 args
--- /dev/null
+#!/usr/bin/env python
+#
+# __COPYRIGHT__
+#
+# Permission is hereby granted, free of charge, to any person obtaining
+# a copy of this software and associated documentation files (the
+# "Software"), to deal in the Software without restriction, including
+# without limitation the rights to use, copy, modify, merge, publish,
+# distribute, sublicense, and/or sell copies of the Software, and to
+# permit persons to whom the Software is furnished to do so, subject to
+# the following conditions:
+#
+# The above copyright notice and this permission notice shall be included
+# in all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
+# KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
+# WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+#
+
+__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
+
+"""
+Verify that we have proper Copyright notices on all the right files
+in our distributions.
+
+Note that this is a packaging test, not a functional test, so the
+name of this script doesn't end in *Tests.py.
+"""
+
+import os
+import os.path
+import re
+import string
+
+import TestSCons
+
+test = TestSCons.TestSCons()
+
+try:
+ cwd = os.environ['SCONS_CWD']
+except KeyError:
+ cwd = os.getcwd()
+
+class Collect:
+ expression = re.compile('Copyright.*The SCons Foundation')
+ def __init__(self, remove_list):
+ self.copyright = []
+ self.no_copyright = []
+ self.remove_list = remove_list
+
+def visit(collect, dirname, names):
+ for r in collect.remove_list:
+ try:
+ names.remove(r)
+ except ValueError:
+ pass
+ for name in map(lambda n, d=dirname: os.path.join(d, n), names):
+ if not os.path.isfile(name):
+ continue
+ if collect.expression.search(open(name, 'r').read()):
+ collect.copyright.append(name)
+ else:
+ collect.no_copyright.append(name)
+
+remove_list = [
+ 'build',
+ 'debian',
+ 'dist',
+ 'Optik',
+ 'dblite.py',
+ 'Conftest.py',
+ 'os_spawnv_fix.diff',
+ 'setup.cfg',
+]
+
+# XXX Remove '*-stamp' when we get rid of those.
+scons = Collect(remove_list + ['MANIFEST', 'build-stamp', 'configure-stamp'])
+# XXX Remove '.sconsign' when we start using SConsignFile() for SCons builds.
+local = Collect(remove_list + ['.sconsign'])
+# XXX Remove 'doc' when we take care of those Copyright statements.
+src = Collect(remove_list + ['bin', 'doc', 'etc', 'gentoo', 'config', 'MANIFEST.in'])
+
+build_scons = os.path.join(cwd, 'build', 'scons')
+build_local = os.path.join(cwd, 'build', 'scons-local')
+build_src = os.path.join(cwd, 'build', 'scons-src')
+
+no_result = []
+
+if os.path.exists(build_scons):
+ os.path.walk(build_scons, visit, scons)
+else:
+ no_result.append(build_scons)
+
+if os.path.exists(build_local):
+ os.path.walk(build_local, visit, local)
+else:
+ no_result.append(build_local)
+
+if os.path.exists(build_src):
+ os.path.walk(build_src, visit, src)
+else:
+ no_result.append(build_src)
+
+no_copyright = scons.no_copyright + local.no_copyright + src.no_copyright
+
+if no_copyright:
+ print "Found the following files with no copyrights:"
+ print "\t" + string.join(no_copyright, "\n\t")
+ test.fail_test(1)
+
+if no_result:
+ print "Cannot check copyrights, the following have apparently not been built:"
+ print "\t" + string.join(no_result, "\n\t")
+ test.no_result(1)
+
+# All done.
+test.pass_test()
"""
Test how the setup.py script installs SCons (specifically, its libraries).
+
+Note that this is an installation test, not a functional test, so the
+name of this script doesn't end in *Tests.py.
"""
import os