-
Notifications
You must be signed in to change notification settings - Fork 38
Move build system to meson-python
#174
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
523692e
8f2a4db
06fb456
c7dba16
293d9f4
51d4c87
de88929
c311b0f
3fb7aff
8533094
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,64 @@ | ||||||
| name: Build project with standard clang compiler | ||||||
|
|
||||||
| on: | ||||||
| pull_request: | ||||||
| push: | ||||||
| branches: [master] | ||||||
|
|
||||||
| permissions: read-all | ||||||
|
|
||||||
| jobs: | ||||||
| build-with-standard-clang: | ||||||
| runs-on: ubuntu-latest | ||||||
|
|
||||||
| strategy: | ||||||
| matrix: | ||||||
| python: ["3.10", "3.11", "3.12", "3.13", "3.14"] | ||||||
| numpy_version: ["numpy'>=2'"] | ||||||
|
||||||
| numpy_version: ["numpy'>=2'"] | |
| numpy_version: ["numpy>=2"] |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,50 @@ | ||
| name: Editable build using pip and pre-release NumPy | ||
|
|
||
| on: | ||
| push: | ||
| branches: | ||
| - master | ||
| pull_request: | ||
|
|
||
| permissions: read-all | ||
|
|
||
| env: | ||
| PACKAGE_NAME: mkl-service | ||
| MODULE_NAME: mkl-service | ||
| TEST_ENV_NAME: test_mkl_service | ||
|
|
||
| jobs: | ||
| build: | ||
| runs-on: ubuntu-latest | ||
| defaults: | ||
| run: | ||
| shell: bash -el {0} | ||
|
|
||
| strategy: | ||
| matrix: | ||
| python: ["3.10", "3.11", "3.12", "3.13", "3.14"] | ||
| use_pre: ["", "--pre"] | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | ||
| with: | ||
| fetch-depth: 0 | ||
|
|
||
| - uses: conda-incubator/setup-miniconda@fc2d68f6413eb2d87b895e92f8584b5b94a10167 # v3.3.0 | ||
| with: | ||
| miniforge-version: latest | ||
| channels: conda-forge | ||
| activate-environment: test | ||
| python-version: ${{ matrix.python }} | ||
|
|
||
| - name: Install MKL | ||
| run: | | ||
| conda install mkl-devel mkl | ||
|
|
||
| - name: Build conda package | ||
| run: | | ||
| pip install --no-cache-dir meson-python ninja cmake cython | ||
| pip install --no-cache-dir numpy ${{ matrix.use_pre }} | ||
| pip install -e ".[test]" --no-build-isolation --verbose | ||
| pip list | ||
| python -m pytest -v mkl/tests | ||
|
ndgrigorian marked this conversation as resolved.
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,4 @@ | ||
| @rem Remember to activate Intel Compiler, or remove these two lines to use Microsoft Visual Studio compiler | ||
|
|
||
| set MKLROOT=%PREFIX% | ||
| %PYTHON% setup.py build --force install --old-and-unmanageable | ||
| %PYTHON% -m pip install --no-deps --no-build-isolation . | ||
| if errorlevel 1 exit 1 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,2 +1,2 @@ | ||
| #!/bin/bash -x | ||
| MKLROOT=$PREFIX $PYTHON setup.py build --force install --old-and-unmanageable | ||
| $PYTHON -m pip install --no-deps --no-build-isolation . |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -18,14 +18,16 @@ requirements: | |
| - {{ compiler('c') }} | ||
| - {{ stdlib('c') }} | ||
| host: | ||
| - meson-python >=0.13.0 | ||
| - meson | ||
| - cmake | ||
| - ninja | ||
| - python | ||
| - python-gil # [py>=314] | ||
| - pip >=25.0 | ||
| - setuptools >=77 | ||
| - mkl-devel | ||
| - cython | ||
| - wheel >=0.45.1 | ||
| - python-build >=1.2.2 | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Still used in
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yes, it's used there because the build script there is more complicated and calls
|
||
| run: | ||
| - python | ||
| - python-gil # [py>=314] | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -18,14 +18,17 @@ requirements: | |
| - {{ compiler('c') }} | ||
| - {{ stdlib('c') }} | ||
| host: | ||
| - meson-python >=0.13.0 | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Would it make sense to parse
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yes, it probably does, though, I think it would be good for a follow up PR |
||
| - meson | ||
| - cmake | ||
| - ninja | ||
| - python | ||
| - python-gil # [py>=314] | ||
| - python-build | ||
| - pip >=25.0 | ||
| - setuptools >=77 | ||
| - mkl-devel | ||
| - cython | ||
| - wheel >=0.45.1 | ||
| - python-build >=1.2.2 | ||
| run: | ||
| - python | ||
| - python-gil # [py>=314] | ||
|
|
||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,70 @@ | ||||||
| project( | ||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Might it be helpful to add
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It could, but I'm not sure if there's reason to add an empty one I added an option in PR on top of this one Maybe I will think of others
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do we need to add a section to the README.md or similar with the build instructions, when building from the source?
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We should revise the build instructions but, in theory, |
||||||
| 'mkl-service', | ||||||
| ['c', 'cython'], | ||||||
| version: run_command( | ||||||
| 'python', '-c', | ||||||
|
||||||
| 'python', '-c', | |
| import('python').find_installation(pure: false), '-c', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it be better to be more explicit here? (since that will not work on macOS as well and probably others)
| if host_machine.system() != 'windows' | |
| if host_machine.system() == 'linux' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah that's a good idea
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I guess we need to update
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. And also to reflect there the new build command |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The matrix value
numpy_version: ["numpy'>=2'"]includes embedded quotes and will be passed verbatim topip install, which is not a valid requirement specifier. Use something likenumpy>=2.