aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortarek <none@none>2009-09-11 18:29:31 +0200
committertarek <none@none>2009-09-11 18:29:31 +0200
commit299a9d2f356de19fc6df0952655c79817aa2c1b1 (patch)
treeee6a9cfee0a75ee9959a7c6ae4ab4d2803b93a41
parent364308e9ce78818d74e88987459e3c08f8e80d11 (diff)
downloadexternal_python_setuptools-299a9d2f356de19fc6df0952655c79817aa2c1b1.tar.gz
external_python_setuptools-299a9d2f356de19fc6df0952655c79817aa2c1b1.tar.bz2
external_python_setuptools-299a9d2f356de19fc6df0952655c79817aa2c1b1.zip
better marker for easy_install detection
--HG-- branch : distribute extra : rebase_source : 2119ce08a6104dd1269137a28044684db358d402
-rw-r--r--distribute_setup.py8
-rwxr-xr-xsetup.py9
2 files changed, 10 insertions, 7 deletions
diff --git a/distribute_setup.py b/distribute_setup.py
index 83b56d4d..060795ee 100644
--- a/distribute_setup.py
+++ b/distribute_setup.py
@@ -26,7 +26,7 @@ from distutils import log
import subprocess
IS_JYTHON = sys.platform.startswith('java')
-DEFAULT_VERSION = "0.6.2"
+DEFAULT_VERSION = "0.6.1"
DEFAULT_URL = "http://pypi.python.org/packages/source/d/distribute/"
def quote(c):
@@ -60,7 +60,8 @@ def _install(tarball):
log.warn('Now working in %s' % subdir)
# installing
- assert python_cmd('setup.py -q install')
+ log.warn('Installing Distribute')
+ assert python_cmd('setup.py install')
finally:
os.chdir(old_wd)
@@ -81,7 +82,8 @@ def _build_egg(tarball, to_dir=os.curdir):
log.warn('Now working in %s' % subdir)
# building an egg
- python_cmd('setup.py -v -q bdist_egg --dist-dir %s' % to_dir)
+ log.warn('Building a Distribute egg in %s' % to_dir)
+ python_cmd('setup.py -q bdist_egg --dist-dir %s' % to_dir)
# returning the result
for file in os.listdir(to_dir):
diff --git a/setup.py b/setup.py
index 9ef640de..da9b519a 100755
--- a/setup.py
+++ b/setup.py
@@ -16,12 +16,13 @@ scripts = []
# if we are installing Distribute using "python setup.py install"
# we need to get setuptools out of the way
+def _easy_install_marker():
+ return (len(sys.argv) == 5 and sys.argv[2] == 'bdist_egg' and
+ sys.argv[3] == '--dist-dir' and 'egg-dist-tmp-' in sys.argv[-1])
+
def _being_installed():
# easy_install marker
- if (len(sys.argv) == 5 and sys.argv[2] == 'bdist_egg' and
- sys.argv[3] == '--dist-dir'):
- return True
- return 'install' in sys.argv[1:]
+ return 'install' in sys.argv[1:] or _easy_install_marker()
if _being_installed():
from distribute_setup import before_install