Skip to content

Commit

Permalink
Another go at refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
matthew-brett committed Nov 9, 2023
1 parent 544fcd6 commit be6ea02
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 3 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/build.ps1
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
echo "::group::Build wheel"
pip wheel -w "${env:WHEEL_SDIR}" --no-deps ".\${env:REPO_DIR}"
pip install "$env:BUILD_DEPENDS"
pip wheel -w "${env:WHEEL_SDIR}" --no-build-isolation ".\${env:REPO_DIR}"
ls -l "${env:GITHUB_WORKSPACE}/${env:WHEEL_SDIR}/"
echo "::endgroup::"

Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ echo "::group::Install a virtualenv"
echo "::endgroup::"

echo "::group::Build wheel"
np_dep=$(python ./get_numpy_version.py $MB_PYTHON_VERSION)
export BUILD_DEPENDS="${BUILD_BASE} ${np_dep}"
np_dep=$(python get_numpy_version.py ${MB_PYTHON_VERSION})
export BUILD_DEPENDS=$np_dep
clean_code
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/wheels-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ jobs:
MB_PYTHON_VERSION: ${{ matrix.python }}
MB_ML_LIBC: ${{ matrix.mb-ml-libc }}
MB_ML_VER: ${{ matrix.mb-ml-ver }}
BUILD_BASE: "meson-python>=0.13 cython>=3"
steps:
- uses: actions/checkout@v4
with:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/wheels-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ jobs:
PLAT: ${{ matrix.platform }}
MB_PYTHON_VERSION: ${{ matrix.python }}
TRAVIS_OS_NAME: "osx"
BUILD_BASE: "meson-python>=0.13 cython>=3"
steps:
- uses: actions/checkout@v4
with:
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/wheels-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ jobs:
env:
BUILD_COMMIT: ${{ inputs.build-commit }}
WHEEL_SDIR: wheelhouse
MB_PYTHON_VERSION: ${{ matrix.python }}
BUILD_BASE: "meson-python>=0.13 cython>=3"
steps:
- uses: actions/checkout@v4
with:
Expand All @@ -39,8 +41,8 @@ jobs:
python-version: ${{ matrix.python }}
- name: Set Numpy version
run: |
$np_dep = python .\get_numpy_version.py ${{ matrix.python }}
echo "BUILD_DEPENDS=$np_dep" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append
$np_dep = python .\get_numpy_version.py $env:MB_PYTHON_VERSION
echo "BUILD_DEPENDS=${env:BUILD_BASE} ${np_dep}" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append
- name: Build Wheel
run: .github/workflows/build.ps1
- uses: actions/upload-artifact@v3
Expand Down
5 changes: 5 additions & 0 deletions config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ function pre_build {
brew install openblas
}

function pip_wheel_cmd {
local abs_wheelhouse=$1
pip wheel $(pip_opts) -w $abs_wheelhouse --no-build-isolation .
}

function run_tests {
# Runs tests on installed distribution from an empty directory
python --version
Expand Down

0 comments on commit be6ea02

Please sign in to comment.