From 024c2b81b14f3cd85f34df80a744d9a12042ce7d Mon Sep 17 00:00:00 2001 From: Miles Date: Thu, 2 May 2024 20:39:47 +0200 Subject: [PATCH] Bump libcramjam and simplify CI (#163) --- .github/workflows/CI.yml | 33 ++------------------------------- Cargo.toml | 5 +---- 2 files changed, 3 insertions(+), 35 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 462dc150..da0c9666 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -126,32 +126,12 @@ jobs: if: runner.os == 'macOS' run: | brew install ninja - - rustup target add aarch64-apple-darwin - rustup target add x86_64-apple-darwin - echo "MACOSX_DEPLOYMENT_TARGET=10.12" >> $GITHUB_ENV - echo "BLOSC2_INSTALL_PREFIX=$(pwd)/blosc2" >> $GITHUB_ENV - echo "DYLD_FALLBACK_LIBRARY_PATH=$(pwd)/blosc2/lib64:$(pwd)/blosc2/lib" >> $GITHUB_ENV - name: Setup (Windows) if: runner.os == 'Windows' - env: - BLOSC2_INSTALL_PREFIX: ${{ github.workspace }}/blosc2 run: | choco install ninja cmake - rustup target add i686-pc-windows-msvc - - echo "BLOSC2_INSTALL_PREFIX=$Env:BLOSC2_INSTALL_PREFIX" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append - - $Env:PATH += ";$Env:BLOSC2_INSTALL_PREFIX\lib;$Env:BLOSC2_INSTALL_PREFIX\lib64;$Env:BLOSC2_INSTALL_PREFIX\bin" - echo "PATH=$Env:PATH" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append - - $Env:LIBPATH += ";$Env:BLOSC2_INSTALL_PREFIX\lib;$Env:BLOSC2_INSTALL_PREFIX\lib64;$Env:BLOSC2_INSTALL_PREFIX\bin" - echo "LIBPATH=$Env:LIBPATH" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append - - $Env:LIB += ";$Env:BLOSC2_INSTALL_PREFIX\lib;$Env:BLOSC2_INSTALL_PREFIX\lib64;$Env:BLOSC2_INSTALL_PREFIX\bin" - echo "LIB=$Env:LIB" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append - name: Setup (Linux) if: runner.os == 'Linux' @@ -199,10 +179,7 @@ jobs: -i python \ --release \ --out wheels \ - --target ${{ matrix.conf.target-triple }} \ - --no-default-features \ - --features extension-module \ - --features blosc2-static + --target ${{ matrix.conf.target-triple }} name=$(ls -1 wheels/ | head -n 1) delvewheel repair -v wheels/$name -w dist @@ -212,19 +189,13 @@ jobs: uses: PyO3/maturin-action@v1 with: target: ${{ matrix.conf.target-triple }} - # OSX complains with __cpu_model from blosc2 statically compiled so only enabled shared - args: -i python --release --out dist --no-default-features --features extension-module --features blosc2-shared + args: -i python --release --out dist - name: Fix wheel (MacOS) if: runner.os == 'macOS' run: | python -m pip install delocate delocate-wheel -v dist/*.whl - - # Remove pointers back to built lib location to ensure tests later don't link back - unset DYLD_FALLBACK_LIBRARY_PATH - unset BLOSC2_INSTALL_PREFIX - rm -rf $BLOSC2_INSTALL_PREFIX - name: Install built wheel and Test (Native) # TODO: I'm not sure but the actual collection of tests on windows using pypy3.10 takes forever and/or fails diff --git a/Cargo.toml b/Cargo.toml index 59beca85..d6d62026 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -16,15 +16,12 @@ crate-type = ["cdylib"] default = ["extension-module"] extension-module = ["pyo3/extension-module"] generate-import-lib = ["pyo3/generate-import-lib"] # needed for Windows PyPy builds - -blosc2-static = ["libcramjam/blosc2-static"] -blosc2-shared = ["libcramjam/blosc2-shared"] use-system-blosc2 = ["libcramjam/use-system-blosc2"] [dependencies] pyo3 = { version = "^0.20", default-features = false, features = ["macros"] } -libcramjam = { version = "^0.4" } +libcramjam = { version = "0.4.2" } [build-dependencies] pyo3-build-config = "^0.20"