Skip to content

Commit 213be26

Browse files
committed
opt out for vortex-python _lib
Signed-off-by: blaginin <github@blaginin.me>
1 parent cb8b56a commit 213be26

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

vortex-python/Cargo.toml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,13 @@ workspace = true
2121
[lib]
2222
crate-type = ["rlib", "cdylib"]
2323

24+
[features]
25+
default = ["extension-module"]
26+
# Enable this feature when building the standalone Python extension.
27+
# Disable it when using vortex-python as a library dependency to avoid
28+
# duplicate PyInit__lib symbols.
29+
extension-module = []
30+
2431
[dependencies]
2532
arrow-array = { workspace = true }
2633
arrow-data = { workspace = true }

vortex-python/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ static SESSION: LazyLock<VortexSession> =
4747
LazyLock::new(|| VortexSession::default().with_handle(RUNTIME.handle()));
4848

4949
/// Vortex is an Apache Arrow-compatible toolkit for working with compressed array data.
50+
#[cfg(feature = "extension-module")]
5051
#[pymodule]
5152
fn _lib(py: Python, m: &Bound<PyModule>) -> PyResult<()> {
5253
Python::attach(|py| -> PyResult<()> {

0 commit comments

Comments
 (0)