diff options
author | Benoit Pierre <benoit.pierre@gmail.com> | 2017-07-21 16:39:15 +0200 |
---|---|---|
committer | Benoit Pierre <benoit.pierre@gmail.com> | 2017-07-26 20:37:58 +0200 |
commit | 75e88f63cc0308f7933e936b171f9cba2d04e7ad (patch) | |
tree | 6e631c3055a969b5fed88be6229bb01434381488 /setuptools/command/test.py | |
parent | 0c86c6a290c6ddce7732228820482a600f7520ca (diff) | |
download | external_python_setuptools-75e88f63cc0308f7933e936b171f9cba2d04e7ad.tar.gz external_python_setuptools-75e88f63cc0308f7933e936b171f9cba2d04e7ad.tar.bz2 external_python_setuptools-75e88f63cc0308f7933e936b171f9cba2d04e7ad.zip |
fix `test` command handling of `extras_require`
Also install platform specific requirements in `extras_require`.
Diffstat (limited to 'setuptools/command/test.py')
-rw-r--r-- | setuptools/command/test.py | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/setuptools/command/test.py b/setuptools/command/test.py index b8863fdc..638d0c56 100644 --- a/setuptools/command/test.py +++ b/setuptools/command/test.py @@ -11,7 +11,7 @@ from setuptools.extern import six from setuptools.extern.six.moves import map, filter from pkg_resources import (resource_listdir, resource_exists, normalize_path, - working_set, _namespace_packages, + working_set, _namespace_packages, evaluate_marker, add_activation_listener, require, EntryPoint) from setuptools import Command from setuptools.py31compat import unittest_main @@ -191,9 +191,13 @@ class test(Command): Install the requirements indicated by self.distribution and return an iterable of the dists that were built. """ - ir_d = dist.fetch_build_eggs(dist.install_requires or []) + ir_d = dist.fetch_build_eggs(dist.install_requires) tr_d = dist.fetch_build_eggs(dist.tests_require or []) - return itertools.chain(ir_d, tr_d) + er_d = dist.fetch_build_eggs( + v for k, v in dist.extras_require.items() + if k.startswith(':') and evaluate_marker(k[1:]) + ) + return itertools.chain(ir_d, tr_d, er_d) def run(self): installed_dists = self.install_dists(self.distribution) |