[packaging] fix setup.py for use w/ lgp
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Tue, 20 Apr 2010 16:30:01 +0200
changeset 5353 cb8ac7263f8a
parent 5352 be44c58d3ed9
child 5354 ba9fe740688c
[packaging] fix setup.py for use w/ lgp
setup.py
--- a/setup.py	Tue Apr 20 15:55:50 2010 +0200
+++ b/setup.py	Tue Apr 20 16:30:01 2010 +0200
@@ -165,10 +165,12 @@
 
 def install(**kwargs):
     """setup entry point"""
-    if not USE_SETUPTOOLS and '--install-layout=deb' in sys.argv and \
-           sys.versioninfo < (2, 5, 4):
-       sys.argv.remove('--install-layout=deb')
-       print "W: remove '--install-layout=deb' option"
+    if USE_SETUPTOOLS:
+        if '--force-manifest' in sys.argv:
+            sys.argv.remove('--force-manifest')
+    # 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')
     if subpackage_of:
         package = subpackage_of + '.' + modname
         kwargs['package_dir'] = {package : '.'}