Change the copyright statement to reflect ownership by the foundation. Add and fix...
authorstevenknight <stevenknight@fdb21ef1-2011-0410-befe-b5e4ea1792b1>
Fri, 30 Jul 2004 22:32:56 +0000 (22:32 +0000)
committerstevenknight <stevenknight@fdb21ef1-2011-0410-befe-b5e4ea1792b1>
Fri, 30 Jul 2004 22:32:56 +0000 (22:32 +0000)
git-svn-id: http://scons.tigris.org/svn/scons/trunk@1018 fdb21ef1-2011-0410-befe-b5e4ea1792b1

19 files changed:
HOWTO/README
HOWTO/change.txt
HOWTO/new-platform.txt
HOWTO/new-script.txt
HOWTO/new-tool.txt
HOWTO/release.txt
SConstruct
bin/linecount
bootstrap.py
doc/SConscript
doc/man/scons.1
doc/man/sconsign.1
rpm/scons.spec.in
runtest.py
src/engine/SCons/Tool/aixc++.py
src/engine/SCons/Tool/sunc++.py
src/script/scons.bat
src/test_copyrights.py [new file with mode: 0644]
src/test_setup.py [moved from src/setupTests.py with 97% similarity]

index cda76066ac5edf323bab26b735ee78ccef48fbe3..951c019f9b22720e6ecde4f70403140f15b5d478 100644 (file)
@@ -1,3 +1,5 @@
+__COPYRIGHT__
+
 Here you'll find plain text documentation of how to handle various SCons
 project procedures.  Files contained herein:
 
@@ -6,5 +8,22 @@ change.txt
         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.
index 049e8ebdda77b5af223d8e8c02960e13e723d538..86e854d943bc39b9ad619d2bdb796e346e604dc6 100644 (file)
@@ -1,3 +1,5 @@
+__COPYRIGHT__
+
 Handling a change set:
 
     -- Start the change:
index 7e2fce8b73d4faf39a5300d28c0ecb1eeea66a6e..8aa11ec2a5e9bfb3e9349e241d9ccb91a063b581 100644 (file)
@@ -1,3 +1,5 @@
+__COPYRIGHT__
+
 Adding a new Platform to the SCons distribution:
 
     --  Add the following files (aenf):
index 8bb52228d10638f518c12d56d854890431c7c987..f859c485df6c4e48fc0252afc91098a4e28aeb59 100644 (file)
@@ -1,3 +1,5 @@
+__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.
index c906b7fb349ea898e6a123c8e9adb30eb27501ab..4297fe6e554ca55213b7391ece09fb9ce35cb29f 100644 (file)
@@ -1,3 +1,5 @@
+__COPYRIGHT__
+
 Adding a new Tool to the SCons distribution:
 
     --  Add the following files (aenf):
index 5b77b6320afc9f934d642c0dc7070483cd6aa6e5..51dfb704404c695579d6c9e2a3bb05b8d2bde200 100644 (file)
@@ -1,3 +1,5 @@
+__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.
 
@@ -91,6 +93,9 @@ Things to do to release a new X.Y version of SCons:
                 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
 
index 082209512459512f0ce168b2cae9fd1590869924..a3e0903dfa4edb07c31a3e1c51e7c0336e36eed9 100644 (file)
@@ -40,7 +40,7 @@ import time
 
 project = 'scons'
 default_version = '0.95'
-copyright = "Copyright (c) %s Steven Knight" % copyright_years
+copyright = "Copyright (c) %s The SCons Foundation" % copyright_years
 
 Default('.')
 
index e344e2a2a8661c801255ee92022d284690122853..765309ef5d1ee6f8c2e61e3bc578377209a43dca 100644 (file)
@@ -1,16 +1,23 @@
 #!/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)
index 96d92aaa38d3fa9d3a7cfa22d2bb26313ec106e8..c6a7db3a68cd28f7452637ad7afc3b81f237bc03 100644 (file)
@@ -16,7 +16,7 @@ local SConstruct file.
 """
 
 #
-# 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
index 976e0a611de7ca14a20bc6c430e8440299ac7ae3..d33712b70eee6906022ca91f295f186055f6125f 100644 (file)
@@ -3,7 +3,7 @@
 #
 
 #
-# 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
index 9dff843a0761dca73cf7069e8d4ccae741daef56..135e5f72505f1c79ebf04ca24ac983268827fb89 100644 (file)
@@ -31,7 +31,7 @@
 .fi
 .RE
 ..
-.TH SCONS 1 "November 2003"
+.TH SCONS 1 "August 2004"
 .SH NAME
 scons \- a software construction tool
 .SH SYNOPSIS
index 079e7ff1e92b3e235ef8cbf2aaef3344b0735170..dc6d0cb5b620ab5c068cfb0063d2cd17eb3d86b8 100644 (file)
@@ -1,4 +1,4 @@
-.\" 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
@@ -19,7 +19,7 @@
 .\" 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
@@ -31,7 +31,7 @@
 .RE
 .fi
 ..
-.TH SCONSIGN 1 "September 2003"
+.TH SCONSIGN 1 "August 2004"
 .SH NAME
 sconsign \- print SCons .sconsign file information
 .SH SYNOPSIS
index aedc2685bb15c8c025f4c855646dcdf1d302d6d2..96e9b8e1b769e464420b4086c767319955aab6ae 100644 (file)
@@ -7,7 +7,7 @@ Name: %{name}
 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
index a93789d50d95be0c523dc27b24f340498c726644..df97eea289def8bf7405c29a408d569fbade8ad5 100644 (file)
@@ -1,5 +1,7 @@
 #!/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
@@ -296,14 +298,25 @@ if args:
             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):
index 5cb6639f0cc9d91cf590c352258cb8c05fd5e49f..dcc444aba16997a1d4be66234ac64eb252480211 100644 (file)
@@ -7,7 +7,31 @@ It will usually be imported through the generic SCons.Tool.Tool()
 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
 
index 673949b1731128a6f2e4fdc2840a50b64290759b..22d01dbc49a259360d202feff7d4055cfe5650af 100644 (file)
@@ -7,7 +7,31 @@ It will usually be imported through the generic SCons.Tool.Tool()
 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
 
index 782d8c48bfceff2efff83f54c0086b239062e57d..5cbfc2c0de8ddd92a2fd675dc8fc828050d5a1b6 100644 (file)
@@ -1,3 +1,5 @@
+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
diff --git a/src/test_copyrights.py b/src/test_copyrights.py
new file mode 100644 (file)
index 0000000..f239f4d
--- /dev/null
@@ -0,0 +1,122 @@
+#!/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()
similarity index 97%
rename from src/setupTests.py
rename to src/test_setup.py
index 06688af5ed45543a83f9e945995084fa302edbbd..799be78dbed4101bebfe7d245058d261dcbb3e22 100644 (file)
@@ -26,6 +26,9 @@ __revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
 
 """
 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