# HG changeset patch
# User Sylvain Thénault <sylvain.thenault@logilab.fr>
# Date 1295276381 -3600
#      Mon Jan 17 15:59:41 2011 +0100
# Branch stable
# Node ID e61cf6c000e53aad41897a79a10305f1f7e7e571
# Parent  6a2ad70b6c2d3ea2837b3abd0c22dc9d72a5a8e4
[pkg] fix bug for NO_SETUPTOOLS

diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -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
                  )