mirror of https://github.com/pypa/pip
Remove copytree from tests.lib.path.Path.
This commit is contained in:
parent
0d286012f7
commit
9281a7aac1
|
@ -239,7 +239,7 @@ def virtualenv_template(request, tmpdir_factory, pip_src,
|
||||||
# Install setuptools and pip.
|
# Install setuptools and pip.
|
||||||
install_egg_link(venv, 'setuptools', setuptools_install)
|
install_egg_link(venv, 'setuptools', setuptools_install)
|
||||||
pip_editable = Path(str(tmpdir_factory.mktemp('pip'))) / 'pip'
|
pip_editable = Path(str(tmpdir_factory.mktemp('pip'))) / 'pip'
|
||||||
pip_src.copytree(pip_editable)
|
shutil.copytree(pip_src, pip_editable, symlinks=True)
|
||||||
assert compileall.compile_dir(str(pip_editable), quiet=1)
|
assert compileall.compile_dir(str(pip_editable), quiet=1)
|
||||||
subprocess.check_call([venv.bin / 'python', 'setup.py', '-q', 'develop'],
|
subprocess.check_call([venv.bin / 'python', 'setup.py', '-q', 'develop'],
|
||||||
cwd=pip_editable)
|
cwd=pip_editable)
|
||||||
|
|
|
@ -143,7 +143,7 @@ class TestData(object):
|
||||||
# try/except.
|
# try/except.
|
||||||
if self.root.exists():
|
if self.root.exists():
|
||||||
shutil.rmtree(self.root)
|
shutil.rmtree(self.root)
|
||||||
self.source.copytree(self.root)
|
shutil.copytree(self.source, self.root, symlinks=True)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def packages(self):
|
def packages(self):
|
||||||
|
|
|
@ -179,12 +179,6 @@ class Path(_base):
|
||||||
"""
|
"""
|
||||||
return os.rmdir(self)
|
return os.rmdir(self)
|
||||||
|
|
||||||
def copytree(self, to):
|
|
||||||
"""
|
|
||||||
Copies a directory tree to another path.
|
|
||||||
"""
|
|
||||||
return shutil.copytree(self, to, symlinks=True)
|
|
||||||
|
|
||||||
def rename(self, to):
|
def rename(self, to):
|
||||||
"""
|
"""
|
||||||
Renames a file or directory. May throw an OSError.
|
Renames a file or directory. May throw an OSError.
|
||||||
|
|
|
@ -55,7 +55,9 @@ class VirtualEnvironment(object):
|
||||||
if sys.platform == 'win32' and self.location.exists():
|
if sys.platform == 'win32' and self.location.exists():
|
||||||
self.location.rmdir()
|
self.location.rmdir()
|
||||||
# Clone virtual environment from template.
|
# Clone virtual environment from template.
|
||||||
self._template.location.copytree(self.location)
|
shutil.copytree(
|
||||||
|
self._template.location, self.location, symlinks=True
|
||||||
|
)
|
||||||
self._sitecustomize = self._template.sitecustomize
|
self._sitecustomize = self._template.sitecustomize
|
||||||
self._user_site_packages = self._template.user_site_packages
|
self._user_site_packages = self._template.user_site_packages
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in New Issue