-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Description
-
I am on the latest Poetry version.
-
I have searched the issues of this repo and believe that this is not a duplicate.
-
If an exception occurs when executing a command, I executed it again in debug mode (
-vvvoption). -
OS version and name: ubuntu 20.04
-
Poetry version: 1.1.5
-
Link of a Gist with the contents of your pyproject.toml file: https://gist.github.com/ossareh/2e4e4ec211536239f064511e04e802b1
-
Discord discussion (with myself!): https://discord.com/channels/487711540787675139/487711540787675143/827241500891021363
Issue
I have a case very similar to #2802 where I am installing a vendored wheel file and it the code that generates PKG-INFO is producing an invalid line.
$ poetry add --platform linux blob/pyvcam-2.1.0-cp39-cp39-linux_x86_64.whl
results in pyproject's dependencies having:
pyvcam = {path = "blob/pyvcam-2.1.0-cp39-cp39-linux_x86_64.whl", platform = "linux"}
and during a tox run the following error:
...snip...
File "/home/ossareh/dev/src/github.com/erisyon/vega/.tox/py39/lib/python3.9/site-packages/pip/_vendor/pkg_resources/__init__.py", line 3023, in _dep_map
self.__dep_map = self._compute_dependencies()
File "/home/ossareh/dev/src/github.com/erisyon/vega/.tox/py39/lib/python3.9/site-packages/pip/_vendor/pkg_resources/__init__.py", line 3033, in _compute_dependencies
reqs.extend(parse_requirements(req))
File "/home/ossareh/dev/src/github.com/erisyon/vega/.tox/py39/lib/python3.9/site-packages/pip/_vendor/pkg_resources/__init__.py", line 3094, in parse_requirements
yield Requirement(line)
File "/home/ossareh/dev/src/github.com/erisyon/vega/.tox/py39/lib/python3.9/site-packages/pip/_vendor/pkg_resources/__init__.py", line 3103, in __init__
raise RequirementParseError(str(e))
pip._vendor.pkg_resources.RequirementParseError: Parse error at "'sys_plat'": Expected stringEnd
Inside the bundle created by poetry I have:
$ grep pyvcam vega-0.1.0/PKG-INFO
Requires-Dist: pyvcam @ blob/pyvcam-2.1.0-cp39-cp39-linux_x86_64.whl; sys_platform == "linux"
According to the #2802 (linked above) I think there is meant to be a space prior to the ";". I have checked that the output of poetry build produces the same PKG-INFO entries.
I am about to submit a PR; I'm opening this issue for the context for that PR.