Skip to content

Use trusted publisher#7178

Merged
jarrodmillman merged 1 commit intoscikit-image:mainfrom
jarrodmillman:trusted-publisher-pypi-release
Sep 30, 2023
Merged

Use trusted publisher#7178
jarrodmillman merged 1 commit intoscikit-image:mainfrom
jarrodmillman:trusted-publisher-pypi-release

Conversation

@jarrodmillman
Copy link
Contributor

@jarrodmillman jarrodmillman commented Sep 30, 2023

Description

The 0.22.0rc0 wheels and source tarball didn't get uploaded to PyPI because

WARNING  Error during upload. Retry with the --verbose option for more details. 
ERROR    HTTPError: 401 Unauthorized from https://upload.pypi.org/legacy/       
         User *** has two factor auth enabled, an API Token or Trusted      
         Publisher must be used to upload in place of password.                 
Error: Process completed with exit code 1.

I enabled GH as a trusted publisher for PyPI:
2023-09-30T10:11:34,362619152-07:00

I tested this approach with devstats:
scientific-python/devstats#39

It seemed to work except that I ran into this issue:

$ twine check dist/*
Checking dist/devstats-0.1rc4-py3-none-any.whl: PASSED
Checking dist/devstats-0.1rc4.tar.gz: PASSED with warnings
WARNING  `long_description` missing.     

But I believe long_description from setup.py was replaced with readme in pyproject.toml:
https://packaging.python.org/en/latest/specifications/declaring-project-metadata/#readme

It doesn't cause an error and everything got uploaded to PyPI, but I thought that the readme from pyproject.toml would populate the Project description here:
https://pypi.org/project/devstats/

I will test this out with 0.22.0rc1.

@jarrodmillman jarrodmillman added the 🔧 type: Maintenance Refactoring and maintenance of internals label Sep 30, 2023
@jarrodmillman jarrodmillman merged commit 7ce1c26 into scikit-image:main Sep 30, 2023
@stefanv stefanv added this to the 0.22 milestone Sep 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🔧 type: Maintenance Refactoring and maintenance of internals

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants