mirror of
https://github.com/kennethreitz/pipenv.git
synced 2026-06-05 22:50:18 +00:00
Better handling of wheels / update requirementslib
Signed-off-by: Dan Ryan <dan@danryan.co>
This commit is contained in:
@@ -10,10 +10,7 @@ import sysconfig
|
||||
import warnings
|
||||
from collections import OrderedDict
|
||||
|
||||
try:
|
||||
import pip._internal.utils.glibc
|
||||
except ImportError:
|
||||
import pip.utils.glibc
|
||||
import pipenv.patched.notpip._internal.utils.glibc
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
@@ -157,7 +154,7 @@ def is_manylinux1_compatible():
|
||||
pass
|
||||
|
||||
# Check glibc version. CentOS 5 uses glibc 2.5.
|
||||
return pip._internal.utils.glibc.have_compatible_glibc(2, 5)
|
||||
return pipenv.patched.notpip._internal.utils.glibc.have_compatible_glibc(2, 5)
|
||||
|
||||
|
||||
def get_darwin_arches(major, minor, machine):
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
# -*- coding=utf-8 -*-
|
||||
__version__ = "0.0.6"
|
||||
__version__ = "0.0.7.dev0"
|
||||
|
||||
from .requirements import Requirement
|
||||
|
||||
+5
-2
@@ -8,7 +8,7 @@ import requirements
|
||||
import six
|
||||
from attr import attrs, attrib, Factory, validators
|
||||
import attr
|
||||
from ._compat import Link, path_to_url, _strip_extras, InstallRequirement
|
||||
from ._compat import Link, path_to_url, _strip_extras, InstallRequirement, Wheel
|
||||
from distlib.markers import Evaluator
|
||||
from packaging.markers import Marker, InvalidMarker
|
||||
from packaging.specifiers import SpecifierSet, InvalidSpecifier
|
||||
@@ -306,7 +306,10 @@ class FileRequirement(BaseRequirement):
|
||||
@link.default
|
||||
def get_link(self):
|
||||
target = "{0}#egg={1}".format(self.uri, self.name)
|
||||
return Link(target)
|
||||
link = Link(target)
|
||||
if link.is_wheel and self._has_hashed_name:
|
||||
self.name = os.path.basename(Wheel(link.path).name)
|
||||
return link
|
||||
|
||||
@req.default
|
||||
def get_requirement(self):
|
||||
|
||||
@@ -1,16 +1,25 @@
|
||||
diff --git a/pipenv/patched/notpip/_internal/pep425tags.py b/pipenv/patched/notpip/_internal/pep425tags.py
|
||||
index bea31585..9e9609f3 100644
|
||||
index bea31585..4205f6e0 100644
|
||||
--- a/pipenv/patched/notpip/_internal/pep425tags.py
|
||||
+++ b/pipenv/patched/notpip/_internal/pep425tags.py
|
||||
@@ -11,9 +11,9 @@ import warnings
|
||||
@@ -10,10 +10,7 @@ import sysconfig
|
||||
import warnings
|
||||
from collections import OrderedDict
|
||||
|
||||
try:
|
||||
-try:
|
||||
- import pip._internal.utils.glibc
|
||||
+ import pipenv.patched.notpip._internal.utils.glibc
|
||||
except ImportError:
|
||||
-except ImportError:
|
||||
- import pip.utils.glibc
|
||||
+ import pipenv.patched.notpip.utils.glibc
|
||||
+import pipenv.patched.notpip._internal.utils.glibc
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
@@ -157,7 +154,7 @@ def is_manylinux1_compatible():
|
||||
pass
|
||||
|
||||
# Check glibc version. CentOS 5 uses glibc 2.5.
|
||||
- return pip._internal.utils.glibc.have_compatible_glibc(2, 5)
|
||||
+ return pipenv.patched.notpip._internal.utils.glibc.have_compatible_glibc(2, 5)
|
||||
|
||||
|
||||
def get_darwin_arches(major, minor, machine):
|
||||
|
||||
Reference in New Issue
Block a user