Skip to content

Commit d14f83b

Browse files
committed
Prepare for upstream refactor in mkl-service
Upstream moved the setup from setup.py to pyproject.toml. This breaks building of any current release (<= v2.4.2), but should work on main and any future releases.
1 parent cafe0f4 commit d14f83b

File tree

2 files changed

+20
-4
lines changed

2 files changed

+20
-4
lines changed

.github/workflows/wheels.yml

+7-4
Original file line numberDiff line numberDiff line change
@@ -132,15 +132,18 @@ jobs:
132132
>>"${{ github.workspace }}/patches/LICENSE_MKL.txt"
133133
134134
# Add .so -> .so.2 symlinks to fix linking for mkl-service.
135-
cd "${{ env.MKL_DIR }}"/lib
136-
for i in $( ls libmkl*.so.2 ); do ln -s $i ${i%.*}; done
135+
if [[ "${{ runner.os }}" == "Linux" ]]; then
136+
cd "${{ env.MKL_DIR }}"/lib
137+
for i in $( ls libmkl*.so.2 ); do ln -s $i ${i%.*}; done
138+
fi
137139
138140
- name: Add MKL to runtime dependencies
139141
working-directory: ${{ env.SRC_DIR }}
140142
run: |
141143
# Pin runtime library to the exact version used for compiling.
142144
if [[ "${{ inputs.name }}" == "mkl-service" ]]; then
143-
sed -i "s/install_requires=\[\]/install_requires=['mkl==${MKL_VERSION}']/" setup.py
145+
# MKLROOT must be set, even with --no-sync.
146+
MKLROOT= uv add --no-sync mkl=="${MKL_VERSION}"
144147
else
145148
uv add --no-sync mkl=="${MKL_VERSION}" mkl-service
146149
fi
@@ -255,7 +258,7 @@ jobs:
255258
256259
mkl-service)
257260
uv pip install pytest
258-
pytest -vv --pyargs mkl
261+
pytest -s -v --pyargs mkl
259262
;;
260263
esac
261264

patches/mkl-service/pyproject.patch

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
diff --git a/pyproject.toml b/pyproject.toml
2+
index 5ec86b8..759b6e9 100644
3+
--- a/pyproject.toml
4+
+++ b/pyproject.toml
5+
@@ -68,7 +68,7 @@ Homepage = "http://github.com/IntelPython/mkl-service"
6+
7+
[tool.setuptools]
8+
include-package-data = true
9+
-packages = ["mkl"]
10+
+packages = ["mkl", "mkl.tests"]
11+
12+
[tool.setuptools.dynamic]
13+
version = {attr = "mkl._version.__version__"}

0 commit comments

Comments
 (0)