Skip to content

Commit 87e4158

Browse files
authored
Merge pull request #174 from chriskuehl/skip-installing-setuptools
preinstall setuptools for `pip download`
2 parents 2210b74 + 6b298ae commit 87e4158

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

tests/conftest.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
import requests
1212

1313

14-
PIP_TEST_VERSION = '23.2.1'
14+
PIP_TEST_VERSION = '25.1.1'
1515

1616

1717
UrlAndPath = collections.namedtuple('UrlAndPath', ('url', 'path'))
@@ -62,6 +62,7 @@ def install_pip(version, path):
6262

6363
pip = path.join('bin', 'pip').strpath
6464
subprocess.check_call((pip, 'install', '-i', 'https://pypi.org/simple', f'pip=={version}'))
65+
subprocess.check_call((pip, 'install', '-i', 'https://pypi.org/simple', 'setuptools'))
6566

6667
version_output = subprocess.check_output((pip, '--version'))
6768
assert version_output.split()[1].decode('ascii') == version

tests/integration_test.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ def install_packages(path, fake_packages):
2828

2929
def pip_download(pip, index_url, path, *spec):
3030
subprocess.check_call(
31-
(pip, 'download', '-i', index_url, '--dest', path, *spec),
31+
(pip, 'download', '-i', index_url, '--dest', path, *spec, '--no-use-pep517'),
3232
)
3333

3434

@@ -152,6 +152,6 @@ def test_pip_uses_core_metadata(capfd, tmpdir, tmpweb, pip):
152152
downloaded_package, = tmpdir.listdir(fil=os.path.isfile)
153153
assert downloaded_package.basename == 'foo-1-py2.py3-none-any.whl'
154154
assert (
155-
f'Obtaining dependency information for foo from {tmpweb.url}/pool/foo-1-py2.py3-none-any.whl.metadata'
155+
f'Downloading {tmpweb.url}/pool/foo-1-py2.py3-none-any.whl.metadata'
156156
in capfd.readouterr().out
157157
)

0 commit comments

Comments
 (0)