Skip to content

ReleaseProcess

Anselm Kruis edited this page Aug 8, 2021 · 4 revisions

Release Process

This page is intended to document the release process of Stackless Python.

Checklist

Linux Tests

  1. Compile CPython as regular build and as debug build.
  2. Run the Python standard library unit tests with CPython (regular) to get a base line.
  3. Compile with STACKLESS_OFF, run Python standard library unit tests. The test result must be identical to the base line.
  4. Compile with STACKLESS without thread support and run the test suites. There must not be any failure in the Stackless test suite. Failures in the Python test suite must be identical to regular CPython.
  5. Compile a debug build with STACKLESS and with thread support and run the test suites.
  6. Rerun the test suites with option '-R:'. Takes a lot of time. You must not get failures in the Stackless test suite. Failures in the Python test suite must be identical to regular CPython.
  7. Compile a regular build with STACKLESS and with thread support and run the test suites. You must not get failures in the Stackless test suite. Failures in the Python test suite must be identical to regular CPython.

Windows 32bit, Windows 64bit and OSX Tests

  1. Compile CPython as regular build and as debug build.
  2. Run the Python standard library unit tests with CPython (regular) to get a base line. (Windows: Python compiled with Visual Studio 2015, debug builds only: I observed assert violations in the C-runtime library related to invalid file descriptors. This makes it impractical to run the CPython test suite with a Python debug build.)
  3. Compile with STACKLESS_OFF, run Python standard library unit tests. The test result must be identical to the base line.
  4. Compile a debug build with STACKLESS and with thread support and run the test suites.
  5. Rerun the test suites with option '-R:'. Takes a lot of time. You must not get failures in the Stackless test suite. Failures in the Python test suite must be identical to regular CPython.
  6. Compile a regular build with STACKLESS and with thread support and run the test suites. You must not get failures in the Stackless test suite. Failures in the Python test suite must be identical to regular CPython.

Prepare the release

  1. Build documentation for the tip of the branch on readthedocs.org. Sometimes readthedocs.org changes the build environment and we must update our configuration file .readthedocs.yaml accordingly. See issue #259, #252 and #210 for examples.
  2. Update Stackless/changelog.txt: add the release date, add missing changes.
  3. Tag the release.
  4. Push to github.
  5. Generate a tarball using Anselm's zip archive generation script in stackless/Stackless/Tools/create_source_archive.sh. See below for details.
  6. Upload to stackless.com/binaries/.
  7. Find someone to generate the 32 & 64 bit msi installers. Anselm can do that.
  8. Find someone to generate the MacOS installer. Do not block on this step if not possible.
  9. Build Stackless for Conda
  10. Announce: update the download page and archived downloads page.

Details

How to Create a Stackless Python Source Code Archive

Unfortunately it is not enough to simply run git archive .... The reason is, that the archive contains a few generated files together with their source files:

  • Include/Python-ast.h
  • Python/Python-ast.c

Sources are in Parser/.

Building theses files requires Python itself; a classical chicken and eggs problem. Therefore it is essential that the timestamps of generated files are newer that the timestamps of their sources after unpacking the source archive. This requires not only to touch generated files prior to packaging but also to control the order of archive members.

Use the script stackless/Stackless/Tools/create_source_archive.sh to create a source archive.

How to Compile for Windows - v3.5.x and newer

First make sure that you can compile Stackless Python. Follow the instructions in PCBuild\readme.txt. Then build a release. Follow the instructions in Tools\msi\README.txt. (Make sure, "py" executes a python 3.6, that is writeable by you. And set the environment variables PYTHON and SPHINXBUILD.) Clean your sandbox and run:

> cd Tools\msi
> buildrelease.bat --skip-nuget

Then test the installers in PCbuild\amd64\en-us and PCbuild\win32\en-us. If they are OK, upload them. Log into stackless.com and create the version-directory /var/www/stackless/binaries/MSI/$VERSION_NUMBER. VERSION_NUMBER is something like "3.5.4". Then add your ssh-key for stackless.com to Pageant, make sure that the command gpg2 -ba uses the intended signing-key (hint: create a copy of ~/.gnupg, set the environment variable GNUPGHOME to the copy and edit %GNUPGHOME%\\gpg.conf) and run:

> uploadrelease.bat --host stackless.com --user root --target /var/www/stackless/binaries/MSI --skip-purge

How to Compile for Windows X64 (2.7 and pre 3.5)

The general rule is to follow the documentation. But there are a few obstacles.

  1. After fetching openssl the modules ssl and hashlib fail to build.

    Solution: del externals\openssl-*\ms\nt64.mak and restart the build.

  2. The debug build fails, because the debug C-runtime msvcrXXd.dll is missing. (Could happen for 32bit builds too, but is less likely).

    Solution: install the appropriate assembly or copy the lib and the manifest into the directory with the python executable.

  3. The build with STACKLESS_OFF fails, because the assembly file Stackless\platf\switch_x64_masm.asm refers undefined symbols.

    Solution: remove the content of the file Stackless\platf\switch_x64_masm.asm except for the final END statement. (This assembly file does not get processed by CPP. Therefore the CPP macro STACKLESS_OFF does not affect the assembler.)

How to build Stackless for Conda

See Build Stackless for Conda.