summaryrefslogtreecommitdiff
path: root/setuptools/py31compat.py
diff options
context:
space:
mode:
authorShashank Singh <shashanksingh28@gmail.com>2019-04-20 23:24:41 -0400
committerPaul Ganssle <paul@ganssle.io>2019-04-22 10:19:28 -0400
commit901f7cc2a036bfeb93bfbe480608e04c76c2c5ec (patch)
tree0962d11daf503ab65ecdce1f4c400768d1efebaa /setuptools/py31compat.py
parentab79268c792ce2a5f0ccaed65dd0bc668fbbdba3 (diff)
downloadpython-setuptools-git-901f7cc2a036bfeb93bfbe480608e04c76c2c5ec.tar.gz
Fix error when wheels already exist in dist/
`build_meta.build_wheel` assumes that the only wheel in its output directory is the one it builds, but prior to this, it also used the `dist/` folder as its working output directory. This commit uses a temporary directory instead, preventing an error that was triggered when previously-generated wheel files were still sitting in `dist/`. Fixes GH #1671
Diffstat (limited to 'setuptools/py31compat.py')
-rw-r--r--setuptools/py31compat.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/setuptools/py31compat.py b/setuptools/py31compat.py
index 1a0705ec..e1da7ee2 100644
--- a/setuptools/py31compat.py
+++ b/setuptools/py31compat.py
@@ -17,9 +17,9 @@ except ImportError:
errors on deletion.
"""
- def __init__(self):
+ def __init__(self, **kwargs):
self.name = None # Handle mkdtemp raising an exception
- self.name = tempfile.mkdtemp()
+ self.name = tempfile.mkdtemp(**kwargs)
def __enter__(self):
return self.name