[pkg] fix bug for NO_SETUPTOOLS stable
authorAlain Leufroy <alain.leufroy@logilab.fr>
Mon, 17 Jan 2011 14:57:34 +0100
branchstable
changeset 261 c8a033219ba0
parent 260 42f52b055a68
child 262 8cb86b85a22e
[pkg] fix bug for NO_SETUPTOOLS
setup.py
--- a/setup.py	Fri Jan 14 18:01:31 2011 +0100
+++ b/setup.py	Mon Jan 17 14:57:34 2011 +0100
@@ -174,10 +174,13 @@
     # 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')
+    cmdclass = {'install_lib': MyInstallLib}
     if USE_SETUPTOOLS:
         kwargs['install_requires'] = install_requires
         kwargs['dependency_links'] = dependency_links
         kwargs['zip_safe'] = False
+        cmdclass['install_data'] = MyInstallData
+
     return setup(name = distname,
                  version = version,
                  license = license,
@@ -189,8 +192,7 @@
                  scripts = ensure_scripts(scripts),
                  data_files = data_files,
                  ext_modules = ext_modules,
-                 cmdclass = {'install_lib': MyInstallLib,
-                             'install_data':MyInstallData},
+                 cmdclass = cmdclass,
                  **kwargs
                  )