diff options
author | Jason R. Coombs <jaraco@jaraco.com> | 2018-03-18 08:57:05 -0400 |
---|---|---|
committer | Jason R. Coombs <jaraco@jaraco.com> | 2018-03-18 08:57:05 -0400 |
commit | 8355b65ff6d3a15b3910f3a8c2c982f6a299b0e5 (patch) | |
tree | eacbdb95bab0ef7892a3dad0a02fcc79734ffef6 /ptr.py | |
parent | 1d547a0b0f85ebdc3d538d3e444a299d004b62a0 (diff) | |
download | pytest-runner-8355b65ff6d3a15b3910f3a8c2c982f6a299b0e5.tar.gz |
Moved dependency check to runtime. Fixes #40.4.2
Diffstat (limited to 'ptr.py')
-rw-r--r-- | ptr.py | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -93,6 +93,18 @@ class PyTest(orig.test): self.index_url = None self.allow_hosts = None self.addopts = [] + self.ensure_setuptools_version() + + @staticmethod + def ensure_setuptools_version(): + """ + Due to the fact that pytest-runner is often required (via + setup-requires directive) by toolchains that never invoke + it (i.e. they're only installing the package, not testing it), + instead of declaring the dependency in the package + metadata, assert the requirement at run time. + """ + pkg_resources.require('setuptools>=27.3') def finalize_options(self): if self.addopts: |