Welcome | Get started | Dive | Contribute | Topics | Reference | Changes | More
Release Lino to PyPI¶
Here we go for releasing a new version of Lino to the world. This usually involves several packages. We usually do such a series of releases when some production site needs an upgrade and hence the list of packages we release depends on what we need for that site.
Overview¶
We assume that you have configured your environment.
Check you have a clean working copy of all projects maintained by the Synodalsoft team:
$ pp git pull
Check that all test suites are passing and all doc trees are building:
$ pp inv prep test clean -b bd
(Currently not used:) For every demo project that has a
test_restore.py
file in its test suite, runmakemigdump
and add the new version to thetested_versions
in thetest_restore.py
file. See Migration tests for details.Decide which packages to release. In each package you can say
git log
to decide whether there are relevant changes since the last release to pypi.Update the release notes and the changelog in the book.
For each package you want to release, read Release a package.
Release a package¶
Repositories with a pyproject.toml
¶
See current version:
hatch version
Increase micro, minor or major part of version number (“major” if year has changed since last version, “minor” if month has changed, otherwise “micro”). In case of doubt specify yourself a version number:
hatch version micro # or minor or major
Remove existing dist files, build new ones & check them:
rm dist/* ; python -m build; twine check dist/*
If everything went well, publish it:
twine upload dist/*; git ci -am "release to pypi"; git push
Repositories with a setup.py
¶
Update the version in the
setup_info.py
file. See Date-based versioning for details.Create a source tarball and then publish it to PyPI:
$ inv sdist release -b
Commit and push the new version number:
$ git ci -am "release to pypi" && git push
Configure your environment¶
Of course you need maintainer’s permission on PyPI for the repositories to which you want to write.
You also need to configure your ~/.pypirc
file:
[distutils]
index-servers = pypi
[pypi]
username = __token__
password = pypi-SomeLongString
The twine software package should be installed on your Linux distro. To check if you have twine installed on your machine, run:
$ twine --version
If you do not have twine installed on your machine, you can install it using aptitude or snap package manager (depending on your distro there maybe few other package managers that indexes twine), run the following command to install it using aptitude:
$ sudo apt install twine