Skip to content

Commit 13d01ac

Browse files
authored
Update README.md and document the release process in more detail (#13)
See discussion at python/mypy#20069 for additional context.
1 parent 9c779af commit 13d01ac

File tree

1 file changed

+36
-12
lines changed

1 file changed

+36
-12
lines changed

README.md

Lines changed: 36 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,38 @@
11
# librt: mypyc runtime library
22

3-
This library contains efficient C implementations of various Python standard
4-
library classes and functions. Mypyc can use these fast implementations when
5-
compiling Python code to native extension modules.
6-
7-
This repository is used to build/publish mypyc runtime library. Development happens
8-
in [mypy repository](https://github.com/python/mypy). Code is then perodically
9-
synced from `mypyc/lib-rt` [subdirectory there](https://github.com/python/mypy/tree/master/mypyc/lib-rt).
10-
Issues should be reported to mypyc [issue tracker](https://github.com/mypyc/mypyc/issues).
11-
12-
Note: wheels are built on each PR and push to master. To publish to PyPI:
13-
* Create a tag matching the version in `pyproject.toml`.
14-
* Trigger the `buildwheels.yml` workflow manually.
3+
This library contains basic functionality that is useful in code compiled
4+
using mypyc, and efficient C implementations of various Python standard library
5+
classes and functions. Mypyc can produce faster extensions when you use `librt` in
6+
the code you compile. `librt` also contains some internal library features used by mypy.
7+
8+
This repository is only used to build and publish the mypyc runtime library. Development
9+
happens in the [mypy repository](https://github.com/python/mypy). Code is then perodically
10+
synced from the `mypyc/lib-rt`
11+
[subdirectory in the mypy repository](https://github.com/python/mypy/tree/master/mypyc/lib-rt).
12+
13+
Report any issues in the [mypyc issue tracker](https://github.com/mypyc/mypyc/issues).
14+
15+
## Making a release
16+
17+
1. As a prerequisite, there generally will be some changes in the mypy repository under `mypyc/lib-rt`
18+
that you want to release.
19+
2. Run the `sync-mypy.py` script in this repository to sync changes from the mypy repository.
20+
3. Bump the version number in `pyproject.toml` in this repository.
21+
4. Update `smoke_tests.py` (optional but recommended for new features). Here's how to run tests:
22+
* Activate a dedicated virtualenv (don't reuse your mypy virtualenv).
23+
* `pip install -U ./lib-rt`
24+
* `pip install pytest mypy-extensions`
25+
* `pytest smoke_tests.py`
26+
5. Commit and push (pushing directly to master is fine).
27+
6. Wait until all [builds](https://github.com/mypyc/librt/actions) complete successfully
28+
(no release is triggered yet).
29+
7. Once builds are complete, tag the release (`git tag vX.Y.Z`; `git push origin vX.Y.Z`).
30+
8. Go to the ["Actions" tab](https://github.com/mypyc/librt/actions) and click "Build wheels"
31+
on the left.
32+
9. Click "Run workflow" and pick the newly created tag from the drop-down list. This will build
33+
*and upload* the wheels.
34+
10. After the workflow completes, verify that `pip install -U librt` installs the new version from PyPI.
35+
11. Create a PR to update the `librt` version in `mypy-requirements.txt`, `test-requirements.txt` and
36+
`pyproject.toml` (`dependencies`, and `requires` under `build-system`) in the mypy repository.
37+
38+
The process should take about 20 minutes.

0 commit comments

Comments
 (0)