diff options
author | Sylvain Thénault <sylvain.thenault@logilab.fr> | 2012-10-23 18:03:16 +0200 |
---|---|---|
committer | Sylvain Thénault <sylvain.thenault@logilab.fr> | 2012-10-23 18:03:16 +0200 |
commit | 04cda80884f3d11db6e81724d0afa268332ba588 (patch) | |
tree | 3017c44962fc928afd4e75a16d54e9360529ba31 /setup.py | |
parent | 77161c6367ed0adbeb6d9f457a7751918d3337c6 (diff) | |
parent | e4b3de5f4e7828ab71eb8713c7bf4da20bbfc602 (diff) | |
download | astroid-git-04cda80884f3d11db6e81724d0afa268332ba588.tar.gz |
backport stable
Diffstat (limited to 'setup.py')
-rw-r--r-- | setup.py | 21 |
1 files changed, 16 insertions, 5 deletions
@@ -1,7 +1,7 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- # pylint: disable=W0404,W0622,W0704,W0613 -# copyright 2003-2011 LOGILAB S.A. (Paris, FRANCE), all rights reserved. +# copyright 2003-2012 LOGILAB S.A. (Paris, FRANCE), all rights reserved. # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr # # This file is part of logilab-astng. @@ -60,6 +60,7 @@ include_dirs = getattr(__pkginfo__, 'include_dirs', []) ext_modules = getattr(__pkginfo__, 'ext_modules', None) install_requires = getattr(__pkginfo__, 'install_requires', None) dependency_links = getattr(__pkginfo__, 'dependency_links', []) +classifiers = getattr(__pkginfo__, 'classifiers', []) STD_BLACKLIST = ('CVS', '.svn', '.hg', 'debian', 'dist', 'build') @@ -104,8 +105,7 @@ except ImportError: ''' class MyInstallLib(install_lib.install_lib): - """extend install_lib command to handle package __init__.py and - include_dirs variable if necessary + """extend install_lib command to handle package __init__.py if necessary """ def run(self): """overridden from install_lib class""" @@ -118,17 +118,27 @@ class MyInstallLib(install_lib.install_lib): stream = open(product_init, 'w') stream.write(EMPTY_FILE) stream.close() + + +class MyBuildPy(build_py): + """extend build_by command to handle include_dirs variable if necessary + """ + def run(self): + """overridden from install_lib class""" + build_py.run(self) # manually install included directories if any if include_dirs: if subpackage_of: base = join(subpackage_of, modname) else: base = modname + basedir = os.path.join(self.build_lib, base) for directory in include_dirs: - dest = join(self.install_dir, base, directory) + dest = join(basedir, directory) shutil.rmtree(dest, ignore_errors=True) shutil.copytree(directory, dest) + def install(**kwargs): """setup entry point""" if USE_SETUPTOOLS: @@ -155,6 +165,7 @@ def install(**kwargs): license = license, description = description, long_description = long_description, + classifiers = classifiers, author = author, author_email = author_email, url = web, @@ -162,7 +173,7 @@ def install(**kwargs): data_files = data_files, ext_modules = ext_modules, cmdclass = {'install_lib': MyInstallLib, - 'build_py': build_py}, + 'build_py': MyBuildPy}, **kwargs ) |