summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Construct295
-rw-r--r--debian/control12
-rw-r--r--debian/rules38
-rw-r--r--debian/scons.postinst27
-rw-r--r--debian/scons.prerm14
-rw-r--r--etc/Conscript5
-rw-r--r--runtest.py29
-rw-r--r--src/MANIFEST.in0
-rw-r--r--src/README.txt162
-rw-r--r--src/engine/MANIFEST.in (renamed from src/engine/MANIFEST)3
-rw-r--r--src/engine/README.txt161
-rw-r--r--src/engine/setup.cfg2
-rw-r--r--src/engine/setup.py24
-rw-r--r--src/script/MANIFEST4
-rw-r--r--src/script/MANIFEST.in1
-rw-r--r--src/script/README.txt163
-rw-r--r--src/script/scons.py6
-rw-r--r--src/script/setup.cfg2
-rw-r--r--src/script/setup.py11
-rw-r--r--src/setup.cfg2
-rw-r--r--src/setup.py72
21 files changed, 904 insertions, 129 deletions
diff --git a/Construct b/Construct
index 1c0ef75..2a1c435 100644
--- a/Construct
+++ b/Construct
@@ -46,6 +46,14 @@ sub cons::whereis {
return undef
}
+sub cons::read_file {
+ my $file = shift;
+ open(F, "<$file") || die "cannot open $file: $!";
+ my @lines = <F>;
+ close(F);
+ return wantarray ? @lines : join('', @lines);
+}
+
#
# We let the presence or absence of various utilities determine
# whether or not we bother to build certain pieces of things.
@@ -100,33 +108,30 @@ if ($platform eq "win32") {
$archsuffix = "tar.gz"
}
-
use Cwd;
-$test_dir = File::Spec->catfile(cwd, "build", "test");
+$test1_dir = File::Spec->catfile(cwd, "build", "test1");
+$test2_dir = File::Spec->catfile(cwd, "build", "test2");
-%package_name = (
- 'script' => $project,
- 'engine' => "$project-pylib",
-);
+$test1_lib_dir = File::Spec->catfile($test1_dir,
+ "lib",
+ "$project-$version");
-$test_bin_dir = File::Spec->catfile($test_dir, "bin");
-$test_lib_dir = File::Spec->catfile($test_dir,
- "lib",
- "python${python_ver}",
- "site-packages"),
+$test2_lib_dir = File::Spec->catfile($test2_dir,
+ "lib",
+ "python${python_ver}",
+ "site-packages");
-%install_dir = (
- 'script' => $test_bin_dir,
- 'engine' => $test_lib_dir,
-);
+$lib_project_ver = File::Spec->catfile("lib", "$project-$version");
+
+$unpack_dir = File::Spec->catfile(cwd, "build", "unpack");
$env = new cons( ENV => {
AEGIS_PROJECT => $ENV{AEGIS_PROJECT},
PATH => $ENV{PATH},
},
- TEST_BIN_DIR => $test_bin_dir,
- TEST_LIB_DIR => $test_lib_dir,
+ TEST1_LIB_DIR => $test1_lib_dir,
+ TEST2_LIB_DIR => $test2_lib_dir,
DATE => $date,
DEVELOPER => $developer,
@@ -146,85 +151,233 @@ $env = new cons( ENV => {
my @src_deps;
-my %src_file = (
- 'scons' => 'scons.py',
- 'LICENSE.txt' => '../LICENSE.txt'
-);
+$python_scons = {
+ 'pkg' => "python-$project",
+ 'src_subdir' => 'engine',
+ 'inst_subdir' => File::Spec->catfile("lib",
+ "python1.5",
+ "site-packages"),
+ 'prefix' => $test2_dir,
+
+ 'debian_deps' => [ qw(debian/rules debian/control
+ debian/changelog debian/copyright
+ debian/python-scons.postinst
+ debian/python-scons.prerm) ],
+
+ 'files' => [ qw(LICENSE.txt README.txt setup.cfg setup.py) ],
+ 'filemap' => {
+ 'LICENSE.txt' => '../LICENSE.txt',
+ }
+};
+
+# Supporting this is going to take some magic in src/engine/setup.py,
+# so comment it out for now.
+#$python2_scons = {
+# 'pkg' => "python2-$project",
+# 'src_subdir' => 'engine',
+# 'inst_subdir' => File::Spec->catfile("lib",
+# "python2.1",
+# "site-packages"),
+# 'prefix' => $test2_dir,
+#
+# 'debian_deps' => [ qw(debian/rules debian/control
+# debian/changelog debian/copyright
+# debian/python2-scons.postinst
+# debian/python2-scons.prerm) ],
+#
+# 'files' => [ qw(LICENSE.txt README.txt setup.cfg setup.py) ],
+# 'filemap' => {
+# 'LICENSE.txt' => '../LICENSE.txt',
+# }
+#};
+
+$scons_script = {
+ 'pkg' => "$project-script",
+ 'src_subdir' => 'script',
+ 'inst_subdir' => 'bin',
+ 'prefix' => $test2_dir,
+
+ 'debian_deps' => [ qw(debian/rules debian/control
+ debian/changelog debian/copyright
+ debian/python-scons.postinst
+ debian/python-scons.prerm) ],
+
+ 'files' => [ qw(LICENSE.txt README.txt setup.cfg setup.py) ],
+ 'filemap' => {
+ 'LICENSE.txt' => '../LICENSE.txt',
+ 'scons' => 'scons.py',
+ }
+};
+
+$scons = {
+ 'pkg' => $project,
+ 'inst_subdir' => undef,
+ 'prefix' => $test1_dir,
+
+ 'debian_deps' => [ qw(debian/rules debian/control
+ debian/changelog debian/copyright
+ debian/scons.postinst
+ debian/scons.prerm) ],
+
+ 'files' => [ qw(LICENSE.txt README.txt setup.cfg setup.py) ],
+
+ 'subpkgs' => [ $python_scons, $scons_script ],
+ 'subinst_dirs' => { "python-$project" => $lib_project_ver,
+ "$project-script" => 'bin',
+ },
+};
+
+for $p ($scons, $python_scons, $scons_script) {
+ #
+ # Initialize variables with the right directories for this package.
+ #
+ my $pkg = $p->{'pkg'};
+
+ my $src = 'src';
+ $src = File::Spec->catfile($src, $p->{'src_subdir'}) if $p->{'src_subdir'};
-for $dir ('script', 'engine') {
+ my $build = File::Spec->catfile('build', $pkg);
- my $pkg = $package_name{$dir};
- my $install = $install_dir{$dir};
+ my $prefix = $p->{'prefix'};
+ my $install = $prefix;
+ if ($p->{'inst_subdir'}) {
+ $install = File::Spec->catfile($install, $p->{'inst_subdir'});
+ }
- my $build = "build/$dir";
- my $src = "src/$dir";
+ #
+ # Read up the list of source files from our MANIFEST.in.
+ # This list should *not* include LICENSE.txt, MANIFEST,
+ # README.txt, or setup.py. Make a copy of the list for the
+ # destination files.
+ #
+ my @src_files = cons::read_file("$src/MANIFEST.in");
+ chomp(@src_files);
+ my @dst_files = map(File::Spec->catfile($install, $_), @src_files);
+
+ if ($p->{'subpkgs'}) {
+ #
+ # This package includes some sub-packages. Read up their
+ # MANIFEST.in files, and add them to our source and destination
+ # file lists, modifying them as appropriate to add the
+ # specified subdirs.
+ #
+ foreach $sp (@{$p->{'subpkgs'}}) {
+ my $ssubdir = $sp->{'src_subdir'};
+ my $isubdir = $p->{'subinst_dirs'}->{$sp->{'pkg'}};
+ my $manifest = File::Spec->catfile($src, $ssubdir, 'MANIFEST.in');
+ my @f = cons::read_file($manifest);
+ chomp(@f);
+ push(@src_files, map(File::Spec->catfile($sp->{'src_subdir'}, $_),
+ @f));
+ push(@dst_files, map(File::Spec->catfile($install, $isubdir, $_),
+ @f));
+ my $k;
+ foreach $k (keys %{$sp->{'filemap'}}) {
+ my $f = $sp->{'filemap'}->{$k};
+ next if ! defined $f;
+ $k = File::Spec->catfile($sp->{'src_subdir'}, $k);
+ $p->{'filemap'}->{$k} = File::Spec->catfile($sp->{'src_subdir'},
+ $f);
+ }
+ }
+ }
- my @files;
- chomp(@files = `cat src/$dir/MANIFEST`);
+ #
+ # Now that we have the "normal" source files, add those files
+ # that are standard for each distribution. Note that we don't
+ # add these to dst_files, because they don't get installed.
+ # And we still have the MANIFEST to add.
+ #
+ push(@src_files, @{$p->{'files'}});
#
- # Run everything in the MANIFEST through the sed command we concocted.
+ # Now run everything in src_file through the sed command we
+ # concocted to expand __FILE__, __VERSION__, etc.
#
- foreach $b (@files) {
- my $s = $src_file{$b} || $b;
+ foreach $b (@src_files) {
+ my $s = $p->{'filemap'}->{$b} || $b;
$env->Command("$build/$b", "$src/$s", "%SEDCOM");
}
#
+ # NOW, finally, we can create the MANIFEST, which we do
+ # by having Perl spit out the contents of the @src_files
+ # array we've carefully created. After we've added
+ # MANIFEST itself to the array, of course.
+ #
+ push(@src_files, "MANIFEST");
+ $env->Command("$build/MANIFEST", "$src/MANIFEST.in",
+ qq([perl] open(F, ">%>"); print F join("\\n", sort qw(@src_files)), "\\n"; close(F)));
+
+ #
# Use the Python distutils to generate the packages.
#
my $archive = "$build/dist/$pkg-$version.$archsuffix";
push(@src_deps, $archive);
- my @setup_args = ('bdist sdist');
+ my @setup_args = ('bdist', 'sdist');
- my @targets = (
+ my @build_targets = (
"$build/dist/$pkg-$version.$platform.$archsuffix",
$archive,
+ "$build/dist/$pkg-$version.win32.exe",
);
+ my @install_targets = @build_targets;
if ($rpm) {
push(@setup_args, 'bdist_rpm');
# XXX "$build/build/bdist.$platform/rpm/SOURCES/$pkg-$version.$archsuffix",
# XXX "$build/build/bdist.$platform/rpm/SPECS/$pkg.spec",
- push(@targets,
+ my @targets = (
"$build/dist/$pkg-$version-1.src.rpm",
"$build/dist/$pkg-$version-1.noarch.rpm",
);
+ push(@build_targets, @targets);
+ push(@install_targets, @targets);
};
# We can get away with calling setup.py using a directory path
# like this because we put a preamble in it that will chdir()
# to the directory in which setup.py exists.
- $env->Command([@targets],
- map("$build/$_", @files),
- qq(rm -rf $build/build $build/dist/*
- python $build/setup.py @setup_args)
- );
+ my $commands = qq(rm -rf $build/build $build/dist/*
+ python $build/setup.py @setup_args
+ python $build/setup.py bdist_wininst);
+
+ if ($dh_builddeb && $fakeroot) {
+ # Debian builds directly into build/dist, so we don't
+ # need to add the .debs to the install_targets.
+ my $deb = "build/dist/${pkg}_$version-1_all.deb";
+ push(@build_targets, $deb);
+ $env->Depends($deb, @{$p->{'debian_deps'}});
+ $commands .= qq(
+ fakeroot make -f debian/rules DH_COMPAT=$DH_COMPAT ENVOKED_BY_CONSTRUCT=1 binary-$pkg
+ env DH_COMPAT=$DH_COMPAT dh_clean);
+ }
- $env->Depends([@targets], "$build/MANIFEST");
+ #
+ # Now set up creation and installation of the packages.
+ #
+ $env->Command([@build_targets], map("$build/$_", @src_files), $commands);
- $env->Install("build/dist", @targets);
+ $env->Install("build/dist", @install_targets);
#
# Unpack the archive created by the distutils into build/unpack.
#
- my $unpack = "build/unpack";
-
- my @unpack_files = map("$unpack/$pkg-$version/$_", @files);
+ my @unpack_files = map("$unpack_dir/$pkg-$version/$_", @src_files);
# We'd like to replace the last three lines with the following:
#
- # tar zxf %< -C $unpack
+ # tar zxf %< -C $unpack_dir
#
# but that gives heartburn to Cygwin's tar, so work around it
# with separate zcat-tar-rm commands.
Command $env [@unpack_files], $archive, qq(
- rm -rf $unpack/$pkg-$version
+ rm -rf $unpack_dir/$pkg-$version
zcat %< > .temp
- tar xf .temp -C $unpack
+ tar xf .temp -C $unpack_dir
rm -f .temp
);
@@ -237,21 +390,18 @@ for $dir ('script', 'engine') {
# tests pass with what we really packaged, not because of something
# hanging around in the development directory.
#
- my %seen;
- map($seen{$_}++, "LICENSE.txt", "MANIFEST", "setup.py");
- @test_files = map(File::Spec->catfile($install, $_),
- grep(!$seen{$_}++ &&
- ($_ =~ /\.py$/ || $src_file{$_}), @files));
-
# We can get away with calling setup.py using a directory path
# like this because we put a preamble in it that will chdir()
# to the directory in which setup.py exists.
- Command $env [@test_files], @unpack_files, qq(
+ Command $env [@dst_files], @unpack_files, qq(
rm -rf $install
- python $unpack/$pkg-$version/setup.py install --prefix=$test_dir
+ python $unpack_dir/$pkg-$version/setup.py install --prefix=$prefix
);
}
+#
+# Arrange for supporting packages to be installed in the test directories.
+#
Export qw( env );
Build "etc/Conscript";
@@ -308,38 +458,3 @@ if ($change) {
));
}
}
-
-#
-# Build the Debian packages if debhelper and fakeroot are available
-#
-if ($dh_builddeb && $fakeroot){
- @deb_targets = ("build/dist/scons_$version-1_all.deb",
- "build/dist/python-scons_$version-1_all.deb",
- "build/dist/python2-scons_$version-1_all.deb"
- );
-
- @deb_deps = ("debian/rules",
- "debian/control",
- "debian/changelog",
- "debian/copyright",
- "debian/python-scons.postinst",
- "debian/python-scons.prerm",
- "debian/python2-scons.postinst",
- "debian/python2-scons.prerm"
- );
-
-
-
- chomp(@engine_files = `cat src/engine/MANIFEST`);
- chomp(@script_files = `cat src/script/MANIFEST`);
-
- $env->Command([@deb_targets],
- @deb_deps,
- map("build/engine/$_", @engine_files),
- map("build/script/$_", @script_files),
- qq(rm -rf build/engine/build build/engine/dist
- rm -rf build/script/build build/script/dist
- fakeroot make -f debian/rules DH_COMPAT=$DH_COMPAT ENVOKED_BY_CONSTRUCT=1 binary
- env DH_COMPAT=$DH_COMPAT dh_clean
- ));
-}
diff --git a/debian/control b/debian/control
index 5a5ae24..e628688 100644
--- a/debian/control
+++ b/debian/control
@@ -7,8 +7,7 @@ Build-Depends: debhelper
Package: scons
Architecture: all
-Depends: python-scons|python2-scons,python-base(>=1.5.2)|python2-base
-Suggests: python-scons, python2-scons
+Depends: python-base(>=1.5.2)|python2-base
Description: An Open Source software construction tool
SCons is an Open Source software construction tool--that is, a build tool; an
improved substitute for the classic Make utility; a better way to build
@@ -29,3 +28,12 @@ Description: SCons Python 2.0 extension modules
SCons is an Open Source software construction tool--that is, a build tool; an
improved substitute for the classic Make utility; a better way to build
software.
+
+Package: scons-script
+Architecture: all
+Depends: python-scons|python2-scons,python-base(>=1.5.2)|python2-base
+Suggests: python-scons, python2-scons
+Description: An Open Source software construction tool script
+ SCons is an Open Source software construction tool--that is, a build tool; an
+ improved substitute for the classic Make utility; a better way to build
+ software.
diff --git a/debian/rules b/debian/rules
index 38f5a8b..4ff4659 100644
--- a/debian/rules
+++ b/debian/rules
@@ -34,26 +34,37 @@ endif
clean:
dh_testdir
dh_testroot
- rm -f build-stamp configure-stamp
+ rm -f build-stamp configure-stamp install-common-stamp
rm -rf build
find -name .construct -exec rm "{}" ";"
dh_clean
-install: DH_OPTIONS=
-install: build
+install-common: install-common-stamp
+install-common-stamp: DH_OPTIONS=
+install-common-stamp:
dh_testdir
dh_testroot
dh_clean -k
dh_installdirs
- python build/engine/setup.py install \
---install-purelib=`pwd`/debian/python-scons/usr/lib/python1.5/site-packages --no-compile
+ touch install-common-stamp
- python build/script/setup.py install \
---install-scripts=`pwd`/debian/scons/usr/bin --no-compile
+install-scons: build install-common
+ python build/scons/setup.py install \
+--install-scripts=`pwd`/debian/scons/usr/bin \
+--install-purelib=`pwd`/debian/scons/usr/lib/scons-0.01 --no-compile
+
+install-python-scons: build install-common
+ python build/python-scons/setup.py install \
+--install-purelib=`pwd`/debian/python-scons/usr/lib/python1.5/site-packages --no-compile
- python build/engine/setup.py install \
+install-python2-scons: build install-common
+ python build/python2-scons/setup.py install \
--install-purelib=`pwd`/debian/python2-scons/usr/lib/python2.0/site-packages --no-compile
+install-scons-script: build install-common
+ python build/scons-script/setup.py install \
+--install-scripts=`pwd`/debian/scons/usr/bin --no-compile
+
# This single target is used to build all the packages, all at once, or
# one at a time. So keep in mind: any options passed to commands here will
@@ -82,17 +93,20 @@ binary-indep: build install
binary-arch: build install
# Any other binary targets build just one binary package at a time.
-binary-scons: build install
+binary-scons: build install-scons
$(MAKE) ENVOKED_BY_CONSTRUCT=$(ENVOKED_BY_CONSTRUCT) -f debian/rules binary-common DH_OPTIONS=-pscons
-binary-python-scons: build install
+binary-python-scons: build install-python-scons
$(MAKE) ENVOKED_BY_CONSTRUCT=$(ENVOKED_BY_CONSTRUCT) -f debian/rules binary-common DH_OPTIONS=-ppython-scons
-binary-python2-scons: build install
+binary-python2-scons: build install-python2-scons
$(MAKE) ENVOKED_BY_CONSTRUCT=$(ENVOKED_BY_CONSTRUCT) -f debian/rules binary-common DH_OPTIONS=-ppython2-scons
+binary-scons-script: build install-scons-script
+ $(MAKE) ENVOKED_BY_CONSTRUCT=$(ENVOKED_BY_CONSTRUCT) -f debian/rules binary-common DH_OPTIONS=-pscons-script
+
binary: binary-indep binary-arch
-.PHONY: build clean binary-indep binary-arch binary install binary-scons binary-python-scons binary-python2-scons
+.PHONY: build clean binary-indep binary-arch binary install binary-scons binary-python-scons binary-python2-scons binary-scons-script install-scons install-python-scons install-python2-scons install-scons-script
diff --git a/debian/scons.postinst b/debian/scons.postinst
new file mode 100644
index 0000000..34d87ab
--- /dev/null
+++ b/debian/scons.postinst
@@ -0,0 +1,27 @@
+#! /bin/sh -e
+#
+# postinst script for Debian python2 packages.
+# Written 1998 by Gregor Hoffleit <flight@debian.org>.
+# Modified for SCons 2001 by Anthony Roach <aroach@electriceyeball.com>.
+#
+
+PACKAGE=scons
+DIRLIST="/usr/lib/scons-0.01"
+
+case "$1" in
+ configure|abort-upgrade|abort-remove|abort-deconfigure)
+ for i in $DIRLIST ; do
+ python2 -O /usr/lib/python1.5/compileall.py -q $i
+ python2 /usr/lib/python1.5/compileall.py -q $i
+ done
+ ;;
+
+ *)
+ echo "postinst called with unknown argument \`$1'" >&2
+ exit 1
+ ;;
+esac
+
+#DEBHELPER#
+
+exit 0
diff --git a/debian/scons.prerm b/debian/scons.prerm
new file mode 100644
index 0000000..0b62083
--- /dev/null
+++ b/debian/scons.prerm
@@ -0,0 +1,14 @@
+#! /bin/sh -e
+#
+# sample prerm script for Debian python2 packages.
+# Written 1998 by Gregor Hoffleit <flight@debian.org>.
+# Modified for SCons 2001 by Anthony Roach <aroach@electriceyeball.com>.
+#
+
+PACKAGE=scons
+
+dpkg --listfiles $PACKAGE |
+ awk '$0~/\.py$/ {print $0"c\n" $0"o"}' |
+ xargs rm -f >&2
+
+#DEBHELPER#
diff --git a/etc/Conscript b/etc/Conscript
index 3f030a7..552ab26 100644
--- a/etc/Conscript
+++ b/etc/Conscript
@@ -9,6 +9,7 @@ Import qw( env );
@modules = qw(TestCmd.py TestSCons.py unittest.py);
foreach $module (@modules) {
- $env->Command(File::Spec->catfile($env->{TEST_LIB_DIR}, $module),
- $module, "%SEDCOM");
+ for $dir ($env->{TEST1_LIB_DIR}, $env->{TEST2_LIB_DIR}) {
+ $env->Command(File::Spec->catfile($dir, $module), $module, "%SEDCOM");
+ }
}
diff --git a/runtest.py b/runtest.py
index 9542e78..108db73 100644
--- a/runtest.py
+++ b/runtest.py
@@ -16,6 +16,13 @@
#
# Options:
#
+# -1 Use the test configuration in build/test1
+# (installed from the scons package)
+#
+# -2 Use the test configuration in build/test2
+# (installed from the python-scons and scons-script
+# packages)
+#
# -a Run all tests; does a virtual 'find' for
# all SCons tests under the current directory.
#
@@ -47,12 +54,15 @@ debug = ''
tests = []
printcmd = 1
version = None
+testver = 1
-opts, tests = getopt.getopt(sys.argv[1:], "ab:dqv:",
+opts, tests = getopt.getopt(sys.argv[1:], "12ab:dqv:",
['all','build=','debug','quiet','version='])
for o, a in opts:
- if o == '-a' or o == '--all': all = 1
+ if o == '-1': testver = 1
+ elif o == '-2': testver = 2
+ elif o == '-a' or o == '--all': all = 1
elif o == '-b' or o == '--build': build = a
elif o == '-d' or o == '--debug': debug = os.path.join(
sys.exec_prefix,
@@ -100,14 +110,15 @@ if build == 'aegis':
version = aegis_to_version(version)
- scons_dir = os.path.join(cwd, 'build', 'test', 'bin')
+ scons_dir = os.path.join(cwd, 'build', 'test' + str(testver), 'bin')
+
+ if testver == 1:
+ test_dir = os.path.join('test1', 'lib', 'scons-' + str(version))
+ elif testver == 2:
+ test_dir = os.path.join('test2', 'lib', 'python' + sys.version[0:3],
+ 'site-packages')
- os.environ['PYTHONPATH'] = os.path.join(cwd,
- 'build',
- 'test',
- 'lib',
- 'python' + sys.version[0:3],
- 'site-packages')
+ os.environ['PYTHONPATH'] = os.path.join(cwd, 'build', test_dir)
else:
diff --git a/src/MANIFEST.in b/src/MANIFEST.in
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/src/MANIFEST.in
diff --git a/src/README.txt b/src/README.txt
new file mode 100644
index 0000000..1539f72
--- /dev/null
+++ b/src/README.txt
@@ -0,0 +1,162 @@
+# Copyright (c) 2001 Steven Knight
+# __FILE__ __REVISION__ __DATE__ __DEVELOPER__
+
+
+ SCons - a software construction tool
+
+ Version __VERSION__
+
+
+This is an alpha release of SCons, a tool for building software (and
+other files). SCons is implemented in Python, and its "configuration
+files" are actually Python scripts, allowing you to use the full power
+of a real scripting language to solve build problems. You do not,
+however, need to know Python to use SCons effectively.
+
+
+LATEST VERSION
+==============
+
+Before going further, you can check that this package you have is
+the latest version by checking the SCons download page at:
+
+ http://www.scons.org/download.html
+
+
+ABOUT SCONS PACKAGES
+====================
+
+The complete SCons system is comprised of three separate packages:
+
+ scons [THIS PACKAGE]
+ The scons script itself, plus the SCons build engine
+ installed into an SCons-specific library directory.
+
+ python-scons
+ The SCons build engine, installed into the standard
+ Python library directory.
+
+ scons-script
+ Only the scons script itself.
+
+Depending on what you want to do with SCons, you may need to install
+additional (or other) packages:
+
+ If you just want to use scons (the script) to build software:
+
+ Install this package. You do not need to install any other
+ packages.
+
+ If you do NOT want to use the scons script, but you want to use the
+ SCons build engine in other Python software:
+
+ Do NOT install this package. Install the python-scons package
+ instead.
+
+ If you want to use the scons script AND you want to use the SCons
+ build engine in other Python software:
+
+ Install this package AND install the python-scons package.
+
+ Note that this installs two separate copies of the build engine,
+ one (in an SCons-specific library directory) used by the scons
+ script itself and one (in the standard Python library) used by
+ other software. This allows you the flexibility to upgrade
+ one build engine without affecting the other.
+
+ If you want the scons script and other Python software to use the
+ same version of the build engine:
+
+ Do NOT install this package. Install the python-scons AND the
+ scons-script packages instead.
+
+
+INSTALLATION
+============
+
+To install this package, simply run the provided Python-standard setup
+script as follows:
+
+ # python setup.py
+
+You should have system installation privileges (that is, "root" or
+"Administrator") when running the setup.py script.
+
+
+DOCUMENTATION
+=============
+
+Documentation for SCons is available at:
+
+ http://www.scons.org/doc.html
+
+
+LICENSING
+=========
+
+SCons is distributed under the MIT license, a full copy of which is
+available in the LICENSE.txt file. The MIT license is an approved Open
+Source license, which means:
+
+ This software is OSI Certified Open Source Software. OSI
+ Certified is a certification mark of the Open Source Initiative.
+
+More information about OSI certifications and Open Source software is
+available at:
+
+ http://www.opensource.org/
+
+
+REPORTING BUGS
+==============
+
+You can report bugs either by following the "Tracker - Bugs" link
+on the SCons project page:
+
+ http://sourceforge.net/projects/scons/
+
+or by sending mail to the SCons developers mailing list:
+
+ scons-devel@lists.sourceforge.net
+
+
+MAILING LISTS
+=============
+
+A mailing list for users of SCons is available. You may send
+questions or comments to the list at:
+
+ scons-users@lists.sourceforge.net
+
+You may subscribe to the mailing list at:
+
+ http://lists.sourceforge.net/lists/listinfo/scons-users
+
+There is also a low-volume mailing list available for announcements
+about SCons. Subscribe at:
+
+ http://lists.sourceforge.net/lists/listinfo/scons-announce
+
+
+FOR MORE INFORMATION
+====================
+
+Check the SCons web site at:
+
+ http://www.scons.org/
+
+
+AUTHOR INFO
+===========
+
+Steven Knight
+knight at baldmt dot com
+http://www.baldmt.com/~knight/
+
+With more than a little help from:
+ Chad Austin
+ Charles Crain
+ Steve Leblanc
+ Anthony Roach
+ Steven Shaw
+
diff --git a/src/engine/MANIFEST b/src/engine/MANIFEST.in
index af9d531..a79a059 100644
--- a/src/engine/MANIFEST
+++ b/src/engine/MANIFEST.in
@@ -1,5 +1,3 @@
-LICENSE.txt
-MANIFEST
SCons/__init__.py
SCons/Builder.py
SCons/Defaults.py
@@ -16,4 +14,3 @@ SCons/Sig/MD5.py
SCons/Sig/TimeStamp.py
SCons/Taskmaster.py
SCons/Util.py
-setup.py
diff --git a/src/engine/README.txt b/src/engine/README.txt
new file mode 100644
index 0000000..b33fe72
--- /dev/null
+++ b/src/engine/README.txt
@@ -0,0 +1,161 @@
+# Copyright (c) 2001 Steven Knight
+# __FILE__ __REVISION__ __DATE__ __DEVELOPER__
+
+
+ SCons - a software construction tool
+
+ Version __VERSION__
+
+
+This is an alpha release of the SCons build engine, a Python extension
+module for building software (and other files). The SCons build engine
+manages dependencies and executes commands or Python functions to update
+out-of-date files (or other objects).
+
+
+LATEST VERSION
+==============
+
+Before going further, you can check that this package you have is
+the latest version by checking the SCons download page at:
+
+ http://www.scons.org/download.html
+
+
+ABOUT SCONS PACKAGES
+====================
+
+The complete SCons system is comprised of three separate packages:
+
+ scons
+ The scons script itself, plus the SCons build engine
+ installed into an SCons-specific library directory.
+
+ python-scons [THIS PACKAGE]
+ The SCons build engine, installed into the standard
+ Python library directory.
+
+ scons-script
+ Only the scons script itself.
+
+Depending on what you want to do with SCons, you may need to install
+additional (or other) packages:
+
+ If you just want to use scons (the script) to build software:
+
+ Do not install this package. Install the scons package instead,
+ which contains a copy of both the script and the build engine.
+ You will not need to install any other packages.
+
+ If you do NOT want to use the scons script, but you want to use the
+ SCons build engine in other Python software:
+
+ Install this package. You do not need to install any other
+ packages.
+
+ If you want to use the scons script AND you want to use the SCons
+ build engine in other Python software:
+
+ Install this package AND the scons package.
+
+ Note that this installs two separate copies of the build engine,
+ one (in an SCons-specific library directory) used by the scons
+ script itself and one (in the standard Python library) used by
+ other software. This allows you the flexibility to upgrade
+ one build engine without affecting the other.
+
+ If you want the scons script and other Python software to use the
+ same version of the build engine:
+
+ Install this package AND the scons-script package.
+
+
+INSTALLATION
+============
+
+To install this package, simply run the provided Python-standard setup
+script as follows:
+
+ # python setup.py
+
+You should have system installation privileges (that is, "root" or
+"Administrator") when running the setup.py script.
+
+
+DOCUMENTATION
+=============
+
+Documentation for SCons is available at:
+
+ http://www.scons.org/doc.html
+
+
+LICENSING
+=========
+
+SCons is distributed under the MIT license, a full copy of which is
+available in the LICENSE.txt file. The MIT license is an approved Open
+Source license, which means:
+
+ This software is OSI Certified Open Source Software. OSI
+ Certified is a certification mark of the Open Source Initiative.
+
+More information about OSI certifications and Open Source software is
+available at:
+
+ http://www.opensource.org/
+
+
+REPORTING BUGS
+==============
+
+You can report bugs either by following the "Tracker - Bugs" link
+on the SCons project page:
+
+ http://sourceforge.net/projects/scons/
+
+or by sending mail to the SCons developers mailing list:
+
+ scons-devel@lists.sourceforge.net
+
+
+MAILING LISTS
+=============
+
+A mailing list for users of SCons is available. You may send
+questions or comments to the list at:
+
+ scons-users@lists.sourceforge.net
+
+You may subscribe to the mailing list at:
+
+ http://lists.sourceforge.net/lists/listinfo/scons-users
+
+There is also a low-volume mailing list available for announcements
+about SCons. Subscribe at:
+
+ http://lists.sourceforge.net/lists/listinfo/scons-announce
+
+
+FOR MORE INFORMATION
+====================
+
+Check the SCons web site at:
+
+ http://www.scons.org/
+
+
+AUTHOR INFO
+===========
+
+Steven Knight
+knight at baldmt dot com
+http://www.baldmt.com/~knight/
+
+With more than a little help from:
+ Chad Austin
+ Charles Crain
+ Steve Leblanc
+ Anthony Roach
+ Steven Shaw
+
diff --git a/src/engine/setup.cfg b/src/engine/setup.cfg
new file mode 100644
index 0000000..94ede1f
--- /dev/null
+++ b/src/engine/setup.cfg
@@ -0,0 +1,2 @@
+[bdist_rpm]
+group = Development/Tools
diff --git a/src/engine/setup.py b/src/engine/setup.py
index ed097b1..3d51b0e 100644
--- a/src/engine/setup.py
+++ b/src/engine/setup.py
@@ -33,14 +33,34 @@ if head:
os.chdir(head)
sys.argv[0] = tail
+# Code to figure out the package name from the current directory.
+# May come in handy to allow this setup.py to switch-hit between
+# python-scons and python2-scons.
+#head, package = os.path.split(os.getcwd())
+#suffix = "-__VERSION__"
+#if package[-len(suffix):] == suffix:
+# package = package[:-len(suffix)]
+
+package = 'python-scons'
+
from distutils.core import setup
-setup(name = "scons-pylib",
+ver = {
+ 'python-scons': '1.5',
+ 'python2-scons': '2.1',
+}
+
+setup(name = package,
version = "__VERSION__",
- description = "scons",
+ description = "SCons Python %s extension modules" % ver[package],
+ long_description = """SCons is an Open Source software construction tool--that is, a build tool; an
+improved substitute for the classic Make utility; a better way to build
+software.""",
author = "Steven Knight",
author_email = "knight@baldmt.com",
url = "http://www.scons.org/",
+ licence = "MIT, freely distributable",
+ keywords = "scons, cons, make, build tool, make tool",
packages = ["SCons",
"SCons.Node",
"SCons.Scanner",
diff --git a/src/script/MANIFEST b/src/script/MANIFEST
deleted file mode 100644
index b2315d1..0000000
--- a/src/script/MANIFEST
+++ /dev/null
@@ -1,4 +0,0 @@
-LICENSE.txt
-MANIFEST
-scons
-setup.py
diff --git a/src/script/MANIFEST.in b/src/script/MANIFEST.in
new file mode 100644
index 0000000..ebff829
--- /dev/null
+++ b/src/script/MANIFEST.in
@@ -0,0 +1 @@
+scons
diff --git a/src/script/README.txt b/src/script/README.txt
new file mode 100644
index 0000000..6f1ef71
--- /dev/null
+++ b/src/script/README.txt
@@ -0,0 +1,163 @@
+# Copyright (c) 2001 Steven Knight
+# __FILE__ __REVISION__ __DATE__ __DEVELOPER__
+
+
+ SCons - a software construction tool
+
+ Version __VERSION__
+
+
+This is an alpha release of SCons, a tool for building software (and
+other files). SCons is implemented in Python, and its "configuration
+files" are actually Python scripts, allowing you to use the full power
+of a real scripting language to solve build problems. You do not,
+however, need to know Python to use SCons effectively.
+
+
+LATEST VERSION
+==============
+
+Before going further, you can check that this package you have is
+the latest version by checking the SCons download page at:
+
+ http://www.scons.org/download.html
+
+
+ABOUT SCONS PACKAGES
+====================
+
+The complete SCons system is comprised of three separate packages:
+
+ scons
+ The scons script itself, plus the SCons build engine
+ installed into an SCons-specific library directory.
+
+ python-scons
+ The SCons build engine, installed into the standard
+ Python library directory.
+
+ scons-script [THIS PACKAGE]
+ Only the scons script itself.
+
+Depending on what you want to do with SCons, you may need to install
+additional (or other) packages:
+
+ If you just want to use scons (the script) to build software:
+
+ Do NOT install this package. Install the scons package instead,
+ which contains a copy of both the script and the build engine.
+ You will not need to install any other packages.
+
+ If you do NOT want to use the scons script, but you want to use the
+ SCons build engine in other Python software:
+
+ Do NOT install this package. Install the python-scons package
+ instead.
+
+ If you want to use the scons script AND you want to use the SCons
+ build engine in other Python software:
+
+ Do NOT install this package. Install both the scons and
+ python-scons packages instead.
+
+ Note that this installs two separate copies of the build engine,
+ one (in an SCons-specific library directory) used by the scons
+ script itself and one (in the standard Python library) used by
+ other software. This allows you the flexibility to upgrade
+ one build engine without affecting the other.
+
+ If you want the scons script and other Python software to use the
+ same version of the build engine:
+
+ Install this package AND the python-scons package.
+
+
+INSTALLATION
+============
+
+To install this package, simply run the provided Python-standard setup
+script as follows:
+
+ # python setup.py
+
+You should have system installation privileges (that is, "root" or
+"Administrator") when running the setup.py script.
+
+
+DOCUMENTATION
+=============
+
+Documentation for SCons is available at:
+
+ http://www.scons.org/doc.html
+
+
+LICENSING
+=========
+
+SCons is distributed under the MIT license, a full copy of which is
+available in the LICENSE.txt file. The MIT license is an approved Open
+Source license, which means:
+
+ This software is OSI Certified Open Source Software. OSI
+ Certified is a certification mark of the Open Source Initiative.
+
+More information about OSI certifications and Open Source software is
+available at:
+
+ http://www.opensource.org/
+
+
+REPORTING BUGS
+==============
+
+You can report bugs either by following the "Tracker - Bugs" link
+on the SCons project page:
+
+ http://sourceforge.net/projects/scons/
+
+or by sending mail to the SCons developers mailing list:
+
+ scons-devel@lists.sourceforge.net
+
+
+MAILING LISTS
+=============
+
+A mailing list for users of SCons is available. You may send
+questions or comments to the list at:
+
+ scons-users@lists.sourceforge.net
+
+You may subscribe to the mailing list at:
+
+ http://lists.sourceforge.net/lists/listinfo/scons-users
+
+There is also a low-volume mailing list available for announcements
+about SCons. Subscribe at:
+
+ http://lists.sourceforge.net/lists/listinfo/scons-announce
+
+
+FOR MORE INFORMATION
+====================
+
+Check the SCons web site at:
+
+ http://www.scons.org/
+
+
+AUTHOR INFO
+===========
+
+Steven Knight
+knight at baldmt dot com
+http://www.baldmt.com/~knight/
+
+With more than a little help from:
+ Chad Austin
+ Charles Crain
+ Steve Leblanc
+ Anthony Roach
+ Steven Shaw
+
diff --git a/src/script/scons.py b/src/script/scons.py
index 49a8467..3ee8abd 100644
--- a/src/script/scons.py
+++ b/src/script/scons.py
@@ -35,8 +35,10 @@ import traceback
# Strip the script directory from sys.path() so on case-insensitive
# (WIN32) systems Python doesn't think that the "scons" script is the
-# "SCons" package.
-sys.path = sys.path[1:]
+# "SCons" package. Replace it with our own version directory so, if
+# if they're there, we pick up the right version of the build engine
+# modules.
+sys.path = [os.path.join(sys.prefix, 'lib', 'scons-__VERSION__')] + sys.path[1:]
import SCons.Node
import SCons.Node.FS
diff --git a/src/script/setup.cfg b/src/script/setup.cfg
new file mode 100644
index 0000000..94ede1f
--- /dev/null
+++ b/src/script/setup.cfg
@@ -0,0 +1,2 @@
+[bdist_rpm]
+group = Development/Tools
diff --git a/src/script/setup.py b/src/script/setup.py
index a3eace7..2835cdf 100644
--- a/src/script/setup.py
+++ b/src/script/setup.py
@@ -35,10 +35,15 @@ if head:
from distutils.core import setup
-setup(name = "scons",
+setup(name = "scons-script",
version = "__VERSION__",
- description = "scons",
+ description = "an Open Source software construction tool script",
+ long_description = """SCons is an Open Source software construction tool--that is, a build tool; an
+improved substitute for the classic Make utility; a better way to build
+software.""",
author = "Steven Knight",
author_email = "knight@baldmt.com",
- url = "http://www.baldmt.com/scons",
+ url = "http://www.scons.org/",
+ licence = "MIT, freely distributable",
+ keywords = "scons, cons, make, build tool, make tool",
scripts = ["scons"])
diff --git a/src/setup.cfg b/src/setup.cfg
new file mode 100644
index 0000000..94ede1f
--- /dev/null
+++ b/src/setup.cfg
@@ -0,0 +1,2 @@
+[bdist_rpm]
+group = Development/Tools
diff --git a/src/setup.py b/src/setup.py
new file mode 100644
index 0000000..f256e22
--- /dev/null
+++ b/src/setup.py
@@ -0,0 +1,72 @@
+#
+# Copyright (c) 2001 Steven Knight
+#
+# 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
+import os.path
+import sys
+
+(head, tail) = os.path.split(sys.argv[0])
+
+if head:
+ os.chdir(head)
+ sys.argv[0] = tail
+
+from distutils.core import setup
+from distutils.command.install_lib import install_lib
+
+class my_install_lib(install_lib):
+ def finalize_options(self):
+ install_lib.finalize_options(self)
+ head = self.install_dir
+ while head:
+ if head == os.sep:
+ head = None
+ break
+ else:
+ head, tail = os.path.split(head)
+ open("/dev/tty", 'w').write("head = " + head + "\n")
+ if tail[:6] in ["python", "Python"]:
+ break
+ if head:
+ self.install_dir = os.path.join(head, "scons-__VERSION__")
+
+setup(name = "scons",
+ version = "__VERSION__",
+ description = "an Open Source software construction tool",
+ long_description = """SCons is an Open Source software construction tool--that is, a build tool; an
+improved substitute for the classic Make utility; a better way to build
+software.""",
+ author = "Steven Knight",
+ author_email = "knight@baldmt.com",
+ url = "http://www.scons.org/",
+ license = "MIT, freely distributable",
+ keywords = "scons, cons, make, build tool, make tool",
+ packages = ["SCons",
+ "SCons.Node",
+ "SCons.Scanner",
+ "SCons.Sig"],
+ package_dir = {'': 'engine'},
+ scripts = ["script/scons"],
+ cmdclass = {'install_lib': my_install_lib})