Poetry cannot install package with inconsistent wheel metadata #6599
-
IssuePackage hosted in private aritifactory not discovered by poetry when performing an installation for specific python version. Packages in private aritifactory are hosted in the format shown below
Because depends on custom-package (20220916.9) which doesn't match any versions, version solving failed. Complete log - https://gist.github.com/arthi-navenio/d0ee9cbe8e36c949a8329a33cbc6fcce I tried revising the pyproject.toml file to specify exact url like the below for installing the custom package
and that fails with 404 Client Error: Not Found for url: https://custom.jfrog.io/artifactory/api/pypi/pypi/simplecustom-package/custom-package-20220916.9-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_24_x86_64.whl Complete log - https://gist.github.com/arthi-navenio/8cf051bb5cced1fdb699111df59fbc52 even though the credentials are added with I have spent time exhaustively searching for another alternative and seems like a bug with poetry. |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 1 reply
-
Could you please try re-locking first? |
Beta Was this translation helpful? Give feedback.
-
Sure. Performed
Performing update raises the above error when clearly there is a python package in that directory for python3.9 |
Beta Was this translation helpful? Give feedback.
-
Ah, we might be making some progress -- you need to inspect the constraints/metadata of your custom-package -- if it claims Poetry is telling you exactly what is happening here -- I'm going to close this for now, but we can convert it to a discussion if you need support, or you can join Discord where you can talk with a maintainer and share private details with them if you need more help getting to the bottom of your constraints. |
Beta Was this translation helpful? Give feedback.
-
I am happy to do either. The 3 wheels inside that directory have 3 separate python version expectations. Whilst pip does not seem to be having a problem in detecting and installing it, poetry fails |
Beta Was this translation helpful? Give feedback.
-
The metadata between all your wheels needs to be the same -- that is the current origin of your issues then. Currently Poetry will try to pick the first wheel and hope metadata is consistent if there is not a sdist available. This changed in #6547 -- however that PR is scoped to 1.3 only and will not help in this case. Poetry does not support packages with inconsistent metadata between artifacts (and you shouldn't be setting Requires-Python differently -- the package supports all Python versions in the full range, it's just the individual artifacts that do not, and they capture that in the wheel tags) -- fix that and everything should just work. |
Beta Was this translation helpful? Give feedback.
The metadata between all your wheels needs to be the same -- that is the current origin of your issues then. Currently Poetry will try to pick the first wheel and hope metadata is consistent if there is not a sdist available.
This changed in #6547 -- however that PR is scoped to 1.3 only and will not help in this case.
Poetry does not support packages with inconsistent metadata between artifacts (and you shouldn't be setting Requires-Python differently -- the package supports all Python versions in the full range, it's just the individual artifacts that do not, and they capture that in the wheel tags) -- fix that and everything should just work.