[skel] fix setup.py
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Tue, 20 Apr 2010 18:25:56 +0200
changeset 5360 96893296772f
parent 5359 d83a227df75c
child 5361 8b052b3f4f90
[skel] fix setup.py
skeleton/setup.py
--- a/skeleton/setup.py	Tue Apr 20 18:10:42 2010 +0200
+++ b/skeleton/setup.py	Tue Apr 20 18:25:56 2010 +0200
@@ -139,19 +139,12 @@
 
 def install(**kwargs):
     """setup entry point"""
-    try:
-        if USE_SETUPTOOLS:
+    if USE_SETUPTOOLS:
+        if '--force-manifest' in sys.argv:
             sys.argv.remove('--force-manifest')
-    except:
-        pass
-    try:
-        if not USE_SETUPTOOLS:
-            # install-layout option was introduced in 2.5.3-1~exp1
-            if sys.versioninfo < (2, 5, 4):
-                sys.argv.remove('--install-layout=deb')
-                print "W: remove '--install-layout=deb' option"
-    except:
-        pass
+    # install-layout option was introduced in 2.5.3-1~exp1
+    elif sys.version_info < (2, 5, 4) and '--install-layout=deb' in sys.argv:
+        sys.argv.remove('--install-layout=deb')
     kwargs['package_dir'] = {modname : '.'}
     packages = [modname] + get_packages(os.getcwd(), modname)
     if USE_SETUPTOOLS and install_requires: