Skip to content

Commit

Permalink
Add support for pip >= 21.3
Browse files Browse the repository at this point in the history
  • Loading branch information
matthias-bach-by committed Oct 29, 2021
1 parent 6be1831 commit 750d5b2
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
11 changes: 11 additions & 0 deletions CHANGELOG.rst
Expand Up @@ -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
==========================

Expand Down
3 changes: 0 additions & 3 deletions devpi_builder/wheeler.py
Expand Up @@ -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):
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 750d5b2

Please sign in to comment.