This library contains basic functionality that is useful in code compiled
using mypyc, and efficient C implementations of various Python standard library
classes and functions. Mypyc can produce faster extensions when you use librt
in
the code you compile. librt
also contains some internal library features used by mypy.
This repository is only used to build and publish the mypyc runtime library. Development
happens in the mypy repository. Code is then perodically
synced from the mypyc/lib-rt
subdirectory in the mypy repository.
Report any issues in the mypyc issue tracker.
- As a prerequisite, there generally will be some changes in the mypy repository under
mypyc/lib-rt
that you want to release. - Run the
sync-mypy.py
script in this repository to sync changes from the mypy repository. - Bump the version number in
pyproject.toml
in this repository. - Update
smoke_tests.py
(optional but recommended for new features). Here's how to run tests:- Activate a dedicated virtualenv (don't reuse your mypy virtualenv).
pip install -U ./lib-rt
pip install pytest mypy-extensions
pytest smoke_tests.py
- Commit and push (pushing directly to master is fine).
- Wait until all builds complete successfully (no release is triggered yet).
- Once builds are complete, tag the release (
git tag vX.Y.Z
;git push origin vX.Y.Z
). - Go to the "Actions" tab and click "Build wheels" on the left.
- Click "Run workflow" and pick the newly created tag from the drop-down list. This will build and upload the wheels.
- After the workflow completes, verify that
pip install -U librt
installs the new version from PyPI. - Create a PR to update the
librt
version inmypy-requirements.txt
,test-requirements.txt
andpyproject.toml
(dependencies
, andrequires
underbuild-system
) in the mypy repository.
The process should take about 20 minutes.