summaryrefslogtreecommitdiff
path: root/setup.py
diff options
context:
space:
mode:
authorSylvain Th?nault <sylvain.thenault@logilab.fr>2010-04-20 07:47:07 +0200
committerSylvain Th?nault <sylvain.thenault@logilab.fr>2010-04-20 07:47:07 +0200
commit81ecc63500fa79144c876e19cbd39915f3a051a5 (patch)
tree9dfe52150249e345db8b1ef7d4f2383113766880 /setup.py
parentd6ffa3ae27241db83671908765ce825d09ac0985 (diff)
downloadlogilab-common-81ecc63500fa79144c876e19cbd39915f3a051a5.tar.gz
canonical setup.py
Diffstat (limited to 'setup.py')
-rw-r--r--setup.py38
1 files changed, 10 insertions, 28 deletions
diff --git a/setup.py b/setup.py
index a888546..0435cae 100644
--- a/setup.py
+++ b/setup.py
@@ -30,34 +30,15 @@ sys.modules.pop('__pkginfo__', None)
from __pkginfo__ import modname, version, license, short_desc, long_desc, \
web, author, author_email
# import optional features
-try:
- from __pkginfo__ import distname
-except ImportError:
- distname = modname
-try:
- from __pkginfo__ import scripts
-except ImportError:
- scripts = []
-try:
- from __pkginfo__ import data_files
-except ImportError:
- data_files = None
-try:
- from __pkginfo__ import subpackage_of
-except ImportError:
- subpackage_of = None
-try:
- from __pkginfo__ import include_dirs
-except ImportError:
- include_dirs = []
-try:
- from __pkginfo__ import ext_modules
-except ImportError:
- ext_modules = None
-try:
- from __pkginfo__ import install_requires
-except ImportError:
- install_requires = None
+import __pkginfo__
+distname = getattr(__pkginfo__, 'distname', modname)
+scripts = getattr(__pkginfo__, 'scripts', [])
+data_files = getattr(__pkginfo__, 'data_files', None)
+subpackage_of = getattr(__pkginfo__, 'subpackage_of', None)
+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', None)
STD_BLACKLIST = ('CVS', '.svn', '.hg', 'debian', 'dist', 'build')
@@ -193,6 +174,7 @@ def install(**kwargs):
packages = [modname] + get_packages(os.getcwd(), modname)
if USE_SETUPTOOLS and install_requires:
kwargs['install_requires'] = install_requires
+ kwargs['dependency_links'] = dependency_links
kwargs['packages'] = packages
return setup(name = distname,
version = version,