From 523692e07192ed0b18df6573c7b5392c11de487e Mon Sep 17 00:00:00 2001 From: Nikita Grigorian Date: Tue, 7 Apr 2026 19:33:21 -0700 Subject: [PATCH 1/9] Use meson as build system --- conda-recipe-cf/meta.yaml | 4 +- conda-recipe/meta.yaml | 4 +- meson.build | 64 ++++++++++++ mkl/{_mkl_service.pyx => _py_mkl_service.pyx} | 0 pyproject.toml | 24 +---- setup.py | 98 ------------------- 6 files changed, 73 insertions(+), 121 deletions(-) create mode 100644 meson.build rename mkl/{_mkl_service.pyx => _py_mkl_service.pyx} (100%) delete mode 100644 setup.py diff --git a/conda-recipe-cf/meta.yaml b/conda-recipe-cf/meta.yaml index c6653f5..ad1d83b 100644 --- a/conda-recipe-cf/meta.yaml +++ b/conda-recipe-cf/meta.yaml @@ -18,10 +18,12 @@ requirements: - {{ compiler('c') }} - {{ stdlib('c') }} host: + - meson-python >=0.13.0 + - meson + - pkg-config - python - python-gil # [py>=314] - pip >=25.0 - - setuptools >=77 - mkl-devel - cython - wheel >=0.45.1 diff --git a/conda-recipe/meta.yaml b/conda-recipe/meta.yaml index c6653f5..ad1d83b 100644 --- a/conda-recipe/meta.yaml +++ b/conda-recipe/meta.yaml @@ -18,10 +18,12 @@ requirements: - {{ compiler('c') }} - {{ stdlib('c') }} host: + - meson-python >=0.13.0 + - meson + - pkg-config - python - python-gil # [py>=314] - pip >=25.0 - - setuptools >=77 - mkl-devel - cython - wheel >=0.45.1 diff --git a/meson.build b/meson.build new file mode 100644 index 0000000..1c9f560 --- /dev/null +++ b/meson.build @@ -0,0 +1,64 @@ +project( + 'mkl-service', + ['c', 'cython'], + version: run_command( + 'python', '-c', + 'import os; exec(open("mkl/_version.py").read()); print(__version__)', + check: true + ).stdout().strip(), + default_options: [ + 'buildtype=release', + ] +) + +py = import('python').find_installation(pure: false) + +c_args = ['-DNDEBUG'] + +thread_dep = dependency('threads') + +cc = meson.get_compiler('c') +mkl_rt = cc.find_library('mkl_rt', required: true) +mkl_dep = declare_dependency(dependencies: [mkl_rt]) + +rpath = '' +if host_machine.system() != 'windows' + rpath = '$ORIGIN/../..:$ORIGIN/../../..' +endif + +# C extension +py.extension_module( + '_mklinit', + sources: ['mkl/_mklinitmodule.c'], + dependencies: [mkl_dep, thread_dep], + c_args: c_args + ['-DUSING_MKL_RT'], + install_rpath: rpath, + install: true, + subdir: 'mkl' +) + +# Cython extension +py.extension_module( + '_py_mkl_service', + sources: ['mkl/_py_mkl_service.pyx'], + dependencies: [mkl_dep], + c_args: c_args, + install_rpath: rpath, + install: true, + subdir: 'mkl' +) + +# Python sources +py.install_sources( + [ + 'mkl/__init__.py', + 'mkl/_init_helper.py', + 'mkl/_version.py', + ], + subdir: 'mkl' +) + +install_subdir( + 'mkl/tests', + install_dir: py.get_install_dir() / 'mkl' +) diff --git a/mkl/_mkl_service.pyx b/mkl/_py_mkl_service.pyx similarity index 100% rename from mkl/_mkl_service.pyx rename to mkl/_py_mkl_service.pyx diff --git a/pyproject.toml b/pyproject.toml index cb8a5f2..3135a9b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -24,19 +24,11 @@ # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. [build-system] -build-backend = "setuptools.build_meta" -requires = [ - "setuptools>=77", - "Cython", - "wheel>=0.45.1", - "build>=1.2.2", - "mkl-devel" -] +build-backend = "mesonpy" +requires = ["meson-python>=0.13.0", "Cython", "mkl-devel"] [project] -authors = [ - {name = "Intel Corporation", email = "scripting@intel.com"} -] +authors = [{name = "Intel Corporation"}] classifiers = [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Science/Research", @@ -71,13 +63,3 @@ test = ["pytest"] [project.urls] Download = "http://github.com/IntelPython/mkl-service" Homepage = "http://github.com/IntelPython/mkl-service" - -[tool.setuptools] -include-package-data = true -packages = ["mkl"] - -[tool.setuptools.dynamic] -version = {attr = "mkl._version.__version__"} - -[tool.setuptools.package-data] -"mkl" = ["tests/*.py"] diff --git a/setup.py b/setup.py deleted file mode 100644 index 23bac56..0000000 --- a/setup.py +++ /dev/null @@ -1,98 +0,0 @@ -# Copyright (c) 2018, Intel Corporation -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are met: -# -# * Redistributions of source code must retain the above copyright notice, -# this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# * Neither the name of Intel Corporation nor the names of its contributors -# may be used to endorse or promote products derived from this software -# without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE -# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - -import os -import sys -from os.path import join - -import Cython.Build -from setuptools import Extension, setup - - -def extensions(): - mkl_root = os.environ.get("MKLROOT", None) - if mkl_root: - mkl_info = { - "include_dirs": [join(mkl_root, "include")], - "library_dirs": [join(mkl_root, "lib"), join(mkl_root, "lib", "intel64")], - "libraries": ["mkl_rt"], - } - else: - raise ValueError("MKLROOT environment variable not set.") - - if sys.platform != "win32": - mkl_info["rpaths"] = ["$ORIGIN/../..", "$ORIGIN/../../.."] - - mkl_include_dirs = mkl_info.get("include_dirs", []) - mkl_library_dirs = mkl_info.get("library_dirs", []) - mkl_libraries = mkl_info.get("libraries", ["mkl_rt"]) - mkl_rpaths = mkl_info.get("rpaths", []) - - defs = [] - if any(["mkl_rt" in li for li in mkl_libraries]): - # libs += ["dl"] - by default on Linux - defs += [("USING_MKL_RT", None)] - - extensions = [] - extensions.append( - Extension( - "mkl._mklinit", - sources=[join("mkl", "_mklinitmodule.c")], - include_dirs=mkl_include_dirs, - libraries=mkl_libraries + (["pthread"] if os.name == "posix" else []), - library_dirs=mkl_library_dirs, - runtime_library_dirs=mkl_rpaths, - extra_compile_args=[ - "-DNDEBUG" - # "-g", "-O2", "-Wall", - ], - define_macros=defs, - ) - ) - - extensions.append( - Extension( - "mkl._py_mkl_service", - sources=[join("mkl", "_mkl_service.pyx")], - include_dirs=mkl_include_dirs, - library_dirs=mkl_library_dirs, - libraries=mkl_libraries, - runtime_library_dirs=mkl_rpaths, - extra_compile_args=[ - "-DNDEBUG" - # "-g", "-O2", "-Wall", - ], - ) - ) - - return extensions - - -setup( - cmdclass={"build_ext": Cython.Build.build_ext}, - ext_modules=extensions(), - zip_safe=False, -) From 8f2a4dba19288fcd6b5565080e34f43bc7ed5b11 Mon Sep 17 00:00:00 2001 From: Nikita Grigorian Date: Tue, 7 Apr 2026 20:53:51 -0700 Subject: [PATCH 2/9] remove MKLROOT --- conda-recipe-cf/bld.bat | 1 - conda-recipe-cf/build.sh | 2 +- conda-recipe/bld.bat | 2 -- conda-recipe/build.sh | 2 -- 4 files changed, 1 insertion(+), 6 deletions(-) diff --git a/conda-recipe-cf/bld.bat b/conda-recipe-cf/bld.bat index cc55004..ac9be74 100644 --- a/conda-recipe-cf/bld.bat +++ b/conda-recipe-cf/bld.bat @@ -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 if errorlevel 1 exit 1 diff --git a/conda-recipe-cf/build.sh b/conda-recipe-cf/build.sh index 5d36203..c81afab 100644 --- a/conda-recipe-cf/build.sh +++ b/conda-recipe-cf/build.sh @@ -1,2 +1,2 @@ #!/bin/bash -x -MKLROOT=$PREFIX $PYTHON setup.py build --force install --old-and-unmanageable +$PYTHON setup.py build --force install --old-and-unmanageable diff --git a/conda-recipe/bld.bat b/conda-recipe/bld.bat index 90a55f4..ec28ad8 100644 --- a/conda-recipe/bld.bat +++ b/conda-recipe/bld.bat @@ -2,8 +2,6 @@ echo on rem set CFLAGS=-I%PREFIX%\Library\include %CFLAGS% rem set LDFLAGS=/LIBPATH:%PREFIX% %LDFLAGS% -set MKLROOT=%CONDA_PREFIX% - "%PYTHON%" setup.py clean --all :: Make CMake verbose diff --git a/conda-recipe/build.sh b/conda-recipe/build.sh index 6bfa533..1b7067f 100644 --- a/conda-recipe/build.sh +++ b/conda-recipe/build.sh @@ -1,8 +1,6 @@ #!/bin/bash set -ex -export MKLROOT=$CONDA_PREFIX - read -r GLIBC_MAJOR GLIBC_MINOR <<<"$(conda list '^sysroot_linux-64$' \ | tail -n 1 | awk '{print $2}' | grep -oP '\d+' | head -n 2 | tr '\n' ' ')" From 06fb456cb06de22023d5a63788ac3bd51f31df6a Mon Sep 17 00:00:00 2001 From: Nikita Grigorian Date: Tue, 7 Apr 2026 21:02:42 -0700 Subject: [PATCH 3/9] add standard clang workflow and update clang workflow --- .github/workflows/build-with-clang.yml | 14 ++-- .../workflows/build-with-standard-clang.yml | 64 +++++++++++++++++++ 2 files changed, 70 insertions(+), 8 deletions(-) create mode 100644 .github/workflows/build-with-standard-clang.yml diff --git a/.github/workflows/build-with-clang.yml b/.github/workflows/build-with-clang.yml index 2c115d6..5c47b19 100644 --- a/.github/workflows/build-with-clang.yml +++ b/.github/workflows/build-with-clang.yml @@ -15,6 +15,7 @@ jobs: strategy: matrix: python: ["3.10", "3.11", "3.12", "3.13"] + numpy_version: ["numpy'>=2'"] env: ONEAPI_ROOT: /opt/intel/oneapi @@ -40,7 +41,6 @@ jobs: - name: Install Intel OneAPI run: | sudo apt-get install intel-oneapi-compiler-dpcpp-cpp - sudo apt-get install intel-oneapi-tbb sudo apt-get install intel-oneapi-mkl-devel - name: Setup Python @@ -55,12 +55,9 @@ jobs: fetch-depth: 0 - name: Install mkl-service dependencies - uses: BSFishy/pip-action@8f2d471d809dc20b6ada98c91910b6ae6243f318 # v1 - with: - packages: | - cython - setuptools>=77 - pytest + run: | + pip install meson-python cython mkl + pip install ${{ matrix.numpy_version }} - name: List oneAPI folder content run: ls ${{ env.ONEAPI_ROOT }}/compiler @@ -71,9 +68,10 @@ jobs: echo "$CMPLR_ROOT" export CC="$CMPLR_ROOT/bin/icx" export CFLAGS="${CFLAGS} -fno-fast-math" - python setup.py develop + pip install . --no-build-isolation --no-deps --verbose - name: Run mkl-service tests run: | source ${{ env.ONEAPI_ROOT }}/setvars.sh + pip install pytest pytest -s -v --pyargs mkl diff --git a/.github/workflows/build-with-standard-clang.yml b/.github/workflows/build-with-standard-clang.yml new file mode 100644 index 0000000..a91bc80 --- /dev/null +++ b/.github/workflows/build-with-standard-clang.yml @@ -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'"] + + env: + COMPILER_ROOT: /usr/bin + + defaults: + run: + shell: bash -el {0} + + steps: + - name: Cancel Previous Runs + uses: styfle/cancel-workflow-action@3155a141048f8f89c06b4cdae32e7853e97536bc # 0.13.0 + with: + access_token: ${{ github.token }} + + - name: Install Dependencies + run: | + sudo apt-get update + sudo apt-get install -y clang + + - name: Setup Python + uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 + with: + python-version: ${{ matrix.python }} + architecture: x64 + + - name: Checkout repo + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + with: + fetch-depth: 0 + + - name: Install mkl-service dependencies + run: | + pip install meson-python cython mkl + pip install ${{ matrix.numpy_version }} + + - name: Build mkl-service + run: | + export CC=${{ env.COMPILER_ROOT }}/clang + pip install . --no-build-isolation --no-deps --verbose + + - name: Run mkl-service tests + run: | + pip install pytest + # mkl-service cannot be installed in editable mode, we need + # to change directory before importing it and running tests + cd .. + pytest -s -v --pyargs mkl From c7dba16e8270ec44fe93aea661685eb9ceca7898 Mon Sep 17 00:00:00 2001 From: Nikita Grigorian Date: Tue, 7 Apr 2026 22:40:14 -0700 Subject: [PATCH 4/9] add ninja to build-system --- pyproject.toml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 3135a9b..0023e2e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -25,7 +25,12 @@ [build-system] build-backend = "mesonpy" -requires = ["meson-python>=0.13.0", "Cython", "mkl-devel"] +requires = [ + "meson-python>=0.13.0", + "ninja", + "Cython", + "mkl-devel" +] [project] authors = [{name = "Intel Corporation"}] From 293d9f4535ce5e655f54128343fa738d86526fd5 Mon Sep 17 00:00:00 2001 From: Nikita Grigorian Date: Tue, 7 Apr 2026 22:47:15 -0700 Subject: [PATCH 5/9] use cmake to find MKL and update dependencies --- .github/workflows/build-with-clang.yml | 2 +- .github/workflows/build-with-standard-clang.yml | 2 +- meson.build | 10 ++++++++-- pyproject.toml | 3 ++- 4 files changed, 12 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build-with-clang.yml b/.github/workflows/build-with-clang.yml index 5c47b19..258bdbe 100644 --- a/.github/workflows/build-with-clang.yml +++ b/.github/workflows/build-with-clang.yml @@ -56,7 +56,7 @@ jobs: - name: Install mkl-service dependencies run: | - pip install meson-python cython mkl + pip install meson-python cython cmake ninja mkl pip install ${{ matrix.numpy_version }} - name: List oneAPI folder content diff --git a/.github/workflows/build-with-standard-clang.yml b/.github/workflows/build-with-standard-clang.yml index a91bc80..f100d32 100644 --- a/.github/workflows/build-with-standard-clang.yml +++ b/.github/workflows/build-with-standard-clang.yml @@ -47,7 +47,7 @@ jobs: - name: Install mkl-service dependencies run: | - pip install meson-python cython mkl + pip install meson-python cython cmake ninja mkl pip install ${{ matrix.numpy_version }} - name: Build mkl-service diff --git a/meson.build b/meson.build index 1c9f560..5e48d8b 100644 --- a/meson.build +++ b/meson.build @@ -18,8 +18,14 @@ c_args = ['-DNDEBUG'] thread_dep = dependency('threads') cc = meson.get_compiler('c') -mkl_rt = cc.find_library('mkl_rt', required: true) -mkl_dep = declare_dependency(dependencies: [mkl_rt]) +mkl_dep = dependency('MKL', method: 'cmake', + modules: ['MKL::MKL'], + cmake_args: [ + '-DMKL_ARCH=intel64', + '-DMKL_LINK=sdl', + ], + required: true +) rpath = '' if host_machine.system() != 'windows' diff --git a/pyproject.toml b/pyproject.toml index 0023e2e..75750fb 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -29,7 +29,8 @@ requires = [ "meson-python>=0.13.0", "ninja", "Cython", - "mkl-devel" + "mkl-devel", + "cmake" ] [project] From 51d4c87f045acab6f504dc1c4f0fed5b735491f7 Mon Sep 17 00:00:00 2001 From: Nikita Grigorian Date: Tue, 7 Apr 2026 22:47:30 -0700 Subject: [PATCH 6/9] update meta.yamls and conda-forge conda recipes --- conda-recipe-cf/bld.bat | 2 +- conda-recipe-cf/build.sh | 2 +- conda-recipe-cf/meta.yaml | 4 ++-- conda-recipe/meta.yaml | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/conda-recipe-cf/bld.bat b/conda-recipe-cf/bld.bat index ac9be74..498077f 100644 --- a/conda-recipe-cf/bld.bat +++ b/conda-recipe-cf/bld.bat @@ -1,4 +1,4 @@ @rem Remember to activate Intel Compiler, or remove these two lines to use Microsoft Visual Studio compiler -%PYTHON% setup.py build --force install --old-and-unmanageable +%PYTHON% -m pip install --no-deps --no-build-isolation . if errorlevel 1 exit 1 diff --git a/conda-recipe-cf/build.sh b/conda-recipe-cf/build.sh index c81afab..40c3b81 100644 --- a/conda-recipe-cf/build.sh +++ b/conda-recipe-cf/build.sh @@ -1,2 +1,2 @@ #!/bin/bash -x -$PYTHON setup.py build --force install --old-and-unmanageable +$PYTHON -m pip install --no-deps --no-build-isolation . diff --git a/conda-recipe-cf/meta.yaml b/conda-recipe-cf/meta.yaml index ad1d83b..811fcdc 100644 --- a/conda-recipe-cf/meta.yaml +++ b/conda-recipe-cf/meta.yaml @@ -20,14 +20,14 @@ requirements: host: - meson-python >=0.13.0 - meson - - pkg-config + - cmake + - ninja - python - python-gil # [py>=314] - pip >=25.0 - mkl-devel - cython - wheel >=0.45.1 - - python-build >=1.2.2 run: - python - python-gil # [py>=314] diff --git a/conda-recipe/meta.yaml b/conda-recipe/meta.yaml index ad1d83b..811fcdc 100644 --- a/conda-recipe/meta.yaml +++ b/conda-recipe/meta.yaml @@ -20,14 +20,14 @@ requirements: host: - meson-python >=0.13.0 - meson - - pkg-config + - cmake + - ninja - python - python-gil # [py>=314] - pip >=25.0 - mkl-devel - cython - wheel >=0.45.1 - - python-build >=1.2.2 run: - python - python-gil # [py>=314] From de8892901929adc1d6038edc5970509ffd80c519 Mon Sep 17 00:00:00 2001 From: Nikita Grigorian Date: Tue, 7 Apr 2026 22:59:46 -0700 Subject: [PATCH 7/9] install mkl-devel when building with standard clang --- .github/workflows/build-with-standard-clang.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-with-standard-clang.yml b/.github/workflows/build-with-standard-clang.yml index f100d32..221188a 100644 --- a/.github/workflows/build-with-standard-clang.yml +++ b/.github/workflows/build-with-standard-clang.yml @@ -47,7 +47,7 @@ jobs: - name: Install mkl-service dependencies run: | - pip install meson-python cython cmake ninja mkl + pip install meson-python cython cmake ninja mkl-devel mkl pip install ${{ matrix.numpy_version }} - name: Build mkl-service From c311b0f8ebff7421a57ce3f168bde6500f776692 Mon Sep 17 00:00:00 2001 From: Nikita Grigorian Date: Tue, 7 Apr 2026 23:02:19 -0700 Subject: [PATCH 8/9] add pip build workflow --- .github/workflows/build_pip.yml | 50 +++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 .github/workflows/build_pip.yml diff --git a/.github/workflows/build_pip.yml b/.github/workflows/build_pip.yml new file mode 100644 index 0000000..cc9f24b --- /dev/null +++ b/.github/workflows/build_pip.yml @@ -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 From 3fb7affb5ca511f887fa44649d3864b4258d8de1 Mon Sep 17 00:00:00 2001 From: Nikita Grigorian Date: Tue, 7 Apr 2026 23:35:31 -0700 Subject: [PATCH 9/9] update conda-recipe build scripts --- conda-recipe/bld.bat | 5 ----- conda-recipe/build.sh | 7 +++---- conda-recipe/meta.yaml | 1 + 3 files changed, 4 insertions(+), 9 deletions(-) diff --git a/conda-recipe/bld.bat b/conda-recipe/bld.bat index ec28ad8..554e8f2 100644 --- a/conda-recipe/bld.bat +++ b/conda-recipe/bld.bat @@ -2,11 +2,6 @@ echo on rem set CFLAGS=-I%PREFIX%\Library\include %CFLAGS% rem set LDFLAGS=/LIBPATH:%PREFIX% %LDFLAGS% -"%PYTHON%" setup.py clean --all - -:: Make CMake verbose -set "VERBOSE=1" - :: -wnx flags mean: --wheel --no-isolation --skip-dependency-check %PYTHON% -m build -w -n -x if %ERRORLEVEL% neq 0 exit 1 diff --git a/conda-recipe/build.sh b/conda-recipe/build.sh index 1b7067f..a18f7a9 100644 --- a/conda-recipe/build.sh +++ b/conda-recipe/build.sh @@ -4,10 +4,9 @@ set -ex read -r GLIBC_MAJOR GLIBC_MINOR <<<"$(conda list '^sysroot_linux-64$' \ | tail -n 1 | awk '{print $2}' | grep -oP '\d+' | head -n 2 | tr '\n' ' ')" -${PYTHON} setup.py clean --all - -# Make CMake verbose -export VERBOSE=1 +if [ -d "build" ]; then + rm -rf build +fi # -wnx flags mean: --wheel --no-isolation --skip-dependency-check ${PYTHON} -m build -w -n -x diff --git a/conda-recipe/meta.yaml b/conda-recipe/meta.yaml index 811fcdc..61a117f 100644 --- a/conda-recipe/meta.yaml +++ b/conda-recipe/meta.yaml @@ -24,6 +24,7 @@ requirements: - ninja - python - python-gil # [py>=314] + - python-build - pip >=25.0 - mkl-devel - cython