Skip to content

Commit

Permalink
Add common tests_require (auto-adding prospector/pylint)
Browse files Browse the repository at this point in the history
  • Loading branch information
stdweird committed Aug 23, 2016
1 parent e4d2ef4 commit 0a2da4b
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions lib/vsc/install/shared_setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -1114,7 +1114,7 @@ def run(self):
'url': '',
'dependency_links': [],
'install_requires': [],
'tests_require': [],
'tests_require': ['nose', 'mock'],
'setup_requires': [],
}

Expand Down Expand Up @@ -1217,6 +1217,15 @@ def parse_target(self, target, urltemplate=None):
new_target = {}
new_target.update(vsc_setup_klass.SHARED_TARGET)

if sys.version_info < (2, 7):
# py26 support dropped in 0.8, and the old versions don't detect enough
log.info('no prospector support in py26 (or older)')
else:
log.info('adding prospector to tests_require')
tests_requires = new_target.setdefault('tests_require', [])
tests_requires.extend(['prospector >= 0.12.1', 'pylint < 1.6.0'])


# update the cmdclass with ones from vsc_setup_klass
# cannot do this in one go, whne SHARED_TARGET is defined, vsc_setup doesn't exist yet
for name, klass in new_target['cmdclass'].items():
Expand Down Expand Up @@ -1424,15 +1433,6 @@ def action_target(package, *args, **kwargs):
install_requires = [
'setuptools',
]
if sys.version_info < (2, 7):
# py26 support dropped in 0.8, and the old versions don't detect enough
log.info('no prospector support in py26 (or older)')
else:
# For now, not enforcing propspector.
# It would complicate rpm creation too much.
# Should be re-added when the testing code is moved to vsc-testing
log.info('not enforcing prospector support. run "easy_install propspector" yourself')
# install_requires.append('prospector >= 0.11.7')

PACKAGE = {
'version': VERSION,
Expand Down

0 comments on commit 0a2da4b

Please sign in to comment.