Commit e71c3e86 by Sébastien Eustace

Fix handling of packages with bad markers for PyPiRepository

parent 1bc9cdcb
......@@ -19,6 +19,7 @@
### Fixed
- Fixed `show` command for VCS dependencies.
- Fixed handling of releases with bad markers in PyPiRepository.
## [0.3.0] - 2018-03-05
......
......@@ -84,6 +84,13 @@ class PyPiRepository(Repository):
release_info = self.get_release_info(name, version)
package = Package(name, version, version)
for req in release_info['requires_dist']:
try:
req = InstallRequirement.from_line(req)
except Exception:
# Probably an invalid marker
# We strip the markers hoping for the best
req = req.split(';')[0]
req = InstallRequirement.from_line(req)
name = req.name
......
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