Commit de204b89 by Sébastien Eustace

Fix a bug where malformed sdists would lead to resolution failing

parent 1adffd46
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
### Fixed ### Fixed
- Fixed a bug in dependency resolution which led to installation errors. - Fixed a bug in dependency resolution which led to installation errors.
- Fixed a bug where malformed sdists would lead to dependency resolution failing.
## [0.8.4] - 2018-04-18 ## [0.8.4] - 2018-04-18
......
...@@ -330,7 +330,12 @@ class PyPiRepository(Repository): ...@@ -330,7 +330,12 @@ class PyPiRepository(Repository):
filepath = os.path.join(temp_dir, filename) filepath = os.path.join(temp_dir, filename)
self._download(url, filepath) self._download(url, filepath)
meta = pkginfo.Wheel(filepath) try:
meta = pkginfo.Wheel(filepath)
except ValueError:
# Unable to determine dependencies
# Assume none
return
if meta.requires_dist: if meta.requires_dist:
return meta.requires_dist return meta.requires_dist
...@@ -343,10 +348,15 @@ class PyPiRepository(Repository): ...@@ -343,10 +348,15 @@ class PyPiRepository(Repository):
filepath = Path(temp_dir) / filename filepath = Path(temp_dir) / filename
self._download(url, str(filepath)) self._download(url, str(filepath))
meta = pkginfo.SDist(str(filepath)) try:
meta = pkginfo.SDist(str(filepath))
if meta.requires_dist:
return meta.requires_dist if meta.requires_dist:
return meta.requires_dist
except ValueError:
# Unable to determine dependencies
# We pass and go deeper
pass
# Still not dependencies found # Still not dependencies found
# So, we unpack and introspect # So, we unpack and introspect
......
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