From fa1833a7a8501bf529f1d440a67a98ffe0655611 Mon Sep 17 00:00:00 2001 From: Dan King Date: Thu, 5 Sep 2024 14:41:20 -0400 Subject: [PATCH] Fix `rye build` (#748) Fixes #695. `rye build` failed when it tried to build the sdist to produce a wheel. This failed because some _transitive_ workspace dependencies (e.g. vortex-proto) were not present in the sdist. The root cause appears to be a bug in maturin. I saw [a similar issue on their repo](https://github.com/PyO3/maturin/issues/2117#issuecomment-2330245151). I shared a branch with them that reproduces the behavior. Until this issue is resolved, we can work around it by explicitly depending on every workspace crate. Two unrelated issues are also fixed here: 1. We must propagate the Rust toolchain to the sdist build environment. 2. `vortex-bytebool` was misnamed in the root Cargo.toml. I'm not sure why this isn't a problem for other crates? --- Cargo.lock | 9 +++++++++ Cargo.toml | 2 +- pyvortex/Cargo.toml | 16 +++++++++++++--- pyvortex/pyproject.toml | 9 +++++---- pyvortex/rust-toolchain.toml | 1 + 5 files changed, 29 insertions(+), 8 deletions(-) create mode 120000 pyvortex/rust-toolchain.toml diff --git a/Cargo.lock b/Cargo.lock index 3048a968ca..2e5d7c42a7 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3100,13 +3100,22 @@ dependencies = [ "tokio", "vortex-alp", "vortex-array", + "vortex-buffer", + "vortex-bytebool", + "vortex-datafusion", + "vortex-datetime-dtype", + "vortex-datetime-parts", "vortex-dict", "vortex-dtype", "vortex-error", "vortex-expr", "vortex-fastlanes", + "vortex-flatbuffers", + "vortex-fsst", + "vortex-proto", "vortex-roaring", "vortex-runend", + "vortex-runend-bool", "vortex-sampling-compressor", "vortex-scalar", "vortex-serde", diff --git a/Cargo.toml b/Cargo.toml index 0132f249ef..d6a79b34ad 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -131,7 +131,7 @@ uuid = "1.8.0" vortex-alp = { version = "0.7.0", path = "./encodings/alp" } vortex-array = { version = "0.7.0", path = "./vortex-array" } vortex-buffer = { version = "0.7.0", path = "./vortex-buffer" } -vortex-byte-bool = { version = "0.7.0", path = "./encodings/byte-bool" } +vortex-bytebool = { version = "0.7.0", path = "./encodings/byte-bool" } vortex-datafusion = { version = "0.7.0", path = "./vortex-datafusion" } vortex-datetime-dtype = { version = "0.7.0", path = "./vortex-datetime-dtype" } vortex-datetime-parts = { version = "0.7.0", path = "./encodings/datetime-parts" } diff --git a/pyvortex/Cargo.toml b/pyvortex/Cargo.toml index 3368ca9290..d7a1dade76 100644 --- a/pyvortex/Cargo.toml +++ b/pyvortex/Cargo.toml @@ -29,18 +29,28 @@ paste = { workspace = true } pyo3 = { workspace = true } pyo3-log = { workspace = true } tokio = { workspace = true, features = ["fs"] } + vortex-alp = { workspace = true } vortex-array = { workspace = true } +vortex-buffer = { workspace = true } +vortex-bytebool = { workspace = true } +vortex-datafusion = { workspace = true } +vortex-datetime-dtype = { workspace = true } +vortex-datetime-parts = { workspace = true } vortex-dict = { workspace = true } -vortex-dtype = { workspace = true } +vortex-dtype = { workspace = true, default-features = false } vortex-error = { workspace = true } vortex-expr = { workspace = true } vortex-fastlanes = { workspace = true } +vortex-flatbuffers = { workspace = true } +vortex-fsst = { workspace = true } +vortex-proto = { workspace = true } vortex-roaring = { workspace = true } vortex-runend = { workspace = true } +vortex-runend-bool = { workspace = true } +vortex-scalar = { workspace = true, default-features = false } +vortex-serde = { workspace = true, default-features = false, features = ["tokio"] } vortex-sampling-compressor = { workspace = true } -vortex-serde = { workspace = true, features = ["tokio"] } -vortex-scalar = { workspace = true } vortex-zigzag = { workspace = true } itertools = { workspace = true } diff --git a/pyvortex/pyproject.toml b/pyvortex/pyproject.toml index aa5dfd129a..21481b3912 100644 --- a/pyvortex/pyproject.toml +++ b/pyvortex/pyproject.toml @@ -6,7 +6,7 @@ authors = [ { name = "Nicholas Gates", email = "nick@nickgates.com" } ] dependencies = [ - "pydata-sphinx-theme>=0.15.4", + "pyarrow>=15.0.0", ] requires-python = ">= 3.11" classifiers = ["Private :: Do Not Upload"] @@ -18,14 +18,15 @@ build-backend = "maturin" [tool.rye] managed = true dev-dependencies = [ - "pyarrow>=15.0.0", - "pip", - "sphinx>=8.0.2", "ipython>=8.26.0", "pandas>=2.2.2", + "pip", + "pydata-sphinx-theme>=0.15.4", + "sphinx>=8.0.2", ] [tool.maturin] python-source = "python" module-name = "vortex._lib" features = ["pyo3/extension-module"] +include = [{ path = "rust-toolchain.toml", format = "sdist" }] diff --git a/pyvortex/rust-toolchain.toml b/pyvortex/rust-toolchain.toml new file mode 120000 index 0000000000..43fe0ada68 --- /dev/null +++ b/pyvortex/rust-toolchain.toml @@ -0,0 +1 @@ +../rust-toolchain.toml \ No newline at end of file