-
Notifications
You must be signed in to change notification settings - Fork 188
Releasing and Packaging
davidplowman edited this page Jul 5, 2022
·
2 revisions
Log in to both https://test.pypi.org/ and https://pypi.org/
Generate API tokens for each.
Create ~/.pypirc and place into it the following (pasting in the tokens from the step above):
[pypi]
username = __token__
password = pypi-AgEIcH...
[testpypi]
username = __token__
password = pypi-AgENdG...
- Ensure updates are in
main
, and the version number in setup.py has been updated - Create a new tag matching the version number:
git tag -a vx.x.x
- Push the tag:
git push --tags
- Create a new release https://github.com/raspberrypi/picamera2/releases/new choosing the tag that was just created
- Add release notes (eg. from the CHANGELOG), you can also hit the "Auto-generate release notes" button to pull from the commit history
- Ensure the package version is bumped up as appropriate and that the tag and release have been created (see above)
- Build:
python setup.py sdist bdist_wheel
(you may need to pip install wheel first) - Test the build:
python3 -m twine check dist/*
- Upload to PyPI Test:
python3 -m twine upload --repository testpypi dist/*
- Check the package at the URL supplied (
pip3 install --index-url https://test.pypi.org/simple/ picamera2
) - Upload to PyPI:
python3 -m twine upload dist/*