-
Notifications
You must be signed in to change notification settings - Fork 306
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot upload Python wheels with direct references in the Requires-Dist field #486
Comments
I see that PyPI itself enforces that. I'm not sure what repository software you're using, but I suspect it's also enforcing that, so there wouldn't be anything twine could do. |
To further explain what @jamadden said, you're seeing |
@jamadden @sigmavirus24 Thank you for the analysis. We are using Azure DevOps pipelines. |
I had the same setup and error as @maggyero and managed to solve the error by removing dependencies with direct URL references right before building the wheel: sed -i '/ssh:/d' requirements_dev.txt In my case that was ok since the dependencies with direct URL references were the ones that are only needed by the developers and not during deployment. |
I'd like to note that this came up for me when trying to build a poetry package that had references to other local packages in a monorepo. [tool.poetry.dependencies]
local-package-name = { path = "../local-package-path", develop = true } The generated PKG-INFO contained:
The fix was to pin the package to a specific version to use
|
I installed this poetry plugin instead of manually pinning the local package. Thanks @jasonwbarnett for the tip! |
@jzazo the internet is an amazing place. Thanks for returning the favor. I may end up using that plugin ❤️ |
The Issue
At work we are trying to upload a Python wheel with a direct reference (URI) in its {package}.dist-info/METADATA file (
Requires-Dist
field) to a private index server usingtwine
:But during the upload:
we get the following error:
A similar issue was opened on the Github repository of
pip
, but this time the user could not upload its Python wheel to a public index server (PyPI) instead of a private one: pypa/pip#6301PEP 566 has been revised to make it explicit that all Python tools should support direct references in the
Requires-Dist
field (only "public index servers MAY prohibit strict version matching clauses or direct references in this field"), so it seems thattwine
is not compliant yet: python/peps#763@dstufft, is this feature planned?
Environment
PKG-INFO
file:.pypirc
file:The text was updated successfully, but these errors were encountered: