diff options
author | Chih-Hsuan Yen <yan12125@gmail.com> | 2020-12-11 04:34:59 +0800 |
---|---|---|
committer | Jason R. Coombs <jaraco@jaraco.com> | 2020-12-12 13:35:23 -0500 |
commit | 1603dcbaae3bbee4fa90e34828146e348c661401 (patch) | |
tree | 0239b4837d62f011fa2d329a1f1291f377223cbb | |
parent | d97cb2b35ec9afe2839a48587a456d81b0055a60 (diff) | |
download | python-setuptools-git-1603dcbaae3bbee4fa90e34828146e348c661401.tar.gz |
Fix test_test_command_install_requirements with pip 20.3+
setuptools appends --find-links to pip if dependency_links is found, and
both takes URLs [1][2].
[1] https://github.com/pypa/setuptools/blob/v51.0.0/docs/userguide/dependency_management.rst#dependencies-that-arent-in-pypi
[2] https://pip.pypa.io/en/stable/reference/pip_install/#cmdoption-f
-rw-r--r-- | changelog.d/2478.misc.2.rst | 2 | ||||
-rw-r--r-- | setuptools/tests/test_virtualenv.py | 4 |
2 files changed, 5 insertions, 1 deletions
diff --git a/changelog.d/2478.misc.2.rst b/changelog.d/2478.misc.2.rst new file mode 100644 index 00000000..27c07b11 --- /dev/null +++ b/changelog.d/2478.misc.2.rst @@ -0,0 +1,2 @@ +Fix tests with pip 20.3+ +-- by :user:`yan12125` diff --git a/setuptools/tests/test_virtualenv.py b/setuptools/tests/test_virtualenv.py index c8ed9e57..e7b100fb 100644 --- a/setuptools/tests/test_virtualenv.py +++ b/setuptools/tests/test_virtualenv.py @@ -2,6 +2,8 @@ import glob import os import sys +import pathlib + import pytest from pytest import yield_fixture from pytest_fixture_config import yield_requires_config @@ -124,7 +126,7 @@ def _check_test_command_install_requirements(virtualenv, tmpdir): make_nspkg_sdist(str(dist_path), distname, version) return dist_path dependency_links = [ - str(dist_path) + pathlib.Path(str(dist_path)).as_uri() for dist_path in ( sdist('foobar', '2.4'), sdist('bits', '4.2'), |