1
1
Fork 0
mirror of https://github.com/pypa/pip synced 2023-12-13 21:30:23 +01:00

Merge pull request #1311 from mwilliamson/py3-symlinks

Fix: "pip install ." fails on Python 3.3 (with symlinks in local directory)
This commit is contained in:
Donald Stufft 2013-11-19 05:45:36 -08:00
commit 68eb2c4a1b
8 changed files with 27 additions and 2 deletions

View file

@ -359,7 +359,7 @@ def unpack_file_url(link, location):
# delete the location since shutil will create it again :(
if os.path.isdir(location):
rmtree(location)
shutil.copytree(source, location)
shutil.copytree(source, location, symlinks=True)
else:
unpack_file(source, location, content_type, link)

View file

View file

@ -0,0 +1 @@
doc

View file

@ -0,0 +1,3 @@
[egg_info]
tag_build = dev
tag_svn_revision = true

View file

@ -0,0 +1,8 @@
from setuptools import setup
version = '0.1'
setup(name='symlinks',
version=version,
packages=["symlinks"],
)

View file

@ -0,0 +1 @@
#

View file

@ -208,6 +208,18 @@ def test_install_from_local_directory(script, data):
assert egg_info_folder in result.files_created, str(result)
def test_install_from_local_directory_with_symlinks_to_directories(script, data):
"""
Test installing from a local directory containing symlinks to directories.
"""
to_install = data.packages.join("symlinks")
result = script.pip('install', to_install, expect_error=False)
pkg_folder = script.site_packages/'symlinks'
egg_info_folder = script.site_packages/'symlinks-0.1dev-py%s.egg-info' % pyversion
assert pkg_folder in result.files_created, str(result.stdout)
assert egg_info_folder in result.files_created, str(result)
def test_install_from_local_directory_with_no_setup_py(script, data):
"""
Test installing from a local directory with no 'setup.py'.

View file

@ -264,7 +264,7 @@ class Path(_base):
"""
Copies a directory tree to another path.
"""
return shutil.copytree(self, to)
return shutil.copytree(self, to, symlinks=True)
def move(self, to):
"""