Skip to content

Commit

Permalink
Works for Windows!
Browse files Browse the repository at this point in the history
  • Loading branch information
milesgranger committed Apr 27, 2024
1 parent 7acc37c commit 19cdf28
Showing 1 changed file with 11 additions and 21 deletions.
32 changes: 11 additions & 21 deletions .github/workflows/CI-python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -187,9 +187,6 @@ jobs:
$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
# Now just build blosc2-sys to ensure caching doesn't get in the way and sanity purposes
cargo build --release --target ${{ matrix.conf.target-triple }} --package blosc2-sys --target-dir build -vv
- name: Setup (Linux)
if: runner.os == 'Linux'
env:
Expand Down Expand Up @@ -228,29 +225,22 @@ jobs:

- name: Build wheel (Windows)
if: runner.os == 'Windows'
shell: bash
run: |
python -m pip install maturin delvewheel
maturin build `
-i python `
--release `
--out wheels `
--target ${{ matrix.conf.target-triple }} `
--features blosc2-static `
--features blosc2-shared `
--features use-system-blosc2 `
maturin build \
-i python \
--release \
--out wheels \
--target ${{ matrix.conf.target-triple }} \
--no-default-features \
--features extension-module \
--features blosc2-static \
--manifest-path ${{ matrix.package.dir }}/Cargo.toml
# Repair wheel
$file = Get-ChildItem -Path ".\wheels\" -Filter "*.whl" | Select-Object -First 1
if ($file -ne $null) {
& delvewheel repair -v $file.FullName -w dist
} else {
Write-Host "No .whl file found in the wheels directory."
}
# Remove location of blosc2 to ensure fixing wheel works
Remove-Item -Path $env:BLOSC2_INSTALL_PREFIX -Recurse -Force -ErrorAction SilentlyContinue
name=$(ls -1 wheels/ | head -n 1)
delvewheel repair -v wheels/$name -w dist
- name: Build wheel (MacOS)
if: runner.os == 'macOS'
Expand Down

0 comments on commit 19cdf28

Please sign in to comment.