From 12fe738fd0b78f42a12d3aed4ee9c2863b8c31e7 Mon Sep 17 00:00:00 2001 From: Chih-Hsuan Yen Date: Fri, 11 Dec 2020 04:34:59 +0800 Subject: [PATCH] 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 --- setuptools/tests/test_virtualenv.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/setuptools/tests/test_virtualenv.py b/setuptools/tests/test_virtualenv.py index c8ed9e57ea7..e7b100fba4f 100644 --- a/setuptools/tests/test_virtualenv.py +++ b/setuptools/tests/test_virtualenv.py @@ -2,6 +2,8 @@ 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 sdist(distname, version): 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'),