Skip to content

Commit

Permalink
cargo update, vendor pyo3-ffi
Browse files Browse the repository at this point in the history
  • Loading branch information
ijl committed Oct 1, 2024
1 parent 3640a30 commit 065b1c2
Show file tree
Hide file tree
Showing 114 changed files with 14,656 additions and 102 deletions.
13 changes: 6 additions & 7 deletions .github/workflows/artifact.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: artifact
on: push
env:
RUST_TOOLCHAIN: "nightly-2024-08-05"
RUST_TOOLCHAIN: "nightly-2024-09-25"
CARGO_UNSTABLE_SPARSE_REGISTRY: "true"
UNSAFE_PYO3_BUILD_FREE_THREADED: "1"
UNSAFE_PYO3_SKIP_VERSION_CHECK: "1"
Expand Down Expand Up @@ -77,15 +77,14 @@ jobs:
RUSTFLAGS: "-C linker=clang -C link-arg=-fuse-ld=lld -C linker-plugin-lto -C lto=fat -C link-arg=-Wl,-zrelro,-znow -Z mir-opt-level=4 -Z virtual-function-elimination -Z threads=2 -D warnings"
PATH: "/__w/orjson/orjson/.venv/bin:/github/home/.cargo/bin:/root/.local/bin:/root/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
container:
image: fedora:41
image: fedora:42
steps:

- name: cpuinfo
run: cat /proc/cpuinfo

- name: Build environment pre-clone
run: |
dnf copr enable -y @fedora-llvm-team/llvm19
dnf install -y rustup clang lld ${{ matrix.python.package }} git
rustup-init --default-toolchain "${RUST_TOOLCHAIN}-x86_64-unknown-linux-gnu" --profile minimal --component rust-src -y
Expand Down Expand Up @@ -167,7 +166,7 @@ jobs:
LDFLAGS: "-Wl,--as-needed"
RUSTFLAGS: "-C lto=fat -Z mir-opt-level=4 -Z virtual-function-elimination -Z threads=2 -D warnings -C target-feature=-crt-static"
with:
rust-toolchain: nightly-2024-08-05
rust-toolchain: ${{ env.RUST_TOOLCHAIN }}
rustup-components: rust-src
target: ${{ matrix.platform.target }}
manylinux: musllinux_1_2
Expand Down Expand Up @@ -263,7 +262,7 @@ jobs:
RUSTFLAGS: "${{ matrix.target.rustflags }}"
with:
target: ${{ matrix.target.target }}
rust-toolchain: nightly-2024-08-05
rust-toolchain: nightly-2024-09-25
rustup-components: rust-src
manylinux: auto
args: --release --strip --out=dist --features=${{ matrix.target.features }} -i python${{ matrix.python.version }}
Expand Down Expand Up @@ -328,7 +327,7 @@ jobs:

- uses: dtolnay/rust-toolchain@master
with:
toolchain: "nightly-2024-08-05"
toolchain: "nightly-2024-09-25"
targets: "aarch64-apple-darwin, x86_64-apple-darwin"
components: "rust-src"

Expand Down Expand Up @@ -398,7 +397,7 @@ jobs:

- uses: dtolnay/rust-toolchain@master
with:
toolchain: "nightly-2024-08-05"
toolchain: "nightly-2024-09-25"
targets: "aarch64-apple-darwin, x86_64-apple-darwin"
components: "rust-src"

Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/debug.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
name: debug
on: push
env:
RUST_TOOLCHAIN: "nightly-2024-09-25"
jobs:

debug:
Expand All @@ -10,8 +12,8 @@ jobs:
profile: [
{ rust: "1.72", features: "" },
{ rust: "1.72", features: "--features=yyjson" },
{ rust: "nightly-2024-08-05", features: "--features=yyjson,unstable-simd"},
{ rust: "nightly-2024-08-05", features: "--features=avx512,yyjson,unstable-simd"},
{ rust: ${{ env.RUST_TOOLCHAIN }}, features: "--features=yyjson,unstable-simd"},
{ rust: ${{ env.RUST_TOOLCHAIN }}, features: "--features=avx512,yyjson,unstable-simd"},
]
python: [
{ version: '3.13' },
Expand Down
74 changes: 44 additions & 30 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ half = { version = "2", default-features = false, features = ["std"] }
itoa = { version = "1", default-features = false }
itoap = { version = "1", features = ["std", "simd"] }
once_cell = { version = "1", default-features = false, features = ["alloc", "race"] }
pyo3-ffi = { version = "^0.22", default-features = false, features = ["extension-module"]}
pyo3-ffi = { path = "include/pyo3/pyo3-ffi", default-features = false, features = ["extension-module"]}
ryu = { version = "1", default-features = false }
serde = { version = "1", default-features = false }
serde_json = { version = "1", default-features = false, features = ["std", "float_roundtrip"] }
Expand All @@ -78,7 +78,7 @@ xxhash-rust = { version = "^0.8", default-features = false, features = ["xxh3"]

[build-dependencies]
cc = { version = "1" }
pyo3-build-config = { version = "^0.22" }
pyo3-build-config = { path = "include/pyo3/pyo3-build-config" }
version_check = { version = "0.9" }

[profile.dev]
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1205,7 +1205,7 @@ It benefits from also having a C build environment to compile a faster
deserialization backend. See this project's `manylinux_2_28` builds for an
example using clang and LTO.

The project's own CI tests against `nightly-2024-08-05` and stable 1.72. It
The project's own CI tests against `nightly-2024-09-25` and stable 1.72. It
is prudent to pin the nightly version because that channel can introduce
breaking changes.

Expand Down
1 change: 1 addition & 0 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ fn main() {
println!("cargo:rustc-check-cfg=cfg(Py_3_13)");
println!("cargo:rustc-check-cfg=cfg(Py_3_8)");
println!("cargo:rustc-check-cfg=cfg(Py_3_9)");
println!("cargo:rustc-check-cfg=cfg(Py_GIL_DISABLED)");

for cfg in pyo3_build_config::get().build_script_outputs() {
println!("{cfg}");
Expand Down
2 changes: 1 addition & 1 deletion ci/azure-pipelines.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
variables:
toolchain: nightly-2024-08-05
toolchain: nightly-2024-09-13

jobs:

Expand Down
42 changes: 42 additions & 0 deletions include/pyo3/pyo3-build-config/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
[package]
name = "pyo3-build-config"
version = "0.23.0-dev"
description = "Build configuration for the PyO3 ecosystem"
authors = ["PyO3 Project and Contributors <https://github.com/PyO3>"]
keywords = ["pyo3", "python", "cpython", "ffi"]
homepage = "https://github.com/pyo3/pyo3"
repository = "https://github.com/pyo3/pyo3"
categories = ["api-bindings", "development-tools::ffi"]
license = "MIT OR Apache-2.0"
edition = "2021"

[dependencies]
once_cell = "1"
python3-dll-a = { version = "0.2.6", optional = true }
target-lexicon = "0.12.14"

[build-dependencies]
python3-dll-a = { version = "0.2.6", optional = true }
target-lexicon = "0.12.14"

[features]
default = []

# Attempt to resolve a Python interpreter config for building in the build
# script. If this feature isn't enabled, the build script no-ops.
resolve-config = []

# This feature is enabled by pyo3 when building an extension module.
extension-module = []

# These features are enabled by pyo3 when building Stable ABI extension modules.
abi3 = []
abi3-py37 = ["abi3-py38"]
abi3-py38 = ["abi3-py39"]
abi3-py39 = ["abi3-py310"]
abi3-py310 = ["abi3-py311"]
abi3-py311 = ["abi3-py312"]
abi3-py312 = ["abi3"]

[package.metadata.docs.rs]
features = ["resolve-config"]
Loading

0 comments on commit 065b1c2

Please sign in to comment.