Move coverage to test dependency and install it properly

- Coverage should only be required if running tests

- When running test_coverage command all the install dependencies and
  test dependencies should be installed.
This commit is contained in:
Sunil Mohan Adapa 2014-12-07 11:38:33 +05:30
parent a0cd525b96
commit 5016087d5c
2 changed files with 8 additions and 2 deletions

View File

@ -68,8 +68,14 @@ class TestCoverageCommand(setuptools.Command):
"""
Main command implementation.
"""
if self.distribution.install_requires:
self.distribution.fetch_build_eggs(
self.distribution.install_requires)
# erase any existing HTML report files
if self.distribution.tests_require:
self.distribution.fetch_build_eggs(self.distribution.tests_require)
try:
shutil.rmtree(COVERAGE_REPORT_DIR, True)
except:

View File

@ -114,9 +114,9 @@ setuptools.setup(
install_requires=[
'cherrypy >= 3.0',
'django >= 1.7.0',
'django-bootstrap-form',
'coverage >= 3.7'
'django-bootstrap-form'
],
tests_require=['coverage >= 3.7'],
include_package_data=True,
package_data={'plinth': ['templates/*',
'modules/*/templates/*']},