summaryrefslogtreecommitdiff
path: root/setup.py
diff options
context:
space:
mode:
Diffstat (limited to 'setup.py')
-rwxr-xr-xsetup.py12
1 files changed, 10 insertions, 2 deletions
diff --git a/setup.py b/setup.py
index 10502748..59a3bfa2 100755
--- a/setup.py
+++ b/setup.py
@@ -16,7 +16,14 @@ scripts = []
# if we are installing Distribute using "python setup.py install"
# we need to get setuptools out of the way
-if 'install' 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:]
+
+if _being_installed():
from distribute_setup import before_install
before_install()
@@ -100,7 +107,8 @@ dist = setup(
Topic :: Utilities""".splitlines() if f.strip()],
scripts = scripts,
)
-if 'install' in sys.argv[1:]:
+
+if _being_installed():
from distribute_setup import after_install
after_install(dist)