pypi release github workflow failure
See original GitHub issuehttps://github.com/xgcm/xrft/runs/3450436194?check_suite_focus=true
```
Run python setup.py sdist bdist_wheel
python setup.py sdist bdist_wheel
twine upload dist/*
shell: /usr/bin/bash -e {0}
env:
pythonLocation: /opt/hostedtoolcache/Python/3.9.6/x64
TWINE_USERNAME: ***
TWINE_PASSWORD: ***
/opt/hostedtoolcache/Python/3.9.6/x64/lib/python3.9/site-packages/setuptools/dist.py:642: UserWarning: Usage of dash-separated 'description-file' will not be supported in future versions. Please use the underscore name 'description_file' instead
warnings.warn(
running sdist
running egg_info
creating xrft.egg-info
writing xrft.egg-info/PKG-INFO
writing dependency_links to xrft.egg-info/dependency_links.txt
writing requirements to xrft.egg-info/requires.txt
writing top-level names to xrft.egg-info/top_level.txt
writing manifest file 'xrft.egg-info/SOURCES.txt'
adding license file 'LICENSE' (matched pattern 'LICEN[CS]E*')
reading manifest template 'MANIFEST.in'
writing manifest file 'xrft.egg-info/SOURCES.txt'
running check
creating xrft-0+untagged.0.g744209f
creating xrft-0+untagged.0.g744209f/.github
creating xrft-0+untagged.0.g744209f/.github/workflows
creating xrft-0+untagged.0.g744209f/ci
creating xrft-0+untagged.0.g744209f/doc
creating xrft-0+untagged.0.g744209f/xrft
creating xrft-0+untagged.0.g744209f/xrft.egg-info
creating xrft-0+untagged.0.g744209f/xrft/tests
copying files to xrft-0+untagged.0.g744209f...
copying .gitattributes -> xrft-0+untagged.0.g744209f
copying .gitignore -> xrft-0+untagged.0.g744209f
copying .pre-commit-config.yaml -> xrft-0+untagged.0.g744209f
copying LICENSE -> xrft-0+untagged.0.g744209f
copying MANIFEST.in -> xrft-0+untagged.0.g744209f
copying README.rst -> xrft-0+untagged.0.g744209f
copying appveyor.yml -> xrft-0+untagged.0.g744209f
copying codecov.yml -> xrft-0+untagged.0.g744209f
copying readthedocs.yml -> xrft-0+untagged.0.g744209f
copying setup.cfg -> xrft-0+untagged.0.g744209f
copying setup.py -> xrft-0+untagged.0.g744209f
copying versioneer.py -> xrft-0+untagged.0.g744209f
copying .github/workflows/ci.yaml -> xrft-0+untagged.0.g744209f/.github/workflows
copying .github/workflows/linting.yaml -> xrft-0+untagged.0.g744209f/.github/workflows
copying .github/workflows/pythonpublish.yaml -> xrft-0+untagged.0.g744209f/.github/workflows
copying ci/environment-py3.6.yml -> xrft-0+untagged.0.g744209f/ci
copying ci/environment-py3.7.yml -> xrft-0+untagged.0.g744209f/ci
copying ci/environment-py3.8.yml -> xrft-0+untagged.0.g744209f/ci
copying doc/DFT-iDFT_example.ipynb -> xrft-0+untagged.0.g744209f/doc
copying doc/MITgcm_example.ipynb -> xrft-0+untagged.0.g744209f/doc
copying doc/Makefile -> xrft-0+untagged.0.g744209f/doc
copying doc/Parseval_example.ipynb -> xrft-0+untagged.0.g744209f/doc
copying doc/api.rst -> xrft-0+untagged.0.g744209f/doc
copying doc/chunk_example.ipynb -> xrft-0+untagged.0.g744209f/doc
copying doc/conf.py -> xrft-0+untagged.0.g744209f/doc
copying doc/contributor_guide.rst -> xrft-0+untagged.0.g744209f/doc
copying doc/environment.yml -> xrft-0+untagged.0.g744209f/doc
copying doc/index.rst -> xrft-0+untagged.0.g744209f/doc
copying doc/installation.rst -> xrft-0+untagged.0.g744209f/doc
copying doc/limitations.rst -> xrft-0+untagged.0.g744209f/doc
copying doc/make.bat -> xrft-0+untagged.0.g744209f/doc
copying doc/whats-new.rst -> xrft-0+untagged.0.g744209f/doc
copying doc/why-xrft.rst -> xrft-0+untagged.0.g744209f/doc
copying xrft/__init__.py -> xrft-0+untagged.0.g744209f/xrft
copying xrft/_version.py -> xrft-0+untagged.0.g744209f/xrft
copying xrft/detrend.py -> xrft-0+untagged.0.g744209f/xrft
copying xrft/xrft.py -> xrft-0+untagged.0.g744209f/xrft
copying xrft.egg-info/PKG-INFO -> xrft-0+untagged.0.g744209f/xrft.egg-info
copying xrft.egg-info/SOURCES.txt -> xrft-0+untagged.0.g744209f/xrft.egg-info
copying xrft.egg-info/dependency_links.txt -> xrft-0+untagged.0.g744209f/xrft.egg-info
copying xrft.egg-info/requires.txt -> xrft-0+untagged.0.g744209f/xrft.egg-info
copying xrft.egg-info/top_level.txt -> xrft-0+untagged.0.g744209f/xrft.egg-info
copying xrft/tests/__init__.py -> xrft-0+untagged.0.g744209f/xrft/tests
copying xrft/tests/test_detrend.py -> xrft-0+untagged.0.g744209f/xrft/tests
copying xrft/tests/test_xrft.py -> xrft-0+untagged.0.g744209f/xrft/tests
Writing xrft-0+untagged.0.g744209f/setup.cfg
UPDATING xrft-0+untagged.0.g744209f/xrft/_version.py
set xrft-0+untagged.0.g744209f/xrft/_version.py to '0+untagged.0.g744209f'
creating dist
Creating tar archive
removing 'xrft-0+untagged.0.g744209f' (and everything under it)
running bdist_wheel
running build
running build_py
creating build
creating build/lib
creating build/lib/xrft
copying xrft/detrend.py -> build/lib/xrft
copying xrft/__init__.py -> build/lib/xrft
copying xrft/xrft.py -> build/lib/xrft
copying xrft/_version.py -> build/lib/xrft
creating build/lib/xrft/tests
copying xrft/tests/test_detrend.py -> build/lib/xrft/tests
copying xrft/tests/__init__.py -> build/lib/xrft/tests
copying xrft/tests/test_xrft.py -> build/lib/xrft/tests
UPDATING build/lib/xrft/_version.py
set build/lib/xrft/_version.py to '0+untagged.0.g744209f'
installing to build/bdist.linux-x86_64/wheel
running install
running install_lib
creating build/bdist.linux-x86_64
creating build/bdist.linux-x86_64/wheel
creating build/bdist.linux-x86_64/wheel/xrft
copying build/lib/xrft/detrend.py -> build/bdist.linux-x86_64/wheel/xrft
copying build/lib/xrft/__init__.py -> build/bdist.linux-x86_64/wheel/xrft
copying build/lib/xrft/xrft.py -> build/bdist.linux-x86_64/wheel/xrft
copying build/lib/xrft/_version.py -> build/bdist.linux-x86_64/wheel/xrft
creating build/bdist.linux-x86_64/wheel/xrft/tests
copying build/lib/xrft/tests/test_detrend.py -> build/bdist.linux-x86_64/wheel/xrft/tests
copying build/lib/xrft/tests/__init__.py -> build/bdist.linux-x86_64/wheel/xrft/tests
copying build/lib/xrft/tests/test_xrft.py -> build/bdist.linux-x86_64/wheel/xrft/tests
running install_egg_info
Copying xrft.egg-info to build/bdist.linux-x86_64/wheel/xrft-0+untagged.0.g744209f-py3.9.egg-info
running install_scripts
adding license file "LICENSE" (matched pattern "LICEN[CS]E*")
creating build/bdist.linux-x86_64/wheel/xrft-0+untagged.0.g744209f.dist-info/WHEEL
creating 'dist/xrft-0+untagged.0.g744209f-py3-none-any.whl' and adding 'build/bdist.linux-x86_64/wheel' to it
adding 'xrft/__init__.py'
adding 'xrft/_version.py'
adding 'xrft/detrend.py'
adding 'xrft/xrft.py'
adding 'xrft/tests/__init__.py'
adding 'xrft/tests/test_detrend.py'
adding 'xrft/tests/test_xrft.py'
adding 'xrft-0+untagged.0.g744209f.dist-info/LICENSE'
adding 'xrft-0+untagged.0.g744209f.dist-info/METADATA'
adding 'xrft-0+untagged.0.g744209f.dist-info/WHEEL'
adding 'xrft-0+untagged.0.g744209f.dist-info/top_level.txt'
adding 'xrft-0+untagged.0.g744209f.dist-info/RECORD'
removing build/bdist.linux-x86_64/wheel
Uploading distributions to https://upload.pypi.org/legacy/
Uploading xrft-0+untagged.0.g744209f-py3-none-any.whl
0%| | 0.00/31.4k [00:00<?, ?B/s] 26%|██▌ | 8.00k/31.4k [00:00<00:00, 60.3kB/s] 100%|██████████| 31.4k/31.4k [00:00<00:00, 81.7kB/s] NOTE: Try --verbose to see response content. HTTPError: 400 Bad Request from https://upload.pypi.org/legacy/ ‘0+untagged.0.g744209f’ is an invalid value for Version. Error: Can’t use PEP 440 local versions. See https://packaging.python.org/specifications/core-metadata for more information. Error: Process completed with exit code 1.
</details>
The problem is that the workflow environment is not getting the proper version number from the package.
I definitely remember a similar problem cropping up somewhere else, but I can't remember where!
Issue Analytics
- State:
- Created 2 years ago
- Comments:8 (2 by maintainers)
Top Results From Across the Web
pypi-publish · Actions · GitHub Marketplace
Upload Python distribution packages to PyPI. ... fail and others succeed ending up with an incomplete release on PyPI) and (3) make an...
Read more >GitHub action - publishing to both TestPyPI and PyPI fails
In your error message it should be clear that your workflow attempt to upload the same package version to TestPyPI. PyPI doesn't allow...
Read more >How to Publish a Python Package from GitHub Actions
If a run of the publish workflow fails you'll be left with a release on GitHub for which you don't have a corresponding...
Read more >Automating PyPI releases with Github Actions - Caktus Group
This allows you to set up workflows, for example, where the release job won't run unless an earlier test job passes. The recipe...
Read more >Create a PyPI (pip) package, test it and publish it using Github ...
Instead, I'm going to use the releases feature of Github. Create a new action by clicking New workflow in the Actions tab and...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Some breadcrumbs:
I think all of those were sufficient to fix the version issue. I don’t recall what exactly was necessary. It might be worth checking if the
toml
package is available on GitHub actions / wherever the tag is being set first.Cool. One thing you can do while debugging the CI is to make a bunch of “release candidate” (RC) releases, rather than continuing to bump the version.