Skip to content

Releasing

rocky edited this page Apr 21, 2026 · 9 revisions

Table of Contents

Get latest sources:

git pull

If we are tracking an API change, check .github/workflows to see if we can use PyPI packages instead of GitHub repositories.

Change version in Mathics3-Module-PyICU/version.py

update __version__ in pymathics/icu/version.py

$ source pymathics/icu/version.py # to set in POSIX shell
$ echo $__version__

Make release branch:

$ git checkout -b release-$__version__
$ git commit -m"Get ready for release $__version__" .

Check that Mathics3 isn't broken with this code:

$ make check

Update Changes

$ make ChangeLog
$ codespell ChangeLog

If there are errors, fix the errors and:

$ mv -v ChangeLog.spell-corrected
$ mv -v ChangeLog.orig ChangeLog
$ diff -u ChangeLog ChangeLog.spell-corrected > ChangeLog-spell-corrected.diff

Update NEWS.md from ChangeLog

$ make check
$ git commit --amend .
$ git push   # get CI testing going early

Check the package from GitHub and then .

Todo: turn this into a script in admin-tools

        $ [[ ! -d /tmp/gittest ]] && mkdir /tmp/gittest; pushd /tmp/gittest
        $ pyenv local 3.12.6  # or some other non-current version
        $ pip install -e git+https://github.com/Mathics3/Mathics3-Module-PyICU.git#egg=mathics3_module_pyicu
        $ pip show mathics3_module_pyicu
        $ mathics3
        In[1]:= $Language="German"
        Out[1]= "German"
        In[2]:= Alphabet[]
        Out[2]= {a, ä, b, c, d, e, f, g, h, i, j, k, l, m, n, o, ö, p, q, r, s, ß, t, u, ü, v, w, x, y, z}
        In[3]:= AlphabeticOrder["Papá", "Papagayo", "Spanish"]
        Out[3]= 1
		Exit[]
        $ pip uninstall mathics3_module_pyicu
        $ popd

Make packages, check, and tag

        $ ./admin-tools/make-dist.sh
        $ twine check dist/mathics3_module_pyicu-$__version__*
        $ tar -tf dist/mathics3_module_pyicu-${__version__}.tar.gz

Try out the tar or the wheel in a separate Python version

$ cd dist
$ pyenv local *not_currenv_python*
$ pip install mathics3_module_pyicu-${__version__}-py3-none-any.whl
$ cd ..

Release on GitHub

Goto https://github.com/Mathics3/Mathics3-Module-PyICU/releases/new

Set version, copy in NEWS.md item, upload binaries.

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

Todo: turn this into a script in admin-tools

        $ [[ ! -d /tmp/gittest ]] && mkdir /tmp/gittest
        $ pushd /tmp/gittest
        $ pip install -e git+https://github.com/Mathics3/Mathics3-Module-PyICU.git@$__version__#egg=mathics3_module_pyicu
        $ pip uninstall mathics3_module_pyicu
        $ popd

Get on PyPI

        $ twine upload --verbose dist/mathics3_module_pyicu-${__version__}*

Check on https://pypi.org/project/Mathics3-Module-PyICU/

Push and Pull tags:

    $ git pull --tags

Move dist files to uploaded

    $ mv -v dist/mathics3_module/pyicu-${__version__}* dist/uploaded

Bump version

  • Update __version__ to NEXT_VERSION.dev0