diff options
Diffstat (limited to 'setup.py')
-rw-r--r-- | setup.py | 56 |
1 files changed, 10 insertions, 46 deletions
@@ -17,39 +17,17 @@ # # You should have received a copy of the GNU Lesser General Public License along # with astroid. If not, see <http://www.gnu.org/licenses/>. -"""Generic Setup script, takes package info from __pkginfo__.py file. -""" -__docformat__ = "restructuredtext en" +"""Setup script for astroid.""" +from setuptools import setup, find_packages +from astroid import __pkginfo__ +from astroid.__pkginfo__ import modname, version, license, description, \ + web, author, author_email, distname, install_requires, classifiers -import os -import sys -from os.path import isdir, exists, join +with open('README') as fobj: + long_description = fobj.read() -from setuptools import setup -sys.modules.pop('__pkginfo__', None) -# import optional features -__pkginfo__ = __import__("__pkginfo__") -# import required features -from __pkginfo__ import modname, version, license, description, \ - web, author, author_email - -distname = getattr(__pkginfo__, 'distname', modname) -data_files = getattr(__pkginfo__, 'data_files', None) -include_dirs = getattr(__pkginfo__, 'include_dirs', []) -install_requires = getattr(__pkginfo__, 'install_requires', None) -classifiers = getattr(__pkginfo__, 'classifiers', []) - -if exists('README'): - long_description = open('README').read() -else: - long_description = '' - - -def install(**kwargs): - """setup entry point""" - if '--force-manifest' in sys.argv: - sys.argv.remove('--force-manifest') +def install(): return setup(name = distname, version = version, license = license, @@ -59,25 +37,11 @@ def install(**kwargs): author = author, author_email = author_email, url = web, - data_files = data_files, include_package_data = True, install_requires = install_requires, - package_dir = {modname: '.'}, - packages = [modname], - package_data = { - '': ['brain/*.py', - 'test/regrtest_data/absimp/*.py', - 'test/regrtest_data/package/*.py', - 'test/regrtest_data/package/subpackage/*.py', - 'test/regrtest_data/absimp/sidepackage/*.py', - 'test/regrtest_data/unicode_package/*.py', - 'test/regrtest_data/unicode_package/core/*.py', - 'test/data*/*.egg', - 'test/data*/*.zip', - ], - }, - **kwargs + packages = find_packages(), ) + if __name__ == '__main__' : install() |