-
Notifications
You must be signed in to change notification settings - Fork 136
/
Cargo.toml
120 lines (101 loc) · 3.81 KB
/
Cargo.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
[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"]