diff options
author | wbond <will@wbond.net> | 2018-04-17 00:57:21 -0400 |
---|---|---|
committer | wbond <will@wbond.net> | 2018-04-17 00:57:21 -0400 |
commit | bbc42f0d518c1eb2e5feaf0ece33c537861cb513 (patch) | |
tree | 52737a4cb75e14b37b675e2e98e0629052d658bb /dev | |
parent | c59869d1c81bfc3a67f5c62482fe34fc224d22fe (diff) | |
download | asn1crypto-bbc42f0d518c1eb2e5feaf0ece33c537861cb513.tar.gz |
Support pip 10 internals
Diffstat (limited to 'dev')
-rw-r--r-- | dev/deps.py | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/dev/deps.py b/dev/deps.py index 6999330..2b17d8f 100644 --- a/dev/deps.py +++ b/dev/deps.py @@ -127,7 +127,15 @@ def _install_requirements(_pip, tmpdir, path): A unicoe filesystem path to a requirements file """ - from pip.pep425tags import get_supported + import pip + + pip_version_info = tuple(map(int, pip.__version__.split('.'))) + + if pip_version_info < (10, ): + from pip.pep425tags import get_supported + else: + from pip._internal.pep425tags import get_supported + valid_tags = tuple(get_supported()) + (('py2.py3', 'none', 'any'),) packages = _parse_requires(path) |