From bedace4ff187239e850e30fbb8169a8c13655033 Mon Sep 17 00:00:00 2001 From: "Andrew J. Hesford" Date: Wed, 20 Sep 2023 11:13:02 -0400 Subject: [PATCH] python3-scikit-image: use new meson helper --- srcpkgs/python3-scikit-image/template | 34 +++++++++++---------------- 1 file changed, 14 insertions(+), 20 deletions(-) diff --git a/srcpkgs/python3-scikit-image/template b/srcpkgs/python3-scikit-image/template index e800ed4f00f6c4..b19743e50f37d0 100644 --- a/srcpkgs/python3-scikit-image/template +++ b/srcpkgs/python3-scikit-image/template @@ -2,8 +2,8 @@ pkgname=python3-scikit-image version=0.21.0 revision=1 -build_style=meson -build_helper="python3" +build_style=python3-pep517 +build_helper="meson" hostmakedepends="python3-build python3-installer python3-meson-python python3-wheel python3-setuptools python3-packaging python3-Cython pythran python3-lazy_loader python3-numpy pkg-config" @@ -21,22 +21,15 @@ checksum=53a82a9dbd3ed608d2ad3876269a271a7e922b12e228388eac996b508aadd652 make_check=no if [ "${CROSS_BUILD}" ]; then - configure_args="--cross-file=python.cross" + make_build_args+=" --no-isolation --wheel + -Csetup-args=--cross-file=${XBPS_WRAPPERDIR}/meson/xbps_meson.cross + -Csetup-args=--cross-file=${XBPS_WRAPPERDIR}/meson/python.cross" fi -pre_patch() { - if [ "${CROSS_BUILD}" ]; then - # Meson can't tolerate $CC with arguments as set by build helper - CC="${XBPS_CROSS_TRIPLET}-gcc" - # CXX needs to know where to find Python headers - CXXFLAGS+=" -I${XBPS_CROSS_BASE}/${py3_inc}" - fi -} - post_patch() { if [ "${CROSS_BUILD}" ]; then local _xpy="${XBPS_CROSS_BASE}/${py3_sitelib}" - cat > python.cross <<-EOF + cat > "${XBPS_WRAPPERDIR}/meson/python.cross" <<-EOF [properties] numpy-include-dir = '${_xpy}/numpy/core/include' pythran-include-dir = '${_xpy}/pythran' @@ -44,14 +37,15 @@ post_patch() { fi } -do_build() { - # Use the build directory already configured by xbps-src for meson - python3 -m build --no-isolation --wheel \ - -Cbuilddir="./build" -Ccompile-args="${makejobs}" . +pre_build() { + if [ "${CROSS_BUILD}" ]; then + # Meson can't tolerate $CC with arguments as set by build helper + CC="${XBPS_CROSS_TRIPLET}-gcc" + # CXX needs to know where to find Python headers + CXXFLAGS+=" -I${XBPS_CROSS_BASE}/${py3_inc}" + fi } -do_install() { - python3 -m installer --destdir "${DESTDIR}" \ - --no-compile-bytecode dist/*.whl +post_install() { vlicense LICENSE.txt }