Skip to content

Releasing

rocky edited this page Oct 7, 2025 · 17 revisions

Look at the PyPI page for errors in documentation

Look at https://pypi.org/project/x-python/ and check over documentation.

Get latest sources:

$ git pull

Change version in xpython/version.py:

$ emacs xpython/version.py
$ source xpython/version.py
$ echo $__version__
$ git commit -m"Get ready for release $__version__" .

Update ChangeLog:

$ make ChangeLog
$ codespell ChangeLog

Update NEWS.md from ChangeLog.

$ emacs NEWS.md
$ remake -c check
$ git commit --amend .
$ git push   # get CI testing going early

Make sure pyenv is running and check versions

$ ./admin-tools/check-newest-versions.sh

Python 3.3 to 3.5

$ ./admin-tools/merge-for-3.3.sh
$ make check-full
$ ./admin-tools/check-3.3-3.5-versions.sh
$ git push origin HEAD

Python 3.1 to 3.2

$ ./admin-tools/merge-for-3.1.sh
$ make check-full

$ git push origin HEAD

Python 2.4 to 2.7

$ ./admin-tools/merge-for-2.4.sh

Make packages

$ ./admin-tools/make-dist-2.7.sh
$ ./admin-tools/make-dist-3.1-3.2.sh
$ ./admin-tools/make-dist-3.3-3.5.sh
$ ./admin-tools/make-newest-dist.sh
$ twine check dist/x_python-$__version__*

Check package on github

$ $ [[ ! -d /tmp/gittest ]] && mkdir /tmp/gittest; pushd /tmp/gittest
$ pyenv local 3.8.17 # Or some other non-current version
$ pip install -e git+https://github.com/rocky/xpython.git#egg=x-python
$ xpython --version
$ xpython src/x-python/xpython/__pycache__/vm.cpython-38.pyc
$ pip uninstall x-python
$ popd

Release on Github

Goto https://github.com/rocky/x-python/releases/new

Set the version, copy the NEWS.md item, and upload the binaries.

Pull tag:

$ git pull --tags

Now check the tagged release. (Checking the untagged release was previously done).

Todo: turn this into a script in admin-tools

$ git pull # to pull down new tag
$ pushd /tmp/gittest
$ pyenv local 3.7.5
$ pip install -e git://github.com/rocky/x-python.git@${VERSION}#egg=x-python
$ xpython -V # see that new version appears
$ pip uninstall x-python
$ popd

Get on PyPI

$ twine upload dist/x[-_]python-${__version__}*

Check on https://pypi.org/project/x-python/

Push/pull tags:

$ git push --tags
$ git pull --tags

Move dist files to theuploaded directory

$ mkdir dist/uploaded/$__version__/
$ mv -v dist/x[_-]python-${__version__}* dist/uploaded

Bump version to dev

In xdis/version.py bump number and add .dev0`.