2015-01-05 16:05:53 +00:00
|
|
|
[package]
|
2017-05-13 05:05:00 +00:00
|
|
|
name = "pyo3"
|
2024-03-25 23:36:08 +00:00
|
|
|
version = "0.21.0"
|
2017-08-12 16:31:14 +00:00
|
|
|
description = "Bindings to Python interpreter"
|
2018-05-14 16:53:31 +00:00
|
|
|
authors = ["PyO3 Project and Contributors <https://github.com/PyO3>"]
|
2015-04-19 05:50:50 +00:00
|
|
|
readme = "README.md"
|
2018-05-30 13:03:31 +00:00
|
|
|
keywords = ["pyo3", "python", "cpython", "ffi"]
|
2017-05-13 05:05:00 +00:00
|
|
|
homepage = "https://github.com/pyo3/pyo3"
|
2018-08-30 21:19:23 +00:00
|
|
|
repository = "https://github.com/pyo3/pyo3"
|
2018-11-02 21:32:18 +00:00
|
|
|
documentation = "https://docs.rs/crate/pyo3/"
|
2017-01-20 23:41:44 +00:00
|
|
|
categories = ["api-bindings", "development-tools::ffi"]
|
2023-04-15 18:01:31 +00:00
|
|
|
license = "MIT OR Apache-2.0"
|
2023-05-23 07:12:00 +00:00
|
|
|
exclude = ["/.gitignore", ".cargo/config", "/codecov.yml", "/Makefile", "/pyproject.toml", "/noxfile.py", "/.github", "/tests/test_compile_error.rs", "/tests/ui"]
|
2023-06-07 18:49:27 +00:00
|
|
|
edition = "2021"
|
2023-06-04 08:29:24 +00:00
|
|
|
rust-version = "1.56"
|
2015-01-05 16:05:53 +00:00
|
|
|
|
2015-03-08 14:29:44 +00:00
|
|
|
[dependencies]
|
2021-10-30 08:07:16 +00:00
|
|
|
cfg-if = "1.0"
|
2020-03-13 09:40:25 +00:00
|
|
|
libc = "0.2.62"
|
2022-03-21 00:58:26 +00:00
|
|
|
parking_lot = ">= 0.11, < 0.13"
|
2023-05-21 07:56:55 +00:00
|
|
|
memoffset = "0.9"
|
2023-12-02 06:52:33 +00:00
|
|
|
portable-atomic = "1.0"
|
2021-10-30 08:07:16 +00:00
|
|
|
|
2022-04-24 14:06:32 +00:00
|
|
|
# ffi bindings to the python interpreter, split into a separate crate so they can be used independently
|
2024-03-25 23:36:08 +00:00
|
|
|
pyo3-ffi = { path = "pyo3-ffi", version = "=0.21.0" }
|
2022-01-25 13:46:27 +00:00
|
|
|
|
2021-10-30 08:07:16 +00:00
|
|
|
# support crates for macros feature
|
2024-03-25 23:36:08 +00:00
|
|
|
pyo3-macros = { path = "pyo3-macros", version = "=0.21.0", optional = true }
|
2023-06-13 07:40:16 +00:00
|
|
|
indoc = { version = "2.0.1", optional = true }
|
2023-06-19 20:57:35 +00:00
|
|
|
unindent = { version = "0.2.1", optional = true }
|
2021-10-30 08:07:16 +00:00
|
|
|
|
|
|
|
# support crate for multiple-pymethods feature
|
2022-07-03 13:38:26 +00:00
|
|
|
inventory = { version = "0.3.0", optional = true }
|
2021-10-30 08:07:16 +00:00
|
|
|
|
|
|
|
# crate integrations that can be added using the eponymous features
|
|
|
|
anyhow = { version = "1.0", optional = true }
|
2023-10-14 07:05:37 +00:00
|
|
|
chrono = { version = "0.4.25", default-features = false, optional = true }
|
2024-01-08 14:19:49 +00:00
|
|
|
chrono-tz = { version = ">= 0.6, < 0.9", default-features = false, optional = true }
|
2023-09-16 11:07:33 +00:00
|
|
|
either = { version = "1.9", optional = true }
|
2021-11-18 11:38:47 +00:00
|
|
|
eyre = { version = ">= 0.4, < 0.7", optional = true }
|
2023-06-19 20:58:37 +00:00
|
|
|
hashbrown = { version = ">= 0.9, < 0.15", optional = true }
|
2023-06-26 21:14:32 +00:00
|
|
|
indexmap = { version = ">= 1.6, < 3", optional = true }
|
2021-10-30 08:07:16 +00:00
|
|
|
num-bigint = { version = "0.4", optional = true }
|
|
|
|
num-complex = { version = ">= 0.2, < 0.5", optional = true }
|
2023-02-16 16:11:28 +00:00
|
|
|
rust_decimal = { version = "1.0.0", default-features = false, optional = true }
|
2021-10-30 08:07:16 +00:00
|
|
|
serde = { version = "1.0", optional = true }
|
2023-10-13 12:37:25 +00:00
|
|
|
smallvec = { version = "1.0", optional = true }
|
2017-06-18 15:41:20 +00:00
|
|
|
|
2018-04-21 18:01:41 +00:00
|
|
|
[dev-dependencies]
|
2019-02-01 14:05:37 +00:00
|
|
|
assert_approx_eq = "1.1.0"
|
2024-01-08 14:19:49 +00:00
|
|
|
chrono = "0.4.25"
|
|
|
|
chrono-tz = ">= 0.6, < 0.9"
|
2022-10-16 09:35:58 +00:00
|
|
|
# Required for "and $N others" normalization
|
|
|
|
trybuild = ">=1.0.70"
|
2023-06-05 10:45:35 +00:00
|
|
|
proptest = { version = "1.0", default-features = false, features = ["std"] }
|
2023-01-11 15:10:11 +00:00
|
|
|
send_wrapper = "0.6"
|
2022-03-04 22:41:25 +00:00
|
|
|
serde = { version = "1.0", features = ["derive"] }
|
2021-10-19 22:25:04 +00:00
|
|
|
serde_json = "1.0.61"
|
2023-10-24 06:45:24 +00:00
|
|
|
rayon = "1.6.1"
|
2023-10-23 12:43:12 +00:00
|
|
|
futures = "0.3.28"
|
2021-10-19 22:25:04 +00:00
|
|
|
|
2021-05-19 20:50:25 +00:00
|
|
|
[build-dependencies]
|
2024-03-25 23:36:08 +00:00
|
|
|
pyo3-build-config = { path = "pyo3-build-config", version = "=0.21.0", features = ["resolve-config"] }
|
2021-05-19 20:50:25 +00:00
|
|
|
|
2015-05-19 21:32:32 +00:00
|
|
|
[features]
|
2022-04-21 19:19:14 +00:00
|
|
|
default = ["macros"]
|
2020-12-28 16:02:57 +00:00
|
|
|
|
2024-03-06 00:54:45 +00:00
|
|
|
# Enables support for `async fn` for `#[pyfunction]` and `#[pymethods]`.
|
|
|
|
experimental-async = ["macros", "pyo3-macros/experimental-async"]
|
|
|
|
|
2023-01-15 12:41:23 +00:00
|
|
|
# Enables pyo3::inspect module and additional type information on FromPyObject
|
|
|
|
# and IntoPy traits
|
|
|
|
experimental-inspect = []
|
|
|
|
|
2024-02-24 13:50:18 +00:00
|
|
|
# Enables annotating Rust inline modules with #[pymodule] to build Python modules declaratively
|
|
|
|
experimental-declarative-modules = ["pyo3-macros/experimental-declarative-modules", "macros"]
|
|
|
|
|
2020-12-28 16:02:57 +00:00
|
|
|
# Enables macros: #[pyclass], #[pymodule], #[pyfunction] etc.
|
2021-12-28 01:25:01 +00:00
|
|
|
macros = ["pyo3-macros", "indoc", "unindent"]
|
2021-03-02 22:34:25 +00:00
|
|
|
|
|
|
|
# Enables multiple #[pymethods] per #[pyclass]
|
2021-08-19 20:55:39 +00:00
|
|
|
multiple-pymethods = ["inventory", "pyo3-macros/multiple-pymethods"]
|
2020-12-28 16:02:57 +00:00
|
|
|
|
|
|
|
# Use this feature when building an extension module.
|
|
|
|
# It tells the linker to keep the python symbols unresolved,
|
|
|
|
# so that the module can also be used with statically linked python interpreters.
|
2022-04-16 15:13:06 +00:00
|
|
|
extension-module = ["pyo3-ffi/extension-module"]
|
2020-12-28 16:02:57 +00:00
|
|
|
|
2020-10-31 07:35:14 +00:00
|
|
|
# Use the Python limited API. See https://www.python.org/dev/peps/pep-0384/ for more.
|
2024-02-13 21:52:53 +00:00
|
|
|
abi3 = ["pyo3-build-config/abi3", "pyo3-ffi/abi3"]
|
2020-12-28 16:02:57 +00:00
|
|
|
|
2020-10-31 07:35:14 +00:00
|
|
|
# With abi3, we can manually set the minimum Python version.
|
2022-01-25 13:46:27 +00:00
|
|
|
abi3-py37 = ["abi3-py38", "pyo3-build-config/abi3-py37", "pyo3-ffi/abi3-py37"]
|
|
|
|
abi3-py38 = ["abi3-py39", "pyo3-build-config/abi3-py38", "pyo3-ffi/abi3-py38"]
|
|
|
|
abi3-py39 = ["abi3-py310", "pyo3-build-config/abi3-py39", "pyo3-ffi/abi3-py39"]
|
2022-11-23 08:08:12 +00:00
|
|
|
abi3-py310 = ["abi3-py311", "pyo3-build-config/abi3-py310", "pyo3-ffi/abi3-py310"]
|
2023-12-21 15:29:00 +00:00
|
|
|
abi3-py311 = ["abi3-py312", "pyo3-build-config/abi3-py311", "pyo3-ffi/abi3-py311"]
|
|
|
|
abi3-py312 = ["abi3", "pyo3-build-config/abi3-py312", "pyo3-ffi/abi3-py312"]
|
2020-09-05 08:52:41 +00:00
|
|
|
|
2022-04-06 14:41:57 +00:00
|
|
|
# Automatically generates `python3.dll` import libraries for Windows targets.
|
2022-05-10 07:46:47 +00:00
|
|
|
generate-import-lib = ["pyo3-ffi/generate-import-lib"]
|
2022-04-06 14:41:57 +00:00
|
|
|
|
2023-02-22 21:46:42 +00:00
|
|
|
# Changes `Python::with_gil` to automatically initialize the Python interpreter if needed.
|
2020-12-28 16:02:57 +00:00
|
|
|
auto-initialize = []
|
|
|
|
|
2023-12-28 13:41:38 +00:00
|
|
|
# Allows use of the deprecated "GIL Refs" APIs.
|
|
|
|
gil-refs = []
|
|
|
|
|
2020-06-18 09:43:04 +00:00
|
|
|
# Optimizes PyObject to Vec conversion and so on.
|
2020-06-17 08:10:00 +00:00
|
|
|
nightly = []
|
2017-06-11 23:35:24 +00:00
|
|
|
|
2021-12-22 11:09:16 +00:00
|
|
|
# Activates all additional features
|
|
|
|
# This is mostly intended for testing purposes - activating *all* of these isn't particularly useful.
|
2022-01-12 00:59:33 +00:00
|
|
|
full = [
|
|
|
|
"macros",
|
2022-07-03 13:38:26 +00:00
|
|
|
# "multiple-pymethods", # TODO re-add this when MSRV is greater than 1.62
|
2024-02-22 08:05:37 +00:00
|
|
|
"anyhow",
|
2022-09-22 07:00:09 +00:00
|
|
|
"chrono",
|
2024-01-08 14:19:49 +00:00
|
|
|
"chrono-tz",
|
2023-09-16 11:07:33 +00:00
|
|
|
"either",
|
2024-03-06 00:54:45 +00:00
|
|
|
"experimental-async",
|
2024-02-24 13:50:18 +00:00
|
|
|
"experimental-declarative-modules",
|
2024-03-06 00:54:45 +00:00
|
|
|
"experimental-inspect",
|
2024-02-22 08:05:37 +00:00
|
|
|
"eyre",
|
|
|
|
"hashbrown",
|
|
|
|
"indexmap",
|
|
|
|
"num-bigint",
|
|
|
|
"num-complex",
|
2023-02-16 16:11:28 +00:00
|
|
|
"rust_decimal",
|
2024-02-22 08:05:37 +00:00
|
|
|
"serde",
|
|
|
|
"smallvec",
|
2022-01-12 00:59:33 +00:00
|
|
|
]
|
2021-12-22 11:09:16 +00:00
|
|
|
|
2018-06-13 16:02:45 +00:00
|
|
|
[workspace]
|
|
|
|
members = [
|
2022-01-25 13:46:27 +00:00
|
|
|
"pyo3-ffi",
|
2022-02-05 09:39:56 +00:00
|
|
|
"pyo3-build-config",
|
2020-12-13 11:29:39 +00:00
|
|
|
"pyo3-macros",
|
|
|
|
"pyo3-macros-backend",
|
2022-02-05 09:39:56 +00:00
|
|
|
"pytests",
|
2021-12-21 22:21:42 +00:00
|
|
|
"examples",
|
2018-08-21 22:02:37 +00:00
|
|
|
]
|
2021-05-04 21:25:09 +00:00
|
|
|
|
|
|
|
[package.metadata.docs.rs]
|
|
|
|
no-default-features = true
|
2024-03-04 22:23:35 +00:00
|
|
|
features = ["full", "gil-refs"]
|
2021-05-16 07:11:37 +00:00
|
|
|
rustdoc-args = ["--cfg", "docsrs"]
|
2023-11-17 15:21:09 +00:00
|
|
|
|
|
|
|
[workspace.lints.clippy]
|
|
|
|
checked_conversions = "warn"
|
|
|
|
dbg_macro = "warn"
|
|
|
|
explicit_into_iter_loop = "warn"
|
|
|
|
explicit_iter_loop = "warn"
|
|
|
|
filter_map_next = "warn"
|
|
|
|
flat_map_option = "warn"
|
|
|
|
let_unit_value = "warn"
|
|
|
|
manual_assert = "warn"
|
|
|
|
manual_ok_or = "warn"
|
|
|
|
todo = "warn"
|
|
|
|
unnecessary_wraps = "warn"
|
|
|
|
useless_transmute = "warn"
|
|
|
|
used_underscore_binding = "warn"
|
|
|
|
|
|
|
|
[workspace.lints.rust]
|
|
|
|
elided_lifetimes_in_paths = "warn"
|
|
|
|
invalid_doc_attributes = "warn"
|
|
|
|
rust_2018_idioms = "warn"
|
|
|
|
rust_2021_prelude_collisions = "warn"
|
|
|
|
unused_lifetimes = "warn"
|
|
|
|
|
|
|
|
[workspace.lints.rustdoc]
|
|
|
|
broken_intra_doc_links = "warn"
|
|
|
|
bare_urls = "warn"
|
|
|
|
|
|
|
|
[lints]
|
|
|
|
workspace = true
|