diff options
author | Anatoly Techtonik <techtonik@gmail.com> | 2011-04-13 22:22:52 (GMT) |
---|---|---|
committer | Anatoly Techtonik <techtonik@gmail.com> | 2011-04-13 22:22:52 (GMT) |
commit | a7e911974027bb05dbf3796b7e7c53f2b463cd43 (patch) | |
tree | a76ddf4c7d6b7e85b088b57903a294a3dde5c381 | |
parent | b63f499183561f6c206589e1907791480221a3c8 (diff) | |
download | SCons-a7e911974027bb05dbf3796b7e7c53f2b463cd43.zip SCons-a7e911974027bb05dbf3796b7e7c53f2b463cd43.tar.gz SCons-a7e911974027bb05dbf3796b7e7c53f2b463cd43.tar.bz2 |
setup.py: correct note tense, clean pre-2.4 code, add comments
-rw-r--r-- | src/setup.py | 28 |
1 files changed, 11 insertions, 17 deletions
diff --git a/src/setup.py b/src/setup.py index 41737db..ea95ac2 100644 --- a/src/setup.py +++ b/src/setup.py @@ -21,11 +21,11 @@ # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. """ -NOTE: Installed SCons is not importable like usual Python packages and - is executed explicitly with command line scripts. Historically - this was made to allow multiple SCons versions to coexist within - single Python installation, explicit invokation was necessary to - avoid confusion over which version of SCons is active. +NOTE: Installed SCons is not importable like usual Python packages. It is + executed explicitly with command line scripts. This allows multiple + SCons versions to coexist within single Python installation, which + is critical for enterprise build cases. Explicit invokation is + necessary to avoid confusion over which version of SCons is active. By default SCons is installed into versioned directory, e.g. site-packages/scons-2.1.0.alpha.20101125 and much of the stuff @@ -271,15 +271,11 @@ class install_scripts(_install_scripts): self.copy_file(src, dst) self.outfiles.append(dst) - def report(self, msg, args): - # Wrapper around self.announce, used by older distutils versions. - self.announce(msg % args) - def run(self): - # This "skip_build/build_scripts" block is cut-and-paste from - # distutils. + # --- distutils copy/paste --- if not self.skip_build: self.run_command('build_scripts') + # --- /distutils copy/paste --- # Custom SCons installation stuff. if Options.hardlink_scons: @@ -322,20 +318,18 @@ class install_scripts(_install_scripts): self.copy_scons(src, scons_bat) self.copy_scons(src, scons_version_bat) - # This section is cut-and-paste from distutils, modulo being - # able + # --- distutils copy/paste --- if os.name == 'posix': - try: report = distutils.log.info - except AttributeError: report = self.report # Set the executable bits (owner, group, and world) on # all the scripts we just installed. for file in self.get_outputs(): if self.dry_run: - report("changing mode of %s", file) + log.info("changing mode of %s", file) else: mode = ((os.stat(file)[stat.ST_MODE]) | 0555) & 07777 - report("changing mode of %s", file) + log.info("changing mode of %s to %o", file, mode) os.chmod(file, mode) + # --- /distutils copy/paste --- class build_scripts(_build_scripts): def finalize_options(self): |