Python: use rustls by default on anything that is not Windows/macOS/iOS

pull/753/head
Tpt 11 months ago committed by Thomas Tanon
parent 46d3ed3f99
commit 2a81106c34
  1. 10
      python/Cargo.toml
  2. 4
      python/README.md

@ -18,15 +18,17 @@ name = "pyoxigraph"
doctest = false doctest = false
[features] [features]
default = ["native-tls"]
abi3 = ["pyo3/abi3-py38"] abi3 = ["pyo3/abi3-py38"]
native-tls = ["oxigraph/http-client-native-tls"]
rocksdb-pkg-config = ["oxigraph/rocksdb-pkg-config"] rocksdb-pkg-config = ["oxigraph/rocksdb-pkg-config"]
rustls = ["oxigraph/http-client-rustls-native"]
[dependencies] [dependencies]
oxigraph.path = "../lib"
pyo3 = { version = "0.20.1", features = ["extension-module"] } pyo3 = { version = "0.20.1", features = ["extension-module"] }
[target.'cfg(any(target_family = "windows", target_os = "macos", target_os = "ios"))'.dependencies]
oxigraph = { path = "../lib", features = ["http-client-native-tls"] }
[target.'cfg(not(any(target_family = "windows", target_os = "macos", target_os = "ios")))'.dependencies]
oxigraph = { path = "../lib", features = ["http-client-rustls-native"] }
[lints] [lints]
workspace = true workspace = true

@ -32,8 +32,8 @@ Pyoxigraph documentation is [available on the Oxigraph website](https://pyoxigra
To build and install the development version of pyoxigraph you need to clone this git repository including submodules (`git clone --recursive https://github.com/oxigraph/oxigraph.git`) To build and install the development version of pyoxigraph you need to clone this git repository including submodules (`git clone --recursive https://github.com/oxigraph/oxigraph.git`)
and to run `pip install .` in the `python` directory (the one this README is in). and to run `pip install .` in the `python` directory (the one this README is in).
Note that by default the installation will not use [cpython stable ABI](https://docs.python.org/3/c-api/stable.html) and will rely on the host TLS implementation. Note that by default the installation will not use [cpython stable ABI](https://docs.python.org/3/c-api/stable.html).
Use `--features abi3` feature to use cpython stable ABI and use `--no-default-features --features rustls` to use [rustls](https://github.com/rustls/rustls) with the system certificates. Use `--features abi3` feature to use cpython stable ABI.
## Help ## Help

Loading…
Cancel
Save