diff options
Diffstat (limited to 'setup.py')
| -rwxr-xr-x | setup.py | 12 |
1 files changed, 10 insertions, 2 deletions
@@ -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) |
