repo/proj/guru:dev commit in: dev-python/pygsl/, dev-python/pygsl/files/
"Gil Ferrand" <[email protected]>
| Newsgroups | gmane.linux.gentoo.cvs |
|---|---|
| Message-ID | <1786794487.b91923b65e8be723bad168f496c56ea90143fcb1.bakedsnake@gentoo> |
commit: b91923b65e8be723bad168f496c56ea90143fcb1 Author: bakedsnake <bakedsnake <AT> vagrantz <DOT> xyz> AuthorDate: Sat Aug 15 11:43:20 2026 +0000 Commit: Gil Ferrand <bakedsnake <AT> vagrantz <DOT> xyz> CommitDate: Sat Aug 15 11:48:07 2026 +0000 URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=b91923b6 dev-python/pygsl: add 2.6.5 Adds new version, taking into account some build changes. Signed-off-by: bakedsnake <bakedsnake <AT> vagrantz.xyz> dev-python/pygsl/Manifest | 1 + dev-python/pygsl/files/numpy-casts.patch | 24 +++++++++++++++ dev-python/pygsl/pygsl-2.6.5.ebuild | 52 ++++++++++++++++++++++++++++++++ 3 files changed, 77 insertions(+) diff --git a/dev-python/pygsl/Manifest b/dev-python/pygsl/Manifest index 22476ec8b5..79e6143054 100644 --- a/dev-python/pygsl/Manifest +++ b/dev-python/pygsl/Manifest @@ -1 +1,2 @@ DIST pygsl-2.3.4.gh.tar.gz 1100233 BLAKE2B 0d59062ae7a6193225ac731a9a12a7c32df9c309a90e358fd77f7c957f8d27269e97634022036aa7b1d99e2c3703a7c45387c97557c4e28762310009626cb465 SHA512 4b510426bafc06c79742f0ef0ad07e31a7aa74c14bab88bd2f0a2acb125569ecf38aeab0eaf01590bd052474a4aa7f8b39a66f853e4bc4a392e126dcf4bfb359 +DIST pygsl-2.6.5.gh.tar.gz 648089 BLAKE2B a442a9f88f9c96436efe9de43825cdcb6181716cc86d63eeb95d972590049f660b0174a1a5be6b136823d0c1b2b821003440abf917d75ec84470a66ca3315dfd SHA512 9dec2edf29ede798f04e760e6e71b0c334798d9e5d76044dedfbabcb02d71a63eb45f6adc1bc94f7723985a758ddf0bb3967e46fa846fd0449709edb4103ed0e diff --git a/dev-python/pygsl/files/numpy-casts.patch b/dev-python/pygsl/files/numpy-casts.patch new file mode 100644 index 0000000000..9bacca697f --- /dev/null +++ b/dev-python/pygsl/files/numpy-casts.patch @@ -0,0 +1,24 @@ +From 566d44d80f717f766c1df3b113c5b00027d72324 Mon Sep 17 00:00:00 2001 +From: bakedsnake <[email protected]> +Date: Sat, 15 Aug 2026 04:31:20 +0200 +Subject: [PATCH] Cast to object pointer to fix build error +# https://github.com/pygsl/pygsl/pull/102 + +--- a/src/transform/arraycopy.c ++++ b/src/transform/arraycopy.c +@@ -411,6 +411,6 @@ + } + +- m = master; ++ m = (PyArrayObject *) master; + assert(m); + assert( + PyArray_TYPE(m) == PyGSL_TRANSFORM_MODE_SWITCH(mode, NPY_CDOUBLE, NPY_CFLOAT) +@@ -432,6 +432,6 @@ + }else{ + FUNC_MESS("Copying input to output array"); + /* Check if it is an array of the approbriate size */ +- s = shadow; ++ s = (PyArrayObject *) shadow; + if((PyGSL_array_check((PyObject *) s)) && (PyArray_NDIM(s) == 1) + && (PyArray_TYPE(s) == PyArray_TYPE(m)) diff --git a/dev-python/pygsl/pygsl-2.6.5.ebuild b/dev-python/pygsl/pygsl-2.6.5.ebuild new file mode 100644 index 0000000000..841e23c641 --- /dev/null +++ b/dev-python/pygsl/pygsl-2.6.5.ebuild @@ -0,0 +1,52 @@ +# Copyright 1999-2026 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DISTUTILS_EXT=1 +DISTUTILS_USE_PEP517=meson-python +PYTHON_COMPAT=( python3_{12..14} ) + +inherit distutils-r1 + +DESCRIPTION="Python interface for the GNU scientific library (gsl)" +HOMEPAGE="https://github.com/pygsl/pygsl" +SRC_URI="https://github.com/pygsl/pygsl/archive/v${PV}/${PN}.tar.gz -> ${P}.gh.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" + +IUSE="examples" +# Tests are also failing upstream +# https://github.com/pygsl/pygsl/issues/15 +RESTRICT="test" + +BDEPEND=" + dev-python/cython[${PYTHON_USEDEP}] +" + +DEPEND=" + dev-python/numpy[${PYTHON_USEDEP}] + sci-libs/gsl + dev-lang/swig +" + +PATCHES=( "${FILESDIR}/numpy-casts.patch" ) + +EPYTEST_PLUGINS=( ) + +distutils_enable_sphinx doc dev-python/sphinx-rtd-theme +distutils_enable_tests pytest + +src_configure() { + # Relative paths don't work in this case, so we give it a full path + sed -i "s|'-I../typemaps'|'-I${S}/typemaps'|" meson.build \ + || die "Failed to patch typemaps" + distutils-r1_src_configure +} + +src_install() { + use examples && dodoc -r examples + distutils-r1_src_install +}