Skip to content
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

WIP / DNM: build with meson on unix #205

Closed
wants to merge 33 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
44c6dcb
switch from setuptools to meson on unix
h-vetinari Jun 27, 2022
871b1fe
go back to default build system (now meson) on unix
h-vetinari Jun 27, 2022
1a8a3fd
update installation invocation on unix
h-vetinari Jan 27, 2023
4200cd9
add pypa/build as host dep
h-vetinari Jan 27, 2023
20393db
separate invocation of mesion and python -m build
h-vetinari Feb 6, 2023
fb16abd
show meson-log.txt in case of failure
h-vetinari Feb 6, 2023
d63e8b8
compile against netlib blas/lapack
h-vetinari Feb 6, 2023
b23be07
use (most) correct meson invocation
h-vetinari Feb 10, 2023
88c1a4d
add cmake also in build-env (BLAS detection etc.)
h-vetinari Feb 10, 2023
ea035e0
populate MESON_ARGS & manually add a meson_cross_file.txt for linux-*
h-vetinari Feb 10, 2023
0520f1f
add binaries to meson cross files
h-vetinari Feb 14, 2023
4aa738d
replace variables in cross-file through sed
h-vetinari Feb 14, 2023
07b42d5
use more detailed cross-file for osx-arm
h-vetinari Feb 14, 2023
bf43134
avoid reconfigure step of `$PYTHON -m build ...`
h-vetinari Feb 18, 2023
6583ab4
backport upstream PR 18006
h-vetinari Feb 23, 2023
aa19c00
Use $PREFIX/bin/python
isuruf Feb 23, 2023
c4a44be
Use meson on PATH
isuruf Feb 23, 2023
7dec741
debug: skip windows & pypy
h-vetinari Feb 24, 2023
a7de5d8
MNT: Re-rendered with conda-build 3.23.3, conda-smithy 3.22.1, and co…
h-vetinari Feb 24, 2023
54d3b1d
backport upstream PR 18034
h-vetinari Feb 24, 2023
c9afb89
Revert "avoid reconfigure step of `$PYTHON -m build ...`"
h-vetinari Feb 24, 2023
61edc9b
specify include dirs for numpy/pybind11/pythran in cross-file
h-vetinari Feb 24, 2023
25264aa
make meson-python & ninja build-only deps
h-vetinari Feb 24, 2023
1f180ec
fix SP_DIR replacement
h-vetinari Feb 25, 2023
98919c1
debug
h-vetinari Feb 25, 2023
0dc3c22
roll back to c9afb89c183b2fc321f5cb6fc86b8547911e621c
h-vetinari Mar 6, 2023
7640646
Revert "debug: skip windows & pypy"
h-vetinari Mar 7, 2023
15ead43
MNT: Re-rendered with conda-build 3.23.3, conda-smithy 3.23.0, and co…
h-vetinari Mar 7, 2023
5bfc0ea
skip a test that times out for pypy in emulation
h-vetinari Mar 7, 2023
17a844e
skip some more very slow tests on pypy in emulation
h-vetinari Mar 8, 2023
628302d
last batch of pypy skips
h-vetinari Mar 8, 2023
b2d5d89
try without pkg_config_libdir in cross-file
h-vetinari Mar 22, 2023
5014408
remove manual meson_cross_file.txt, now that compiler-activation take…
h-vetinari Mar 28, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .azure-pipelines/azure-pipelines-win.yml
100755 → 100644

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions .scripts/build_steps.sh

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions .scripts/run_osx_build.sh

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 11 additions & 5 deletions recipe/build.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
#!/bin/bash
set -ex

set -x
mkdir builddir

# Use the G77 ABI wrapper everywhere so that the underlying blas implementation
# can have a G77 ABI (currently only MKL)
export SCIPY_USE_G77_ABI_WRAPPER=1
# need to run meson first for cross-compilation case
$PYTHON $(which meson) setup ${MESON_ARGS} \
-Dblas=blas \
-Dlapack=lapack \
-Duse-g77-abi=true \
builddir || (cat builddir/meson-logs/meson-log.txt && exit 1)
h-vetinari marked this conversation as resolved.
Show resolved Hide resolved

$PYTHON setup.py install --single-version-externally-managed --record=record.txt
# -wnx flags mean: --wheel --no-isolation --skip-dependency-check
$PYTHON -m build -w -n -x -Cbuilddir=builddir
pip install dist/scipy*.whl
38 changes: 31 additions & 7 deletions recipe/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ source:
# the submodules (not in tarball due to dear-github/dear-github#214)
- url: https://github.com/scipy/scipy/archive/refs/tags/v{{ version }}.tar.gz
sha256: 8f08e1742c9b09eb58640fa5a56031d6e1844806899e883fbe7447ca86fe8c55
patches:
# backport https://github.com/scipy/scipy/pull/18006
- patches/0001-BLD-use-a-relative-path-to-numpy-pybind11-pythran-in.patch
# backport https://github.com/scipy/scipy/pull/18034
- patches/0002-BLD-avoid-running-run_command-py3-.-for-better-cross.patch
# https://github.com/scipy/scipy/tree/v{{ version }}/scipy/_lib
- git_url: https://github.com/scipy/boost-headers-only.git
git_rev: 3af99e6d566043072e95bc882d32c9c26f37e0ba
Expand All @@ -39,7 +44,10 @@ requirements:
- cython # [build_platform != target_platform]
- numpy # [build_platform != target_platform]
- pybind11 # [build_platform != target_platform]
- setuptools <60 # [build_platform != target_platform]
- meson-python # [build_platform != target_platform]
- cmake # [build_platform != target_platform]
- ninja # [build_platform != target_platform]
- pkg-config # [build_platform != target_platform]
- {{ compiler('c') }}
- {{ compiler('cxx') }}
# pythran code needs clang-cl on windows
Expand All @@ -54,8 +62,12 @@ requirements:
- libcblas
- liblapack
- python
- setuptools <60
- setuptools <60 # [win]
- cython
- meson-python # [unix]
- ninja # [unix]
- pkg-config # [unix]
- python-build # [unix]
- pybind11
- pythran
- numpy
Expand All @@ -78,14 +90,26 @@ requirements:
{% set tests_to_skip = tests_to_skip + " or (test_optimize and TestBrute and test_workers)" %} # [aarch64 or ppc64le]
# tests that run into timeouts (set in scipy test suite) in emulation
{% set tests_to_skip = tests_to_skip + " or (test_propack and test_examples)" %} # [aarch64 or ppc64le]
# occasionally runs out of memory on windows + pypy
{% set tests_to_skip = tests_to_skip + " or test_bootstrap_against_" %} # [(python_impl == "pypy") and win]
# very slow tests for pypy in emulation
{% set tests_to_skip = tests_to_skip + " or test_triple_integral_improper" %} # [(python_impl == "pypy") and (aarch64 or ppc64le)]
{% set tests_to_skip = tests_to_skip + " or test_all_nograd_minimizers or test_basic_fit_mle" %} # [(python_impl == "pypy") and (aarch64 or ppc64le)]
{% set tests_to_skip = tests_to_skip + " or test_cdf_against_tables or test_pdf_integration" %} # [(python_impl == "pypy") and (aarch64 or ppc64le)]
{% set tests_to_skip = tests_to_skip + " or test_cdist_ and (refcount or calling_convention)" %} # [(python_impl == "pypy") and (aarch64 or ppc64le)]
{% set tests_to_skip = tests_to_skip + " or test_conditionally_positive_definite" %} # [(python_impl == "pypy") and (aarch64 or ppc64le)]
{% set tests_to_skip = tests_to_skip + " or test_cont_basic[500" %} # [(python_impl == "pypy") and (aarch64 or ppc64le)]
{% set tests_to_skip = tests_to_skip + " or test_gh12922 or test_modules_importable" %} # [(python_impl == "pypy") and (aarch64 or ppc64le)]
{% set tests_to_skip = tests_to_skip + " or test_random_complex_exact" %} # [(python_impl == "pypy") and (aarch64 or ppc64le)]
{% set tests_to_skip = tests_to_skip + " or test_cont_basic[500 or test_cython_api[elliprj]" %} # [(python_impl == "pypy") and (aarch64 or ppc64le)]
{% set tests_to_skip = tests_to_skip + " or test_filtfilt_gust or test_kappa3_array_gh13582" %} # [(python_impl == "pypy") and (aarch64 or ppc64le)]
{% set tests_to_skip = tests_to_skip + " or test_fitstart[genexpon-shapes28] or test_gh12922" %} # [(python_impl == "pypy") and (aarch64 or ppc64le)]
{% set tests_to_skip = tests_to_skip + " or test_integration_sparse or test_kdtree_box" %} # [(python_impl == "pypy") and (aarch64 or ppc64le)]
{% set tests_to_skip = tests_to_skip + " or test_minimize_callback_copies_array[fmin]" %} # [(python_impl == "pypy") and (aarch64 or ppc64le)]
{% set tests_to_skip = tests_to_skip + " or TestDifferentialEvolutionSolver" %} # [(python_impl == "pypy") and (aarch64 or ppc64le)]
{% set tests_to_skip = tests_to_skip + " or test_mip1 or test_mixed_threads_processes" %} # [(python_impl == "pypy") and (aarch64 or ppc64le)]
{% set tests_to_skip = tests_to_skip + " or test_modules_importable or test_neldermead_limit" %} # [(python_impl == "pypy") and (aarch64 or ppc64le)]
{% set tests_to_skip = tests_to_skip + " or test_random_exact or test_random_complex_exact" %} # [(python_impl == "pypy") and (aarch64 or ppc64le)]
{% set tests_to_skip = tests_to_skip + " or TestDualAnnealing or TestQuad or TestNQuad" %} # [(python_impl == "pypy") and (aarch64 or ppc64le)]
{% set tests_to_skip = tests_to_skip + " or TestDifferentialEvolutionSolver or TestTRF" %} # [(python_impl == "pypy") and (aarch64 or ppc64le)]
{% set tests_to_skip = tests_to_skip + " or TestMonteCarloHypothesisTest" %} # [(python_impl == "pypy") and (aarch64 or ppc64le)]
{% set tests_to_skip = tests_to_skip + " or (TestBessel and test_fs_param)" %} # [(python_impl == "pypy") and (aarch64 or ppc64le)]
{% set tests_to_skip = tests_to_skip + " or (TestOrdQZWorkspaceSize and test_decompose)" %} # [(python_impl == "pypy") and (aarch64 or ppc64le)]

test:
requires:
Expand Down
Loading