diff options
author | Mike Crute <mcrute@gmail.com> | 2017-05-25 19:19:43 -0700 |
---|---|---|
committer | Mike Crute <mcrute@gmail.com> | 2017-05-25 19:21:03 -0700 |
commit | 709a25482a0e9a6b4d66561d5ea48253a230d01c (patch) | |
tree | bd4eefe144f9c327ea03df7bb4c3c4b4f0440def /setup.py | |
parent | 62d6832e40ff62c656c5a76589a6da9b010ba8b6 (diff) | |
download | pydora-709a25482a0e9a6b4d66561d5ea48253a230d01c.tar.bz2 pydora-709a25482a0e9a6b4d66561d5ea48253a230d01c.tar.xz pydora-709a25482a0e9a6b4d66561d5ea48253a230d01c.zip |
Remove py_release_tools, use flake8
Diffstat (limited to 'setup.py')
-rwxr-xr-x | setup.py | 36 |
1 files changed, 35 insertions, 1 deletions
@@ -1,7 +1,34 @@ | |||
1 | #!/usr/bin/env python | 1 | #!/usr/bin/env python |
2 | 2 | ||
3 | from setuptools.command.test import test | ||
3 | from setuptools import setup, find_packages | 4 | from setuptools import setup, find_packages |
4 | 5 | ||
6 | |||
7 | class TestsWithCoverage(test): | ||
8 | |||
9 | description = "run unit tests with coverage" | ||
10 | |||
11 | def run(self): | ||
12 | # Must install test_requires before importing coverage | ||
13 | self.install_dists(self.distribution) | ||
14 | |||
15 | from coverage import coverage | ||
16 | |||
17 | cov = coverage(data_file=".coverage", branch=True, | ||
18 | source=self.distribution.packages) | ||
19 | cov.start() | ||
20 | |||
21 | # Unittest calls exit prior to python 3. How naughty | ||
22 | try: | ||
23 | super(TestsWithCoverage, self).run() | ||
24 | except SystemExit: | ||
25 | pass | ||
26 | |||
27 | cov.stop() | ||
28 | cov.xml_report(outfile="coverage.xml") | ||
29 | cov.html_report() | ||
30 | |||
31 | |||
5 | setup( | 32 | setup( |
6 | name="pydora", | 33 | name="pydora", |
7 | version="1.8.0", | 34 | version="1.8.0", |
@@ -12,9 +39,16 @@ setup( | |||
12 | url="https://github.com/mcrute/pydora", | 39 | url="https://github.com/mcrute/pydora", |
13 | test_suite="tests.discover_suite", | 40 | test_suite="tests.discover_suite", |
14 | packages=find_packages(exclude=["tests", "tests.*"]), | 41 | packages=find_packages(exclude=["tests", "tests.*"]), |
42 | cmdclass={ | ||
43 | "test": TestsWithCoverage, | ||
44 | }, | ||
15 | setup_requires=[ | 45 | setup_requires=[ |
16 | "py_release_tools", | ||
17 | "wheel", | 46 | "wheel", |
47 | "flake8>=3.3", | ||
48 | ], | ||
49 | tests_require=[ | ||
50 | "mock>=1.0", | ||
51 | "coverage>=4.0", | ||
18 | ], | 52 | ], |
19 | install_requires=[ | 53 | install_requires=[ |
20 | "pycrypto>=2.6.1", | 54 | "pycrypto>=2.6.1", |