summaryrefslogtreecommitdiff
path: root/pip/req/req_install.py
diff options
context:
space:
mode:
authorDonald Stufft <donald@stufft.io>2016-11-03 08:29:58 -0400
committerGitHub <noreply@github.com>2016-11-03 08:29:58 -0400
commit20cae694dd2841e15ec0a0d92765e43b7fad0036 (patch)
treed8cee97b55a3009fb9bcc9906bf8f3b5a15b0e55 /pip/req/req_install.py
parent382a7e111be499195c1b3321ff6d649c34605992 (diff)
downloadpip-revert-3724-norm-path.tar.gz
Revert "Normalize file URLs"revert-3724-norm-path
Diffstat (limited to 'pip/req/req_install.py')
-rw-r--r--pip/req/req_install.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/pip/req/req_install.py b/pip/req/req_install.py
index 7c6bb332a..1a98f377b 100644
--- a/pip/req/req_install.py
+++ b/pip/req/req_install.py
@@ -212,8 +212,10 @@ class InstallRequirement(object):
# it's a local file, dir, or url
if link:
- # Normalize URLs
- link.normalize()
+ # Handle relative file URLs
+ if link.scheme == 'file' and re.search(r'\.\./', link.url):
+ link = Link(
+ path_to_url(os.path.normpath(os.path.abspath(link.path))))
# wheel file
if link.is_wheel:
wheel = Wheel(link.filename) # can raise InvalidWheelFilename