summaryrefslogtreecommitdiffstats
path: root/src/script/sconsign.py
diff options
context:
space:
mode:
authorAnatoly Techtonik <techtonik@gmail.com>2011-04-14 11:38:02 (GMT)
committerAnatoly Techtonik <techtonik@gmail.com>2011-04-14 11:38:02 (GMT)
commite48ee0e711ca487893d34c9a3449a009135f28cc (patch)
treeb6f1ad3b3ae784484a6718ec214a4164f611fc35 /src/script/sconsign.py
parenta7e911974027bb05dbf3796b7e7c53f2b463cd43 (diff)
downloadSCons-e48ee0e711ca487893d34c9a3449a009135f28cc.zip
SCons-e48ee0e711ca487893d34c9a3449a009135f28cc.tar.gz
SCons-e48ee0e711ca487893d34c9a3449a009135f28cc.tar.bz2
fix issue #2051 - broken installation with easy_install on Windows
the fix was only committed for unix previously
Diffstat (limited to 'src/script/sconsign.py')
-rw-r--r--src/script/sconsign.py29
1 files changed, 15 insertions, 14 deletions
diff --git a/src/script/sconsign.py b/src/script/sconsign.py
index 4c726da..e5e9d4f 100644
--- a/src/script/sconsign.py
+++ b/src/script/sconsign.py
@@ -37,7 +37,6 @@ __developer__ = "__DEVELOPER__"
import os
import sys
-import time
##############################################################################
# BEGIN STANDARD SCons SCRIPT HEADER
@@ -75,8 +74,22 @@ libs.append(os.path.abspath(local))
scons_version = 'scons-%s' % __version__
+# preferred order of scons lookup paths
prefs = []
+try:
+ import pkg_resources
+except ImportError:
+ pass
+else:
+ # when running from an egg add the egg's directory
+ try:
+ d = pkg_resources.get_distribution('scons')
+ except pkg_resources.DistributionNotFound:
+ pass
+ else:
+ prefs.append(d.location)
+
if sys.platform == 'win32':
# sys.prefix is (likely) C:\Python*;
# check only C:\Python*.
@@ -145,19 +158,6 @@ else:
# Check /usr/libfoo/scons*.
prefs.append(libpath)
- try:
- import pkg_resources
- except ImportError:
- pass
- else:
- # when running from an egg add the egg's directory
- try:
- d = pkg_resources.get_distribution('scons')
- except pkg_resources.DistributionNotFound:
- pass
- else:
- prefs.append(d.location)
-
# Look first for 'scons-__version__' in all of our preference libs,
# then for 'scons'.
libs.extend([os.path.join(x, scons_version) for x in prefs])
@@ -172,6 +172,7 @@ sys.path = libs + sys.path
import SCons.compat # so pickle will import cPickle instead
import whichdb
+import time
import pickle
import imp