forked from openslide/openslide-python
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
61 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,11 @@ | ||
# Adding wheels for a new Python release | ||
# Adding a new Python release | ||
|
||
- Update Git main | ||
- [ ] `git checkout main` | ||
- [ ] Add classifier for new Python version to `setup.py` | ||
- [ ] Add classifier for new Python version to `pyproject.toml' | ||
- [ ] Add new Python version to lists in `.github/workflows/python.yml` | ||
- [ ] Commit and open a PR | ||
- [ ] Merge the PR when CI passes | ||
- [ ] Add new Python jobs to [branch protection required checks](https://github.com/openslide/openslide-python/settings/branches) | ||
- Build new wheels | ||
- [ ] Check out a new branch from the most recent release tag | ||
- [ ] Add new Python version to lists in `.github/workflows/python.yml`, commit, and open a DNM PR | ||
- [ ] Find the [workflow run](https://github.com/openslide/openslide-python/actions) for the PR; download its wheels artifact | ||
- [ ] Close the PR | ||
- [ ] In OpenSlide Python checkout, `git checkout v<version> && git clean -dxf && mkdir dist` | ||
- [ ] Copy downloaded wheels _from new Python release only_ into `dist` directory | ||
- [ ] `twine upload dist/*` | ||
- [ ] Upload new wheels to [GitHub release](https://github.com/openslide/openslide-python/releases) | ||
- [ ] Update MacPorts package | ||
- [ ] Update website: Python 3 versions in `download/index.md` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,22 @@ | ||
import sys | ||
|
||
from setuptools import Extension, setup | ||
|
||
# use the limited API on newer Python; build release-specific wheels on | ||
# older Python | ||
_use_limited = sys.version_info >= (3, 11) | ||
|
||
setup( | ||
ext_modules=[ | ||
Extension('openslide._convert', ['openslide/_convert.c']), | ||
Extension( | ||
'openslide._convert', | ||
['openslide/_convert.c'], | ||
# hide symbols that aren't part of the Limited API | ||
define_macros=[('Py_LIMITED_API', '0x030B0000')] if _use_limited else [], | ||
# set extension module ABI tag | ||
py_limited_api=_use_limited, | ||
), | ||
], | ||
# set wheel ABI tag | ||
options={"bdist_wheel": {"py_limited_api": "cp311"}} if _use_limited else {}, | ||
) |