Invalid package METADATA?
See original GitHub issue- 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 (
-vvv
option).
-
OS version and name: Ubuntu 18.04.5 LTS (Bionic Beaver)
-
Poetry version: 1.1.1
-
Link of a Gist with the contents of your pyproject.toml file: https://gist.github.com/sam-willis/dd4a81fa2f1e608ac05441ed2fb6bb1a
Issue
If you install a package with a path dependency like:
test_path_dep = {path = "test_path"}
When you install the package, In your dist-info METADATA, you end up with the path dependant package listed like:
Requires-Dist: test_path_dep @ test_path
It looks to me according to https://www.python.org/dev/peps/pep-0508/ the @ symbol is used for URLS only, and that this isn’t valid.
This causes the pkg_resources
module’s Distribution
’s class requires
method to fail with:
pkg_resources.extern.packaging.requirements.InvalidRequirement: Invalid URL: test_path
Issue Analytics
- State:
- Created 3 years ago
- Reactions:11
- Comments:11 (3 by maintainers)
I’d lean towards just
name
.name @ file:///absolute/path
requires the directory structure for the host that the .whl is installed into to match the structure of the build system.Both the absolute and relative paths, I believe, would incorrect if those dependencies are .whl’s themselves – the file would be at
file://relative/path/dist/*.whl
orfile:///absolute/path/dist/*.whl
.I have another workaround. Also not sure if this is defined behavior.
Pyproject.toml
This has the added benefit of ensuring it is the correct version installed on a user machine. If you aren’t using a wheel or don’t care about a version then you can switch to
mylib = "*"
.