Skip to content

Commit be6ea02

Browse files
committed
Another go at refactoring
1 parent 544fcd6 commit be6ea02

File tree

6 files changed

+15
-3
lines changed

6 files changed

+15
-3
lines changed

.github/workflows/build.ps1

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
echo "::group::Build wheel"
2-
pip wheel -w "${env:WHEEL_SDIR}" --no-deps ".\${env:REPO_DIR}"
2+
pip install "$env:BUILD_DEPENDS"
3+
pip wheel -w "${env:WHEEL_SDIR}" --no-build-isolation ".\${env:REPO_DIR}"
34
ls -l "${env:GITHUB_WORKSPACE}/${env:WHEEL_SDIR}/"
45
echo "::endgroup::"
56

.github/workflows/build.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ echo "::group::Install a virtualenv"
2525
echo "::endgroup::"
2626

2727
echo "::group::Build wheel"
28+
np_dep=$(python ./get_numpy_version.py $MB_PYTHON_VERSION)
29+
export BUILD_DEPENDS="${BUILD_BASE} ${np_dep}"
2830
np_dep=$(python get_numpy_version.py ${MB_PYTHON_VERSION})
2931
export BUILD_DEPENDS=$np_dep
3032
clean_code

.github/workflows/wheels-linux.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ jobs:
4848
MB_PYTHON_VERSION: ${{ matrix.python }}
4949
MB_ML_LIBC: ${{ matrix.mb-ml-libc }}
5050
MB_ML_VER: ${{ matrix.mb-ml-ver }}
51+
BUILD_BASE: "meson-python>=0.13 cython>=3"
5152
steps:
5253
- uses: actions/checkout@v4
5354
with:

.github/workflows/wheels-macos.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ jobs:
3939
PLAT: ${{ matrix.platform }}
4040
MB_PYTHON_VERSION: ${{ matrix.python }}
4141
TRAVIS_OS_NAME: "osx"
42+
BUILD_BASE: "meson-python>=0.13 cython>=3"
4243
steps:
4344
- uses: actions/checkout@v4
4445
with:

.github/workflows/wheels-windows.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ jobs:
3030
env:
3131
BUILD_COMMIT: ${{ inputs.build-commit }}
3232
WHEEL_SDIR: wheelhouse
33+
MB_PYTHON_VERSION: ${{ matrix.python }}
34+
BUILD_BASE: "meson-python>=0.13 cython>=3"
3335
steps:
3436
- uses: actions/checkout@v4
3537
with:
@@ -39,8 +41,8 @@ jobs:
3941
python-version: ${{ matrix.python }}
4042
- name: Set Numpy version
4143
run: |
42-
$np_dep = python .\get_numpy_version.py ${{ matrix.python }}
43-
echo "BUILD_DEPENDS=$np_dep" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append
44+
$np_dep = python .\get_numpy_version.py $env:MB_PYTHON_VERSION
45+
echo "BUILD_DEPENDS=${env:BUILD_BASE} ${np_dep}" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append
4446
- name: Build Wheel
4547
run: .github/workflows/build.ps1
4648
- uses: actions/upload-artifact@v3

config.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@ function pre_build {
1010
brew install openblas
1111
}
1212

13+
function pip_wheel_cmd {
14+
local abs_wheelhouse=$1
15+
pip wheel $(pip_opts) -w $abs_wheelhouse --no-build-isolation .
16+
}
17+
1318
function run_tests {
1419
# Runs tests on installed distribution from an empty directory
1520
python --version

0 commit comments

Comments
 (0)