From 008c18f75350c690d412eefd03cc21d68fa96efc Mon Sep 17 00:00:00 2001 From: Matthias Bach Date: Wed, 27 Oct 2021 17:23:41 +0200 Subject: [PATCH 1/5] Have test on Github Actions create temporary directories in the directory intended for that by Github --- .github/workflows/tests.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 9d7a2c4..ec1c850 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -27,6 +27,7 @@ jobs: python -m pip freeze - name: Test with pytest run: | + export TMPDIR="${RUNNER_TEMP}" pytest - name: Upload coverage data run: | From 46e65fe5fdd5a5b85c004ca297e77b96bf24cfb8 Mon Sep 17 00:00:00 2001 From: Matthias Bach Date: Fri, 29 Oct 2021 10:35:17 +0200 Subject: [PATCH 2/5] Dump pip and setuptools version during CI --- .github/workflows/tests.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index ec1c850..ac96a37 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -25,9 +25,10 @@ jobs: python -m pip install --no-deps -e . python -m pip install coveralls python -m pip freeze + python -m pip --version + easy_install --version - name: Test with pytest run: | - export TMPDIR="${RUNNER_TEMP}" pytest - name: Upload coverage data run: | From ca08838a9ae3e63116777bc802ecb464393fdf5e Mon Sep 17 00:00:00 2001 From: Matthias Bach Date: Fri, 29 Oct 2021 10:40:40 +0200 Subject: [PATCH 3/5] fixup! Dump pip and setuptools version during CI --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index ac96a37..3e6d9cc 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -26,7 +26,7 @@ jobs: python -m pip install coveralls python -m pip freeze python -m pip --version - easy_install --version + python -c 'import setuptools; print(f"setuptools=={setuptools.__version__}")' - name: Test with pytest run: | pytest From f3905402e4bccf1abcf3c6c4c7a9ea323d35f8f5 Mon Sep 17 00:00:00 2001 From: Matthias Bach Date: Fri, 29 Oct 2021 10:47:24 +0200 Subject: [PATCH 4/5] !nomerge Downgrade pip --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 3e6d9cc..71316e7 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -20,7 +20,7 @@ jobs: python-version: ${{ matrix.python-version }} - name: Install dependencies run: | - python -m pip install --upgrade pip + python -m pip install pip==21.0.1 python -m pip install -r requirements.txt python -m pip install --no-deps -e . python -m pip install coveralls From 94315fbe75f0eb7a0b5f46306c0bbf52d7f0a3ea Mon Sep 17 00:00:00 2001 From: Matthias Bach Date: Fri, 29 Oct 2021 11:08:53 +0200 Subject: [PATCH 5/5] Add support for pip >= 21.3 --- CHANGELOG.rst | 11 +++++++++++ devpi_builder/wheeler.py | 3 --- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 5237eba..52a1841 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -4,6 +4,17 @@ Changelog This lists the most important changes for each release. + +Version 5.1.0 — Unreleased +========================== + +Added +----- + +* Provide compatibility with pip 21.3 and above which drops the `--build-directory` option. + Pip has been using a temporary directory for builds since version 1.2 so manual handling of this directory should not be necessary anymore. + + Version 5.0.1 – 2020-09-09 ========================== diff --git a/devpi_builder/wheeler.py b/devpi_builder/wheeler.py index c532ba8..e91d48c 100644 --- a/devpi_builder/wheeler.py +++ b/devpi_builder/wheeler.py @@ -35,7 +35,6 @@ class Builder(object): def __enter__(self): self.scratch_dir = tempfile.mkdtemp() self.wheelhouse = path.join(self.scratch_dir, 'wheels') - self.builddir = path.join(self.scratch_dir, 'build') return lambda *args: self.build(*args) def __exit__(self, exc_type, exc_val, exc_tb): @@ -78,12 +77,10 @@ def build(self, package, version): :param version: The version to generate the wheel for :return: The path of the build wheel. Valid until the context is exited. """ - shutil.rmtree(self.builddir, ignore_errors=True) try: subprocess.check_output([ 'pip', 'wheel', '--wheel-dir=' + self.wheelhouse, - '--build=' + self.builddir, '{}=={}'.format(package, version) ], stderr=subprocess.STDOUT) return self._find_wheel(package, version)