mirror of
https://github.com/kennethreitz/pipenv.git
synced 2026-06-05 22:50:18 +00:00
Ignore incompatibilities when resolve dist
This commit is contained in:
@@ -0,0 +1 @@
|
||||
Fix a bug that ``importlib-metadata`` from the project's dependencies conflicts with that from ``pipenv``'s.
|
||||
@@ -118,7 +118,12 @@ class Environment(object):
|
||||
except (KeyError, AttributeError, OSError, IOError): # The METADATA file can't be found
|
||||
return deps
|
||||
for req in reqs:
|
||||
dist = working_set.find(req)
|
||||
try:
|
||||
dist = working_set.find(req)
|
||||
except pkg_resources.VersionConflict:
|
||||
# https://github.com/pypa/pipenv/issues/4549
|
||||
# The requirement is already present with incompatible version.
|
||||
continue
|
||||
deps |= cls.resolve_dist(dist, working_set)
|
||||
return deps
|
||||
|
||||
|
||||
+1
-1
@@ -12,7 +12,7 @@ os.environ["PIP_PYTHON_PATH"] = str(sys.executable)
|
||||
|
||||
def find_site_path(pkg, site_dir=None):
|
||||
import pkg_resources
|
||||
if site_dir is not None:
|
||||
if site_dir is None:
|
||||
site_dir = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
||||
working_set = pkg_resources.WorkingSet([site_dir] + sys.path[:])
|
||||
for dist in working_set:
|
||||
|
||||
Reference in New Issue
Block a user