Skip to content

Commit

Permalink
Merge pull request #1622 from davidhewitt/pyo3-build-config
Browse files Browse the repository at this point in the history
pyo3-build-config: new crate to re-use build.rs across crates
  • Loading branch information
davidhewitt authored May 25, 2021
2 parents cfdd535 + 1e1605f commit 9a4e7b5
Show file tree
Hide file tree
Showing 16 changed files with 1,105 additions and 868 deletions.
14 changes: 8 additions & 6 deletions Cargo.toml
Original file line number Diff line number Diff line change
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
Loading

0 comments on commit 9a4e7b5

Please sign in to comment.