From cc5ea98bdad3b868695260e6e6080671bd259e92 Mon Sep 17 00:00:00 2001 From: "Andrew J. Hesford" Date: Tue, 7 May 2024 16:42:02 -0400 Subject: [PATCH] python3-pyopencl: update to 2024.2.2. --- .../python3-pyopencl/patches/build-deps.patch | 19 +++++++++++++++ srcpkgs/python3-pyopencl/template | 23 ++++++++++++++----- 2 files changed, 36 insertions(+), 6 deletions(-) create mode 100644 srcpkgs/python3-pyopencl/patches/build-deps.patch diff --git a/srcpkgs/python3-pyopencl/patches/build-deps.patch b/srcpkgs/python3-pyopencl/patches/build-deps.patch new file mode 100644 index 00000000000..cf59b76c4f3 --- /dev/null +++ b/srcpkgs/python3-pyopencl/patches/build-deps.patch @@ -0,0 +1,19 @@ +Fix the numpy version restriction, and eliminate the cmake and ninja +dependencies for which Void offers no Python package. + +--- a/pyproject.toml ++++ b/pyproject.toml +@@ -3,12 +3,9 @@ + requires = [ + "setuptools>=42.0.0", + "wheel>=0.34.2", +- "numpy;python_version >= '3.9' and platform_python_implementation == 'PyPy'", +- "oldest-supported-numpy;python_version < '3.9' or platform_python_implementation != 'PyPy'", ++ "numpy", + "scikit-build", +- "cmake>=3.17", + "nanobind>=1.9.2", +- "ninja; platform_system!='Windows'", + ] + build-backend = "setuptools.build_meta" + diff --git a/srcpkgs/python3-pyopencl/template b/srcpkgs/python3-pyopencl/template index f851fe0343b..0a140650239 100644 --- a/srcpkgs/python3-pyopencl/template +++ b/srcpkgs/python3-pyopencl/template @@ -1,21 +1,32 @@ # Template file for 'python3-pyopencl' pkgname=python3-pyopencl -version=2024.1 +version=2024.2.2 revision=1 -build_style=python3-module -hostmakedepends="python3-setuptools python3-pybind11 python3-Cython python3-numpy" -makedepends="OpenCL-Headers ocl-icd-devel python3-pybind11" +build_style=python3-pep517 +hostmakedepends="python3-setuptools python3-wheel python3-numpy + python3-scikit-build cmake ninja python3-nanobind" +makedepends="OpenCL-Headers ocl-icd-devel python3-numpy python3-devel" depends="python3-numpy python3-pytools python3-platformdirs" short_desc="OpenCL bindings for Python 3" maintainer="Andrew J. Hesford " license="X11, Apache-2.0, BSD-3-Clause" homepage="https://mathema.tician.de/software/pyopencl" distfiles="${PYPI_SITE}/p/pyopencl/pyopencl-${version}.tar.gz" -checksum=ecd572ee940ad8bda1639c3a7beb68834fc9a98ad7eb3f6e01aac4f7d9d4bac1 +checksum=be6f6535de310a3166e4a8fb606a615b7cf3412cdb05353127ac194cf852f4c0 # Tests require a working OpenCL platform make_check=no -do_configure() { +export CMAKE_ARGS=" + -DPYTHON_INCLUDE_DIR:PATH=${XBPS_CROSS_BASE}/${py3_inc} + -DNumPy_INCLUDE_DIR:PATH=${XBPS_CROSS_BASE}/${py3_sitelib}/numpy/core/include +" + +post_patch() { + # Manifest generates bad wheels (even on PyPI) + rm MANIFEST.in +} + +pre_configure() { ./configure.py --cl-inc-dir=${XBPS_CROSS_BASE}/usr/include \ --cl-lib-dir=${XBPS_CROSS_BASE}/usr/lib }