-
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
Failed to upload artifacts to Test PyPI or PyPI - Invalid Distribution Metadata: unrecognized or malformed field: 'license-file' #1216
Comments
This is due to a combination of the newest |
By the way, how do these two fileds end up being declared as dynamic?
I don't thing this is right. |
This package is built with [tool.setuptools]
license-files = [] should fix the generated metadata and make it compliant with metadara standard version 2.2. |
@dnicolodi I am also facing this issue. is the setuptools config the best workaround so far? |
No, but I have prepared a fix, thus, most likely, very soon.
I would tend to agree, but I am not the one to decide. |
@ricardogaspar2 That said, the easiest fix is to upgrade |
WOW it looks like there was a lot of action on this in the last couple hours - let me try to collect my thoughts on this into one message to (maybe) make it easier to consume for y'all.
I'm, like, super-bonus-new to Python packaging, and I was following this guide and mostly just guessing what should go where. I don't think that guide is very accurate, but this looked like the best place to ask the question. My
pyproject.toml
I assume there's something in there that's mucking up the fields.
Yeah - let me try a couple things here. I'll keep you posted on if something works. |
Ok, so after adding the Thanks for the help! |
Hi there @distortedsignal.
|
I'll summarize the content above because the last comments in the issue seems to have missed the point. The core issue is that The workaround is to install It is also possible to instruct [tool.setuptools]
license-files = [] Any other setting is not going to affect the generated metadata in any way relevant to this issue. Both of the solutions above work and I have tested them. |
Is there an existing issue for this?
What keywords did you use to search existing issues?
InvalidDistribution
Error
license-file
What operating system(s) are you using?
Linux
If you selected 'Other', describe your Operating System here
No response
What version of Python are you running?
How did you install twine? Did you use your operating system's package manager or pip or something else?
$ python -m pip install twine
What version of twine do you have installed (include the complete output)
twine version 6.1.0 (keyring: 25.6.0, packaging: 24.2, requests: 2.32.3, requests-toolbelt: 1.0.0, urllib3: 2.3.0, id: 1.5.0)
Which package repository are you using?
upload.testpypi.org
Please describe the issue that you are experiencing
When I run
I get the output
The mentioned file looks like this:
Please list the steps required to reproduce this behaviour
python -m build
python -m twine upload ...
Please include the PKG-INFO file contents from the artifact you're attempting to upload
A redacted version of your
.pypirc
fileAnything else you'd like to mention?
No response
The text was updated successfully, but these errors were encountered: