mirror of
https://github.com/kennethreitz/pipenv.git
synced 2026-06-05 22:50:18 +00:00
Fake upgrade to requirementslib 1.0.5
This commit is contained in:
+15
-9
@@ -2,6 +2,7 @@
|
||||
from __future__ import absolute_import
|
||||
import logging
|
||||
import os
|
||||
import posixpath
|
||||
import six
|
||||
|
||||
from itertools import product
|
||||
@@ -60,20 +61,25 @@ def is_vcs(pipfile_entry):
|
||||
|
||||
|
||||
def get_converted_relative_path(path, relative_to=os.curdir):
|
||||
"""Given a vague relative path, return the path relative to the given location"""
|
||||
"""Convert `path` to be relative.
|
||||
|
||||
Given a vague relative path, return the path relative to the given
|
||||
location.
|
||||
|
||||
This performs additional conversion to ensure the result is of POSIX form,
|
||||
and starts with `./`, or is precisely `.`.
|
||||
"""
|
||||
start = Path(relative_to)
|
||||
try:
|
||||
start = start.resolve()
|
||||
except OSError:
|
||||
start = start.absolute()
|
||||
path = start.joinpath(".", path).relative_to(start)
|
||||
# Normalize these to use forward slashes even on windows
|
||||
if os.name == "nt":
|
||||
relpath = os.altsep.join([".", path.as_posix()])
|
||||
relpath = os.sep.join([".", path.as_posix()])
|
||||
if relpath in ['./.', '.\\.']:
|
||||
relpath = '.'
|
||||
return relpath
|
||||
path = start.joinpath(path).relative_to(start)
|
||||
|
||||
relpath_s = posixpath.normpath(path.as_posix())
|
||||
if not (relpath_s == "." or relpath_s.startswith("./")):
|
||||
relpath_s = posixpath.join(".", relpath_s)
|
||||
return relpath_s
|
||||
|
||||
|
||||
def multi_split(s, split):
|
||||
|
||||
Vendored
+1
-1
@@ -27,7 +27,7 @@ requests==2.19.1
|
||||
idna==2.7
|
||||
urllib3==1.23
|
||||
certifi==2018.4.16
|
||||
requirementslib==1.0.4
|
||||
requirementslib==1.0.5
|
||||
attrs==18.1.0
|
||||
distlib==0.2.7
|
||||
packaging==17.1
|
||||
|
||||
Reference in New Issue
Block a user