Commit ea65ea92 by Sébastien Eustace Committed by Sébastien Eustace

Fix missing dependencies in some cases

parent ac96b2db
# Change Log # Change Log
## [Unreleased]
### Fixed
- Fixed missing dependencies when resolving in some cases.
## [0.11.1] - 2018-06-29 ## [0.11.1] - 2018-06-29
### Fixed ### Fixed
......
...@@ -382,6 +382,12 @@ class Provider: ...@@ -382,6 +382,12 @@ class Provider:
continue continue
markers = pep_508_dep.split(";")[1].strip() markers = pep_508_dep.split(";")[1].strip()
if not markers:
# One of the constraint has no markers
# so this means we don't actually need to merge
new_markers = []
break
new_markers.append("({})".format(markers)) new_markers.append("({})".format(markers))
if not new_markers: if not new_markers:
......
...@@ -275,7 +275,7 @@ class PyPiRepository(Repository): ...@@ -275,7 +275,7 @@ class PyPiRepository(Repository):
# dependencies by introspecting packages # dependencies by introspecting packages
urls = {} urls = {}
for url in json_data["urls"]: for url in json_data["urls"]:
# Only get sdist and universal wheels # Only get sdist and universal wheels if they exist
dist_type = url["packagetype"] dist_type = url["packagetype"]
if dist_type not in ["sdist", "bdist_wheel"]: if dist_type not in ["sdist", "bdist_wheel"]:
continue continue
...@@ -299,6 +299,23 @@ class PyPiRepository(Repository): ...@@ -299,6 +299,23 @@ class PyPiRepository(Repository):
continue continue
if not urls: if not urls:
# If we don't have urls, we try to take the first one
# we find and go from there
if not json_data["urls"]:
return data
for url in json_data["urls"]:
# Only get sdist and universal wheels if they exist
dist_type = url["packagetype"]
if dist_type != "bdist_wheel":
continue
urls[url["packagetype"]] = url["url"]
break
if not urls:
return data return data
info = self._get_info_from_urls(urls) info = self._get_info_from_urls(urls)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment