Skip to content

Commit

Permalink
try maturin-action for windows
Browse files Browse the repository at this point in the history
  • Loading branch information
milesgranger committed Apr 26, 2024
1 parent 7a705ba commit 169bde8
Showing 1 changed file with 27 additions and 23 deletions.
50 changes: 27 additions & 23 deletions .github/workflows/CI-python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -225,29 +225,33 @@ jobs:

- name: Build wheel (Windows)
if: runner.os == 'Windows'
run: |
python -m pip install maturin delvewheel
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
uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.target }}
args: --release --out dist --manifest-path ${{ matrix.package.dir }}/Cargo.toml --no-default-features --features extension-module --features blosc2-shared
# run: |
# python -m pip install maturin delvewheel

# 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: Build wheel (MacOS)
if: runner.os == 'macOS'
Expand Down

0 comments on commit 169bde8

Please sign in to comment.