summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason R. Coombs <jaraco@jaraco.com>2015-01-02 15:04:45 -0500
committerJason R. Coombs <jaraco@jaraco.com>2015-01-02 15:04:45 -0500
commit0f886fd03ab2c9e300b76aebe5d474ef2f63fce1 (patch)
tree07541335f9f27d33ffbf0c2e65468f1ea6de64c6
parent6f0f2cab17bb7a22f000fe2e2a03144118caa2fc (diff)
downloadpytest-runner-0f886fd03ab2c9e300b76aebe5d474ef2f63fce1.tar.gz
Use same egg-cache-dir as used by setuptools 7.0 and later. Fixes #3.
-rw-r--r--ptr.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/ptr.py b/ptr.py
index 8d37f0b..c98981b 100644
--- a/ptr.py
+++ b/ptr.py
@@ -74,8 +74,10 @@ class PyTest(orig.test):
opts['allow_hosts'] = ('test', self.allow_hosts)
if self.index_url:
opts['index_url'] = ('test', self.index_url)
+ install_dir_func = getattr(dist, 'get_egg_cache_dir', _os.curdir)
+ install_dir = install_dir_func()
cmd = easy_install(
- dist, args=["x"], install_dir=_os.curdir, exclude_scripts=True,
+ dist, args=["x"], install_dir=install_dir, exclude_scripts=True,
always_copy=False, build_directory=None, editable=False,
upgrade=False, multi_version=True, no_report = True
)