summaryrefslogtreecommitdiff
path: root/src/setup.py
diff options
context:
space:
mode:
authorAnatoly Techtonik <techtonik@gmail.com>2011-04-13 22:22:52 +0000
committerAnatoly Techtonik <techtonik@gmail.com>2011-04-13 22:22:52 +0000
commitd83ae9aaec4b0e1054340cc43adbedede737bc1f (patch)
treea76ddf4c7d6b7e85b088b57903a294a3dde5c381 /src/setup.py
parentc9ccb63227bbaacc0ddb6d4a697c8ad9b1db8116 (diff)
downloadscons-d83ae9aaec4b0e1054340cc43adbedede737bc1f.tar.gz
setup.py: correct note tense, clean pre-2.4 code, add comments
Diffstat (limited to 'src/setup.py')
-rw-r--r--src/setup.py28
1 files changed, 11 insertions, 17 deletions
diff --git a/src/setup.py b/src/setup.py
index 41737db0..ea95ac2e 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):