-
-
Notifications
You must be signed in to change notification settings - Fork 54
numpy v1.26.0 with meson #297
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
Merged
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
f217b75
bump to numpy 1.26.0b1
h-vetinari 64e5477
switch to meson
h-vetinari 63018dc
update test deps and public API tests
h-vetinari 83ddeec
add C++ compiler to test env
h-vetinari 70446e3
avoid dynamic detection of long double format on osx-arm64
h-vetinari 9df129b
numpy 1.26.0rc1
h-vetinari 28f1c6b
updated v1.26.0
regro-cf-autotick-bot 6b14b33
remove obsolete patch
h-vetinari File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,23 +1,17 @@ | ||
| ( | ||
| echo [DEFAULT] | ||
| echo library_dirs = %LIBRARY_LIB% | ||
| echo include_dirs = %LIBRARY_INC% | ||
| echo [lapack] | ||
| echo libraries = lapack,blas | ||
| echo [blas] | ||
| echo libraries = cblas,blas | ||
| echo [cblas] | ||
| echo libraries = cblas,blas | ||
| ) > site.cfg | ||
| @echo on | ||
|
|
||
| set "NPY_LAPACK_ORDER=lapack" | ||
| set "NPY_BLAS_ORDER=blas" | ||
| mkdir builddir | ||
|
|
||
| %PYTHON% -m pip install --no-deps --ignore-installed -v . | ||
| if errorlevel 1 exit 1 | ||
| :: -wnx flags mean: --wheel --no-isolation --skip-dependency-check | ||
| %PYTHON% -m build -w -n -x ^ | ||
| -Cbuilddir=builddir ^ | ||
| -Csetup-args=-Dblas=blas ^ | ||
| -Csetup-args=-Dlapack=lapack | ||
| if %ERRORLEVEL% neq 0 exit 1 | ||
|
|
||
| XCOPY %RECIPE_DIR%\f2py.bat %SCRIPTS% /s /e | ||
| if errorlevel 1 exit 1 | ||
|
|
||
| del %SCRIPTS%\f2py.exe | ||
| if errorlevel 1 exit 1 | ||
| :: `pip install dist\numpy*.whl` does not work on windows, | ||
| :: so use a loop; there's only one wheel in dist/ anyway | ||
| for /f %%f in ('dir /b /S .\dist') do ( | ||
| pip install %%f | ||
| if %ERRORLEVEL% neq 0 exit 1 | ||
| ) | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,26 +1,35 @@ | ||
| #!/bin/bash | ||
| set -ex | ||
|
|
||
| set -x | ||
| # necessary for cross-compilation to point to the right env | ||
| export PKG_CONFIG_PATH=$PREFIX/lib/pkgconfig | ||
|
|
||
| # numpy distutils don't use the env variables. | ||
| if [[ ! -f $BUILD_PREFIX/bin/ranlib ]]; then | ||
| ln -s $RANLIB $BUILD_PREFIX/bin/ranlib | ||
| ln -s $AR $BUILD_PREFIX/bin/ar | ||
| fi | ||
| mkdir builddir | ||
|
|
||
| cat > site.cfg <<EOF | ||
| [DEFAULT] | ||
| library_dirs = $PREFIX/lib | ||
| include_dirs = $PREFIX/include | ||
| # HACK: extend $CONDA_PREFIX/meson_cross_file that's created in | ||
| # https://github.com/conda-forge/ctng-compiler-activation-feedstock/blob/main/recipe/activate-gcc.sh | ||
| # https://github.com/conda-forge/clang-compiler-activation-feedstock/blob/main/recipe/activate-clang.sh | ||
| # to use host python; requires that [binaries] section is last in meson_cross_file | ||
| echo "python = '${PREFIX}/bin/python'" >> ${CONDA_PREFIX}/meson_cross_file.txt | ||
|
|
||
| [lapack] | ||
| libraries = lapack,blas | ||
| if [[ $target_platform == "osx-arm64" ]]; then | ||
| # currently cannot properly detect long double format | ||
| # on osx-arm64 when cross-compiling in QEMU, see | ||
| # https://github.com/numpy/numpy/pull/24414 | ||
| echo "[properties]" >> ${CONDA_PREFIX}/meson_cross_file.txt | ||
| echo "longdouble_format = 'IEEE_DOUBLE_LE'" >> ${CONDA_PREFIX}/meson_cross_file.txt | ||
| fi | ||
|
|
||
| [blas] | ||
| libraries = cblas,blas | ||
| EOF | ||
| # meson-python already sets up a -Dbuildtype=release argument to meson, so | ||
| # we need to strip --buildtype out of MESON_ARGS or fail due to redundancy | ||
| MESON_ARGS_REDUCED="$(echo $MESON_ARGS | sed 's/--buildtype release //g')" | ||
|
|
||
| export NPY_LAPACK_ORDER=lapack | ||
| export NPY_BLAS_ORDER=blas | ||
| # -wnx flags mean: --wheel --no-isolation --skip-dependency-check | ||
| $PYTHON -m build -w -n -x \ | ||
| -Cbuilddir=builddir \ | ||
| -Csetup-args=-Dblas=blas \ | ||
| -Csetup-args=-Dlapack=lapack \ | ||
| -Csetup-args=${MESON_ARGS_REDUCED// / -Csetup-args=} \ | ||
| || (cat builddir/meson-logs/meson-log.txt && exit 1) | ||
|
|
||
| $PYTHON -m pip install --no-deps --ignore-installed -v . | ||
| pip install dist/numpy*.whl |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.