[pkg] pytz is only a setuptools test_require, not an install_requires (closes #281909)

authorDavid Douard <david.douard@logilab.fr>
changeset6ace36e4468f
branchdefault
phasepublic
hiddenno
parent revision#18d7d467614a [coverage] fix a bug breaking coverage.py (closes #281908)
child revision#dddc0f200882 [pkg] prepare 0.63.2
files modified by this revision
__pkginfo__.py
setup.py
# HG changeset patch
# User David Douard <david.douard@logilab.fr>
# Date 1417342617 -3600
# Sun Nov 30 11:16:57 2014 +0100
# Node ID 6ace36e4468f81d169e01b2541a6ed11a01138be
# Parent 18d7d467614ad2db9bd51dc5ccc8d9dba14fc0f9
[pkg] pytz is only a setuptools test_require, not an install_requires (closes #281909)

diff --git a/__pkginfo__.py b/__pkginfo__.py
@@ -40,12 +40,13 @@
1  scripts = [join('bin', 'pytest')]
2  include_dirs = [join('test', 'data')]
3 
4  install_requires = [
5          'six >= 1.4.0',
6 -	'pytz',
7          ]
8 +test_require = ['pytz']
9 +
10  if sys.version_info < (2, 7):
11      install_requires.append('unittest2 >= 0.5.1')
12  if os.name == 'nt':
13      install_requires.append('colorama')
14 
diff --git a/setup.py b/setup.py
@@ -52,10 +52,11 @@
15  data_files = getattr(__pkginfo__, 'data_files', None)
16  subpackage_of = getattr(__pkginfo__, 'subpackage_of', None)
17  include_dirs = getattr(__pkginfo__, 'include_dirs', [])
18  ext_modules = getattr(__pkginfo__, 'ext_modules', None)
19  install_requires = getattr(__pkginfo__, 'install_requires', None)
20 +test_require = getattr(__pkginfo__, 'test_require', None)
21  dependency_links = getattr(__pkginfo__, 'dependency_links', [])
22  classifiers = getattr(__pkginfo__, 'classifiers', [])
23 
24  STD_BLACKLIST = ('CVS', '.svn', '.hg', 'debian', 'dist', 'build')
25 
@@ -151,10 +152,11 @@
26      else:
27          kwargs['package_dir'] = {modname : '.'}
28          packages = [modname] + get_packages(os.getcwd(), modname)
29      if USE_SETUPTOOLS and install_requires:
30          kwargs['install_requires'] = install_requires
31 +        kwargs['test_require'] = test_require
32          kwargs['dependency_links'] = dependency_links
33      kwargs['packages'] = packages
34      return setup(name = distname,
35                   version = version,
36                   license = license,