summaryrefslogtreecommitdiffstats
path: root/src/setup.py
diff options
context:
space:
mode:
authorSteven Knight <knight@baldmt.com>2001-11-28 03:30:53 (GMT)
committerSteven Knight <knight@baldmt.com>2001-11-28 03:30:53 (GMT)
commitad78319ad3ede8f7065f9c945a3585cad04c3731 (patch)
treebf4e6fb4c27ddbb0d2d2ce54f79f0a8d80c723c1 /src/setup.py
parentf5b84fd3af7d8e3b3d4570dcf40220c96f67d16e (diff)
downloadSCons-ad78319ad3ede8f7065f9c945a3585cad04c3731.zip
SCons-ad78319ad3ede8f7065f9c945a3585cad04c3731.tar.gz
SCons-ad78319ad3ede8f7065f9c945a3585cad04c3731.tar.bz2
Change packaging to the new /usr/lib/scons/ scheme
Diffstat (limited to 'src/setup.py')
-rw-r--r--src/setup.py66
1 files changed, 44 insertions, 22 deletions
diff --git a/src/setup.py b/src/setup.py
index f256e22..b132a9e 100644
--- a/src/setup.py
+++ b/src/setup.py
@@ -38,7 +38,9 @@ from distutils.command.install_lib import install_lib
class my_install_lib(install_lib):
def finalize_options(self):
+ open("/dev/tty", "w").write("lib: self.install_dir = %s\n" % self.install_dir)
install_lib.finalize_options(self)
+ open("/dev/tty", "w").write("lib: self.install_dir = %s\n" % self.install_dir)
head = self.install_dir
while head:
if head == os.sep:
@@ -46,27 +48,47 @@ class my_install_lib(install_lib):
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__")
+ if tail[:6] == "python":
+ self.install_dir = os.path.join(head, "scons")
+ # Our original packaging scheme placed the build engine
+ # in a private library directory that contained the SCons
+ # version number in the directory name. Here's how this
+ # was supported here. See the Construct file for details
+ # on other files that would need to be changed to support
+ # this as well.
+ #self.install_dir = os.path.join(head, "scons-__VERSION__")
+ return
+ elif tail[:6] == "Python":
+ self.install_dir = os.path.join(head, tail)
+ return
-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
+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})
+software."""
+
+keywords = "scons, cons, make, build tool, make tool, software build tool, software construction tool"
+
+arguments = {
+ 'name' : "scons",
+ 'version' : "__VERSION__",
+ 'description' : "an Open Source software construction tool",
+ 'long_description' : description,
+ 'author' : "Steven Knight",
+ 'author_email' : "knight@scons.org",
+ 'url' : "http://www.scons.org/",
+ 'license' : "MIT, freely distributable",
+ 'keywords' : keywords,
+ 'packages' : ["SCons",
+ "SCons.Node",
+ "SCons.Scanner",
+ "SCons.Sig"],
+ 'package_dir' : {'' : 'engine'},
+ 'scripts' : ["script/scons"],
+ 'cmdclass' : {'install_lib' : my_install_lib}
+}
+
+if sys.argv[1] == "bdist_wininst":
+ arguments['data_files'] = [('.', ["script/scons.bat"])]
+
+apply(setup, (), arguments)