Skip to content

Commit

Permalink
Add more feature configuration options (#174)
Browse files Browse the repository at this point in the history
* Add feature flags for all variants and blosc2 system static/shared
  • Loading branch information
milesgranger authored Sep 10, 2024
1 parent 51333e9 commit 7308c53
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ jobs:
target: ${{ matrix.conf.target }}
manylinux: ${{ matrix.conf.manylinux }}
docker-options: -e BLOSC2_INSTALL_PREFIX=${{ github.workspace }}/blosc2 -e LD_LIBRARY_PATH=${{ github.workspace }}/blosc2/lib:${{ github.workspace }}/blosc2/lib64
args: -i ${{ matrix.python-version }} --release --out dist --features use-system-blosc2
args: -i ${{ matrix.python-version }} --release --out dist --features use-system-blosc2-static
before-script-linux: ls -l $BLOSC2_INSTALL_PREFIX

- name: Build wheel (Windows)
Expand Down
17 changes: 14 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,26 @@ name = "cramjam"
crate-type = ["cdylib"]

[features]
default = ["extension-module"]
default = ["extension-module", "snappy", "lz4", "bzip2", "brotli", "xz", "zstd", "gzip", "deflate", "blosc2"]
extension-module = ["pyo3/extension-module"]
generate-import-lib = ["pyo3/generate-import-lib"] # needed for Windows PyPy builds
use-system-blosc2 = ["libcramjam/use-system-blosc2"]

snappy = ["libcramjam/snappy"]
lz4 = ["libcramjam/lz4"]
bzip2 = ["libcramjam/bzip2"]
brotli = ["libcramjam/brotli"]
xz = ["libcramjam/xz"]
zstd = ["libcramjam/zstd"]
gzip = ["libcramjam/gzip"]
deflate = ["libcramjam/deflate"]
blosc2 = ["libcramjam/blosc2"]
use-system-blosc2-static = ["libcramjam/use-system-blosc2", "libcramjam/blosc2-static"]
use-system-blosc2-shared = ["libcramjam/use-system-blosc2", "libcramjam/blosc2-shared"]


[dependencies]
pyo3 = { version = "^0.22", default-features = false, features = ["macros"] }
libcramjam = { version = "0.4.2" }
libcramjam = { version = "0.4.2", default-features = false }

[build-dependencies]
pyo3-build-config = "^0.22"
Expand Down

0 comments on commit 7308c53

Please sign in to comment.