From e4c1d4ff74ea84dcf8ebde028f11119bf9274a40 Mon Sep 17 00:00:00 2001 From: Mike Crute Date: Sun, 18 Jun 2017 18:29:39 -0700 Subject: Copy in install dists --- setup.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/setup.py b/setup.py index 52eeeff..f66f915 100755 --- a/setup.py +++ b/setup.py @@ -1,5 +1,6 @@ #!/usr/bin/env python +import itertools from setuptools.command.test import test from setuptools import setup, find_packages @@ -9,6 +10,13 @@ class TestsWithCoverage(test, object): description = "run unit tests with coverage" + # Copypasta from setuptools 36.0.1 because older versions don't have it + @staticmethod + def install_dists(dist): + ir_d = dist.fetch_build_eggs(dist.install_requires or []) + tr_d = dist.fetch_build_eggs(dist.tests_require or []) + return itertools.chain(ir_d, tr_d) + def run(self): # Must install test_requires before importing coverage self.install_dists(self.distribution) -- cgit v1.2.3