diff options
author | Mike Crute <mike@crute.us> | 2017-06-18 18:29:39 -0700 |
---|---|---|
committer | Mike Crute <mike@crute.us> | 2017-06-18 18:29:39 -0700 |
commit | e4c1d4ff74ea84dcf8ebde028f11119bf9274a40 (patch) | |
tree | ffe352da3086a14acb649fc572d2005771455f67 | |
parent | 026621490c0b439dfe215075b80d71d57a9314ee (diff) | |
download | pydora-e4c1d4ff74ea84dcf8ebde028f11119bf9274a40.tar.bz2 pydora-e4c1d4ff74ea84dcf8ebde028f11119bf9274a40.tar.xz pydora-e4c1d4ff74ea84dcf8ebde028f11119bf9274a40.zip |
Copy in install dists
-rwxr-xr-x | setup.py | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -1,5 +1,6 @@ | |||
1 | #!/usr/bin/env python | 1 | #!/usr/bin/env python |
2 | 2 | ||
3 | import itertools | ||
3 | from setuptools.command.test import test | 4 | from setuptools.command.test import test |
4 | from setuptools import setup, find_packages | 5 | from setuptools import setup, find_packages |
5 | 6 | ||
@@ -9,6 +10,13 @@ class TestsWithCoverage(test, object): | |||
9 | 10 | ||
10 | description = "run unit tests with coverage" | 11 | description = "run unit tests with coverage" |
11 | 12 | ||
13 | # Copypasta from setuptools 36.0.1 because older versions don't have it | ||
14 | @staticmethod | ||
15 | def install_dists(dist): | ||
16 | ir_d = dist.fetch_build_eggs(dist.install_requires or []) | ||
17 | tr_d = dist.fetch_build_eggs(dist.tests_require or []) | ||
18 | return itertools.chain(ir_d, tr_d) | ||
19 | |||
12 | def run(self): | 20 | def run(self): |
13 | # Must install test_requires before importing coverage | 21 | # Must install test_requires before importing coverage |
14 | self.install_dists(self.distribution) | 22 | self.install_dists(self.distribution) |