summaryrefslogtreecommitdiff
path: root/setup.py
diff options
context:
space:
mode:
authorTorsten Marek <shlomme@gmail.com>2014-11-08 23:47:14 +0100
committerTorsten Marek <shlomme@gmail.com>2014-11-08 23:47:14 +0100
commit0c7327e7599c69843ffdb884d313863ec36cb6dd (patch)
treeb089fb5596dce312bdc84cf5028937449a453dda /setup.py
parent206aceba12b2aa9b8cce7fd0681905239e0f0cc5 (diff)
downloadastroid-0c7327e7599c69843ffdb884d313863ec36cb6dd.tar.gz
Move all astroid modules into a its own directory, which is now the package.
python setup.py develop now works.
Diffstat (limited to 'setup.py')
-rw-r--r--setup.py56
1 files changed, 10 insertions, 46 deletions
diff --git a/setup.py b/setup.py
index 2e4f853..bd5be28 100644
--- a/setup.py
+++ b/setup.py
@@ -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()