Skip to content

Commit

Permalink
Note abi3-py* features in the guide and Add CHANGELOG
Browse files Browse the repository at this point in the history
  • Loading branch information
kngwyu committed Nov 15, 2020
1 parent 597119d commit ae79b92
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

### Added
- Add support for building for CPython limited API. This required a few minor changes to runtime behaviour of of pyo3 `#[pyclass]` types. See the migration guide for full details. [#1152](https://github.com/PyO3/pyo3/pull/1152)
- Relatedly, `abi3-py*` feature flags are added. [#1263]((https://github.com/PyO3/pyo3/pull/1263))
- Add argument names to `TypeError` messages generated by pymethod wrappers. [#1212](https://github.com/PyO3/pyo3/pull/1212)
- Add `PyEval_SetProfile` and `PyEval_SetTrace` to FFI. [#1255](https://github.com/PyO3/pyo3/pull/1255)
- Add context.h functions (`PyContext_New`, etc) to FFI. [#1259](https://github.com/PyO3/pyo3/pull/1259)
Expand Down
8 changes: 8 additions & 0 deletions guide/src/building_and_distribution.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,14 @@ pyo3 = { version = "...", features = ["abi3"]}

3. Ensure that the `.whl` is correctly marked as `abi3`. For projects using `setuptools`, this is accomplished by passing `--py-limited-api=cp3x` (where `x` is the minimum Python version supported by the wheel, e.g. `--py-limited-api=cp35` for Python 3.5) to `setup.py bdist_wheel`.

### Minimum Python version for `abi3`

We provide `abi3-py36`/`abi3-py37`/... features to set the minimum required Python version for abi3 wheel.
E.g., if you set `abi3-py36` feature, you can build `cp36-abi3-manylinux2020_x86_64.whl` using Python 3.8.

To ensure ABI compatibility, we don't allow setting a minimum version higher than the system Python version.
E.g., if you set `abi3-py38` and try to compile the crate with Python 3.8, it just fails.

## Cross Compiling

Cross compiling PyO3 modules is relatively straightforward and requires a few pieces of software:
Expand Down

0 comments on commit ae79b92

Please sign in to comment.