Skip to content

Commit

Permalink
pyo3-build-config: new crate to re-use build.rs across crates
Browse files Browse the repository at this point in the history
  • Loading branch information
davidhewitt committed May 20, 2021
1 parent 8bb72a7 commit e903196
Show file tree
Hide file tree
Showing 12 changed files with 991 additions and 884 deletions.
14 changes: 8 additions & 6 deletions Cargo.toml
Expand Up @@ -11,7 +11,6 @@ documentation = "https://docs.rs/crate/pyo3/"
categories = ["api-bindings", "development-tools::ffi"]
license = "Apache-2.0"
exclude = ["/.gitignore", ".cargo/config", "/codecov.yml", "/Makefile", "/pyproject.toml", "/tox.ini"]
build = "build.rs"
edition = "2018"

[dependencies]
Expand Down Expand Up @@ -40,6 +39,9 @@ proptest = { version = "0.10.1", default-features = false, features = ["std"] }
pyo3 = { path = ".", default-features = false, features = ["macros", "auto-initialize"] }
serde_json = "1.0.61"

[build-dependencies]
pyo3-build-config = { path = "pyo3-build-config", version = "=0.14.0-alpha.0" }

[features]
default = ["macros"]

Expand All @@ -55,13 +57,13 @@ multiple-pymethods = ["inventory"]
extension-module = []

# Use the Python limited API. See https://www.python.org/dev/peps/pep-0384/ for more.
abi3 = []
abi3 = ["pyo3-build-config/abi3"]

# With abi3, we can manually set the minimum Python version.
abi3-py36 = ["abi3-py37"]
abi3-py37 = ["abi3-py38"]
abi3-py38 = ["abi3-py39"]
abi3-py39 = ["abi3"]
abi3-py36 = ["abi3-py37", "pyo3-build-config/abi3-py36"]
abi3-py37 = ["abi3-py38", "pyo3-build-config/abi3-py37"]
abi3-py38 = ["abi3-py39", "pyo3-build-config/abi3-py38"]
abi3-py39 = ["abi3", "pyo3-build-config/abi3-py39"]

# Changes `Python::with_gil` and `Python::acquire_gil` to automatically initialize the
# Python interpreter if needed.
Expand Down

0 comments on commit e903196

Please sign in to comment.