diff options
author | Steven Knight <knight@baldmt.com> | 2003-02-10 20:03:10 (GMT) |
---|---|---|
committer | Steven Knight <knight@baldmt.com> | 2003-02-10 20:03:10 (GMT) |
commit | 26ffd7d959778e3355786a0d47ff27476f7c2554 (patch) | |
tree | c0bfc9b2bc7bca9f21576df019b91ac98e9bf754 /src/setup.py | |
parent | 6cc65ff3e32487eaa455776111d26a5bf07fb862 (diff) | |
download | SCons-26ffd7d959778e3355786a0d47ff27476f7c2554.zip SCons-26ffd7d959778e3355786a0d47ff27476f7c2554.tar.gz SCons-26ffd7d959778e3355786a0d47ff27476f7c2554.tar.bz2 |
Fix the Win32 installer package.
Diffstat (limited to 'src/setup.py')
-rw-r--r-- | src/setup.py | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/setup.py b/src/setup.py index 6aa673a..33b4cbe 100644 --- a/src/setup.py +++ b/src/setup.py @@ -108,7 +108,7 @@ class install(_install): standalone_lib = self.standalone_lib version_lib = self.version_lib -def get_scons_prefix(libdir): +def get_scons_prefix(libdir, is_win32): """ Return the right prefix for SCons library installation. Find this by starting with the library installation directory @@ -122,7 +122,7 @@ def get_scons_prefix(libdir): head, tail = os.path.split(head) if string.lower(tail)[:6] == "python": # Found the Python library directory... - if sys.platform == "win32": + if is_win32: # ...on Win32 systems, "scons" goes in the directory: # C:\PythonXX => C:\PythonXX\scons return os.path.join(drive + head, tail) @@ -142,10 +142,12 @@ class install_lib(_install_lib): def finalize_options(self): _install_lib.finalize_options(self) - if not set_explicitly("lib", self.distribution.script_args): + args = self.distribution.script_args + if not set_explicitly("lib", args): # They didn't explicitly specify the installation # directory for libraries... - prefix = get_scons_prefix(self.install_dir) + is_win32 = sys.platform == "win32" or args[0] == 'bdist_wininst' + prefix = get_scons_prefix(self.install_dir, is_win32) standard_dir = os.path.join(self.install_dir, "SCons") version_dir = os.path.join(prefix, "scons-0.11") standalone_dir = os.path.join(prefix, "scons") |