pypa / twine

Utilities for interacting with PyPI

Home Page:https://twine.readthedocs.io/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

twine upload sdist gzip failing

FrankC01 opened this issue · comments

Is there an existing issue for this?

  • I have searched the existing issues (open and closed), and could not find an existing issue

What keywords did you use to search existing issues?

No response

What operating system(s) are you using?

macOS

If you selected 'Other', describe your Operating System here

No response

What version of Python are you running?

3.10.6 inside venv (virtual environment)

How did you install twine? Did you use your operating system's package manager or pip or something else?

pip install twine

What version of twine do you have installed (include the complete output)

twine version 5.0.0 (importlib-metadata: 6.8.0, keyring: 24.2.0, pkginfo: 1.9.6, requests: 2.31.0, requests-toolbelt: 1.0.0, urllib3: 2.0.4)

Which package repository are you using?

pypi.org

Please describe the issue that you are experiencing

I have been previously been able to:

twine upload ./target/wheels/pysui_fastcrypto-0.5.0.tar.gz

But now I get an error:

Uploading distributions to https://upload.pypi.org/legacy/
ERROR    InvalidDistribution: Metadata is missing required fields: Name, Version.
         Make sure the distribution includes the files where those fields are specified, and is using a supported Metadata-Version: 1.0, 1.1, 1.2, 2.0, 2.1, 2.2.

Please list the steps required to reproduce this behaviour

  1. Clone repo - git clone git@github.com:FrankC01/pysui-fastcrypto.git
  2. Change into cd pysui-fastcrypto
  3. Create a virtual environment - python3 -m venv env
  4. Activate the environment - . env/bin/activate
  5. Update pip if needed - pip install -U pip
  6. Install maturin - pip install maturin
  7. Install twine - pip install twine
  8. Build sdist maturin sdist
  9. Upload twine upload ./target/wheels/pysui_fastcrypto-0.5.0.tar.gz

Please include the PKG-INFO file contents from the artifact you're attempting to upload

No PKG-INFO ever used

A redacted version of your .pypirc file

[distutils]
index-servers =
    pypi
    testpypi

[pypi]
username = __token__
password = redacted
repository = https://upload.pypi.org/legacy/

[testpypi]
username = __token__
password = redacted

Anything else you'd like to mention?

No response

Duplicate of #1059

Upgrade pkginfo and it will work fine

Thank you, fixed.