These modified instructions have not yet been tested.
With pip, we build a wheel file and a source distribution .tar.gz. With twine we upload those to PyPI and the GitLab project repository.
You‘ll need pip (builtin if you use a venv) or build (external). I no long upload to PyPI, but if you want to you’ll need twine.
This document cannot describe any detailed method for installing pip, but I recommend using conda or brew to get Python and pip together.
build can be installed with python -m pip install build; similar for twine.
At top-level...
Choose the next version number. As of 2022 this of the form: 0.CCYYMMDD.z
Thus in x.y.z notation: x is 0; y is the 8-digit ISO 8601 data; z is the patch number (typically 0, unless you make more than one release a day).
Edit code/png.py and setup.cfg for new version number. Also man/ca.rst.
Get release notes into README.md somehow.
Then git commit this.
Get the latest git change hash::
git log -n1 | sed q
Set the PYPNG_VERSION variable (extracted from code/png.py):
. ./pypng-version
Add a tag for this release (the tags have this format so that the automatically generated tarballs from github.com have the right URL).
git tag -a pypng-$PYPNG_VERSION -m "PyPNG release $PYPNG_VERSION"
and push:
git push --tags origin HEAD
Make a clean clone:
cd ${PWD%pypng*}
git clone pypng pypng-$PYPNG_VERSION
cd pypng-$PYPNG_VERSION
Build a wheel file:
pip wheel .
It‘s possible at this point that you might want to smoke-test the actual release binary. Let’s assume that the release binary is good to go.
Maybe use python -m build also/instead (a third party module). It appears to make source dist tarfiles and wheels and put them in dist/
cd back into your main development directory::
cd ${PWD%pypng*}pypng
Check that the sh dock.sh command populated the dist/ directory in the original pypng directory.
ls dist
(which it won't have done)
Documentation appears on https://drj11.gitlab.io/pypng/, automatically created using sphinx in a .gitlab-ci.yml script.
sphinx-build -N -d sphinx-crud -a man html
Make a record in release/index.txt
Consider adding dist artefacts to dist branch; in the dist/ directory.