cpython 0.7.2

Bindings to Python
Documentation
[package]

name = "cpython"
version = "0.7.2"
description = "Bindings to Python"
authors = ["Daniel Grunwald <daniel@danielgrunwald.de>"]
readme = "README.md"
keywords = [
    "python",
    "cpython",
    "libpython27",
]
homepage = "https://github.com/dgrunwald/rust-cpython"
repository = "https://github.com/dgrunwald/rust-cpython.git"
documentation = "http://dgrunwald.github.io/rust-cpython/doc/cpython/"
categories = ["api-bindings", "development-tools::ffi"]
license = "MIT"
exclude = [
    "/.gitignore",
    "/.travis.yml",
    "/appveyor.yml",
    "/.cargo/config",
    "/python27-sys/**",
    "/python3-sys/**",
    "/extensions/**",
    "/Makefile"
]
build = "build.rs"
edition = "2018"

[badges]
travis-ci = { repository = "dgrunwald/rust-cpython" }
appveyor = { repository = "dgrunwald/rust-cpython" }

[dependencies]
libc = "0.2"
num-traits = "0.2"
paste = "1"
serde = { version = "1", features = ["derive"], optional = true }

[dev-dependencies]
rustversion = "1.0"
serde_bytes = { version = "0.11" }
serde_cbor = { version = "0.11" }

# These features are both optional, but you must pick one to 
# indicate which python ffi you are trying to bind to.
[dependencies.python27-sys]
optional = true
path = "python27-sys"
version = "0.7.0"

[dependencies.python3-sys]
optional = true
path = "python3-sys"
version = "0.7.2"

[features]
default = ["python3-sys"]

# Enable serde support that converts between a serde type and PyObject.
serde-convert = ["serde"]

# Deprecated: nonnull feature no longer has any effect;
# std::ptr::NonNull is now used unconditionally.
nonnull = []

# Enable additional features that require nightly rust
nightly = []

# 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.
extension-module = [ "python3-sys/extension-module" ]

# Unfortunately we can't use the forward the same feature to either python27-sys
# or python3-sys. (honestly, we should probably merge both crates into 'python-sys')
extension-module-2-7 = [ "python27-sys/extension-module" ]

# Use these features to explicitly control linking for Python 3.
# (See the documentation in python3-sys/Cargo.toml for more info.)
py-link-mode-default = [ "python3-sys/link-mode-default" ]
py-link-mode-unresolved-static = [ "python3-sys/link-mode-unresolved-static" ]

# Optional features to support explicitly specifying python minor version.
# If you don't care which minor version, just specify python3-sys as a 
# feature.
python-3-11 = ["python3-sys/python-3-11"]
python-3-10 = ["python3-sys/python-3-10"]
python-3-9 = ["python3-sys/python-3-9"]
python-3-8 = ["python3-sys/python-3-8"]
python-3-7 = ["python3-sys/python-3-7"]
python-3-6 = ["python3-sys/python-3-6"]
python-3-5 = ["python3-sys/python-3-5"]
python-3-4 = ["python3-sys/python-3-4"]

#pep-384 = ["python3-sys/pep-384"]

# When set, do not call prepare_freethreaded_python() when calling
# GILGuard::acquire(). This effectively prevents the crate from automatically
# calling Py_Initialize() and other functions that attempt to automatically
# initialize the Python interpreter.
#
# This feature can be useful for programs embedding Python, which can guarantee
# Python interpreter initialization and don't need the automatic-by-default
# behavior or don't want the behavior coded into this crate.
#
# The feature may also be necessary if this crate's code executes as part of
# Python interpreter initialization, before the Py_Initialize() call completes.
# This scenario should be rare.
no-auto-initialize = []

# Only affect Python 2.
# Once set, `PyString` and `String` converts to only `bytes` (aka. `str` on
# Python 2). Non-ascii string will no longer be converted to `unicode`.
py2-no-auto-unicode-promotion = []

[workspace]
members = ["python27-sys", "python3-sys", "extensions/hello"]