-
Notifications
You must be signed in to change notification settings - Fork 39
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
Successfully build *.whl and *.tar.gz, but cannot upload them through twine #735
Comments
What is the build backend? Is there a Are there more files in the |
Thank you sinoroc for your reply. @sinoroc Here is the content of the whole pyproject.toml. There is only those two files abovementioned.
|
What you're trying to upload is the result of running |
Do you have the latest version of twine? The relevant twine issue (now closed as fixed): pypa/twine#1059 |
Yes, I generate the *.tar.gz myself with |
I've just upgrade to the latest twine-5.0.0, and the issue is still there. I could successfully upload the package in the tutorial (https://packaging.python.org/en/latest/tutorials/packaging-projects/). For the problem one, I just want to upload my real project. |
Could you try |
Same issue here, although i have tried with hatchling>=1.22.2 |
Ahh, what version of pkginfo you have? If you upgraded twine you might still have an old pkginfo that doesn’t support 2.3. (This is why I always use pipx run twine) |
pkginfo 1.9.6 I am unblocked pinning hatchling to 1.21.1. Inspecting the failing tar.gz, I have seen the generated Metadata-Version was 2.3., so higher than 2.2. With hatchling to 1.21, the hatchling the Metadata-Version is back to 2.2. twine 5.0 was not helpful to upload. |
That’s what happened. Pkginfo 1.10 is required by twine to support metadata 2.3. When you pip upgrade, dependent packages are not upgraded by default. |
Thx for the confirmation 👍
Does twine 5 requires Pkginfo 1.10 ? PS: probably the pip system should upgrade automatically. or refuse to install... ? |
No, it doesn't. Which is arguably a bug in twine. I reported it as pypa/twine#1070, we'll see what the twine maintainers think. |
It does not require it, unless you need metadata 2.3 support. That’s why it’s not upgraded unless you tell Pip upgrade dependencies too. Twine is an application, so it really should be installed using pipx. |
That's a fair point (and I'd be fine if the twine issue I raised was closed with that explanation). Would |
I believe no, but I’d like to see if that can be changed. know (I use reinstall instead of upgrade due to it getting a clean up to date environment when I’m not using run) |
I had the same issue, |
On 15 March, I updated a package using Related issues I have located are as follows: |
Closing in favor of pypa/twine#1070, the fix for this is to upgrade to |
Since I was using hatchling, I had to downgrade that. [build-system]
requires = ["hatchling==1.26.3", "hatch-vcs"] |
Problem description
I've successfully build the *.whl and *.tar.gz file with command "python -m build".
However, when I use the following command to upload them,
python -m twine upload --repository testpypi dist/*
I have encountered and error, which states:
I think that I do give the name and version in my TOML file.
[project]
name = "MinimalCadQuery"
version = "0.0.1"
What's wrong here in my application case?
My directory structure looks like this:
D:\CAD\MINIMALCADQUERY
├─dist
└─src
└─minimalcadquery
├─contrib
├─occ_impl
│ ├─exporters
│ └─importers
└─plugins
The text was updated successfully, but these errors were encountered: