Source

distribute / setup.py

The branch '0.6-maintenance' does not exist.
Diff from to

File setup.py

 
 # 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()
 
     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)