diff options
| author | root <root@alpha.trunkmasters.com> | 2026-06-12 19:09:37 -0500 |
|---|---|---|
| committer | root <root@alpha.trunkmasters.com> | 2026-06-12 19:09:37 -0500 |
| commit | b590c8d7572b727d565cc0b8ff660d43569845de (patch) | |
| tree | 06f7a4102ea4e845df8b66660f252920d52952f9 /dev-python/pythran | |
| parent | 24f9cbfc4c34fdb6a6e03311674414e881ceab47 (diff) | |
| download | baldeagleos-repo-b590c8d7572b727d565cc0b8ff660d43569845de.tar.gz baldeagleos-repo-b590c8d7572b727d565cc0b8ff660d43569845de.tar.xz baldeagleos-repo-b590c8d7572b727d565cc0b8ff660d43569845de.zip | |
Adding metadata
Diffstat (limited to 'dev-python/pythran')
| -rw-r--r-- | dev-python/pythran/Manifest | 1 | ||||
| -rw-r--r-- | dev-python/pythran/files/pythran-0.18.1-numpy-float128-tests.patch | 67 | ||||
| -rw-r--r-- | dev-python/pythran/metadata.xml | 8 | ||||
| -rw-r--r-- | dev-python/pythran/pythran-0.18.1.ebuild | 104 |
4 files changed, 180 insertions, 0 deletions
diff --git a/dev-python/pythran/Manifest b/dev-python/pythran/Manifest new file mode 100644 index 000000000000..5bb61d50f89a --- /dev/null +++ b/dev-python/pythran/Manifest @@ -0,0 +1 @@ +DIST pythran-0.18.1.gh.tar.gz 3714257 BLAKE2B 711f271297a6012a88a696df749efda8ca4c53e236a646bf2285ba80d0151b1117492c024eb8ab2e5f7337b1f9838332dba480a00a9c2a9216cbbeda78f971a8 SHA512 15650627b9396b49401067c3a7c161d1569f89f29a08243aa85659023e42ce028633915c51c8c5188a5599c201eb30aa2721d64ba766b2a252203469bc6e2ab1 diff --git a/dev-python/pythran/files/pythran-0.18.1-numpy-float128-tests.patch b/dev-python/pythran/files/pythran-0.18.1-numpy-float128-tests.patch new file mode 100644 index 000000000000..fc68385d448c --- /dev/null +++ b/dev-python/pythran/files/pythran-0.18.1-numpy-float128-tests.patch @@ -0,0 +1,67 @@ +From 8f97a5c0324dad2da7752b8676f931ff9b582435 Mon Sep 17 00:00:00 2001 +From: serge-sans-paille <serge.guelton@telecom-bretagne.eu> +Date: Wed, 19 Nov 2025 10:18:09 +0100 +Subject: [PATCH] Don't test float128 when it does not exist in numpy + +--- + pythran/tests/test_conversion.py | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +diff --git a/pythran/tests/test_conversion.py b/pythran/tests/test_conversion.py +index 6aa0a829b76da0f2b36ffd66efd9f8389e666444..76dae7c4ec7693459e4679db35b7cb26575c2cf3 100644 +--- a/pythran/tests/test_conversion.py ++++ b/pythran/tests/test_conversion.py +@@ -257,12 +257,14 @@ def test_builtin_type9(self): + + def test_simple_meta_types(self): + types = (complex, float, int, bool, str, +- np.float128, np.float64, np.float32, +- np.complex256, np.complex128, np.complex64, ++ np.float64, np.float32, ++ np.complex128, np.complex64, + np.uint64, np.uint32, np.uint16, np.uint8, + np.int64, np.int32, np.int16, np.int8, + np.int64, np.int32, np.int16, np.int8, + ) ++ if has_float128: ++ types += np.float128, np.complex256 + for i, ty in enumerate(types): + kwargs= {f"simple_meta_types_{i}": [Type[ty]]} + self.run_test(f"def simple_meta_types_{i}(obj): return obj()", + +From 6fb0815667cacb13c146f856666757d53f55fb14 Mon Sep 17 00:00:00 2001 +From: Eli Schwartz <eschwartz@gentoo.org> +Date: Sun, 18 Jan 2026 20:07:00 -0500 +Subject: [PATCH] mark numpy float128 tests as skippable when numpy lacks + float128 support + +Signed-off-by: Eli Schwartz <eschwartz@gentoo.org> +--- + pythran/tests/test_numpy_func2.py | 7 +++++++ + 1 file changed, 7 insertions(+) + +diff --git a/pythran/tests/test_numpy_func2.py b/pythran/tests/test_numpy_func2.py +index 2b1f31bef..ce29bb92d 100644 +--- a/pythran/tests/test_numpy_func2.py ++++ b/pythran/tests/test_numpy_func2.py +@@ -5,6 +5,12 @@ + + from pythran.typing import NDArray, List, Tuple + ++try: ++ numpy.float128 ++ has_float128 = True ++except AttributeError: ++ has_float128 = False ++ + + np_version = version.parse(numpy.version.version) + +@@ -206,6 +212,7 @@ def test_convolve_2(self): + numpy.arange(10,dtype=float), + np_convolve_2=[NDArray[float,:],NDArray[float,:]]) + ++ @unittest.skipIf(not has_float128, 'not float128') + def test_convolve_2b(self): + self.run_test("def np_convolve_2b(a,b):\n from numpy import convolve\n return convolve(a,b)", + numpy.arange(12,dtype=numpy.float128), diff --git a/dev-python/pythran/metadata.xml b/dev-python/pythran/metadata.xml new file mode 100644 index 000000000000..988ae9a6a6fe --- /dev/null +++ b/dev-python/pythran/metadata.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://docs.baldeagleos.com/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>python@gentoo.org</email> + </maintainer> + <origin>baldeagleos-repo</origin> +</pkgmetadata> diff --git a/dev-python/pythran/pythran-0.18.1.ebuild b/dev-python/pythran/pythran-0.18.1.ebuild new file mode 100644 index 000000000000..20dac02c07f6 --- /dev/null +++ b/dev-python/pythran/pythran-0.18.1.ebuild @@ -0,0 +1,104 @@ +# Copyright 2021-2026 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DISTUTILS_USE_PEP517=setuptools +PYTHON_COMPAT=( python3_{13..14} ) + +inherit distutils-r1 + +MY_P=${P/_p/.post} +DESCRIPTION="Ahead of Time compiler for numeric kernels" +HOMEPAGE=" + https://pypi.org/project/pythran/ + https://github.com/serge-sans-paille/pythran/ +" +SRC_URI=" + https://github.com/serge-sans-paille/pythran/archive/${PV/_p/.post}.tar.gz + -> ${MY_P}.gh.tar.gz +" +S=${WORKDIR}/${MY_P} + +LICENSE="BSD" +SLOT="0" +KEYWORDS="amd64 arm arm64 ~loong ppc64 ~riscv ~s390 ~sparc x86" + +RDEPEND=" + dev-libs/boost + dev-cpp/xsimd + =dev-python/beniget-0.4*[${PYTHON_USEDEP}] + =dev-python/gast-0.6*[${PYTHON_USEDEP}] + dev-python/numpy:=[${PYTHON_USEDEP}] + >=dev-python/ply-3.4[${PYTHON_USEDEP}] + >=dev-python/setuptools-73.0.1[${PYTHON_USEDEP}] +" +DEPEND=" + test? ( + dev-libs/boost + dev-cpp/xsimd + ) +" +BDEPEND=" + test? ( + dev-python/pip[${PYTHON_USEDEP}] + dev-python/packaging[${PYTHON_USEDEP}] + dev-python/scipy[${PYTHON_USEDEP}] + dev-python/wheel[${PYTHON_USEDEP}] + virtual/cblas + !!dev-python/setuptools-declarative-requirements + ) +" + +EPYTEST_PLUGINS=() +EPYTEST_XDIST=1 +distutils_enable_tests pytest + +PATCHES=( + "${FILESDIR}"/${P}-numpy-float128-tests.patch +) + +src_configure() { + # vendored C++ headers -- use system copies + rm -r pythran/{boost,xsimd} || die + + # https://bugs.gentoo.org/916461 + sed -i \ + -e 's|blas=blas|blas=cblas|' \ + -e 's|libs=|libs=cblas|' \ + pythran/pythran-*.cfg || die +} + +python_test() { + local EPYTEST_DESELECT=( + # multiple extra deps (meson, openblas) + # also broken on pypy3* + pythran/tests/test_distutils.py::TestMeson::test_meson_build + # numpy.distutils is dead and broken + pythran/tests/test_distutils.py::TestDistutils + ) + local EPYTEST_IGNORE=( + pythran/benchmarks + ) + + if ! has_version "dev-python/ipython[${PYTHON_USEDEP}]"; then + EPYTEST_IGNORE+=( + pythran/tests/test_ipython.py + ) + fi + + case ${ARCH} in + arm) + EPYTEST_DESELECT+=( + # TODO + pythran/tests/test_numpy_fft.py::TestNumpyFFT::test_fft_3d_axis + pythran/tests/test_numpy_fft.py::TestNumpyFFTN + ) + ;; + esac + + # can easily fill up ccache with no real benefit + local -x CCACHE_DISABLE=1 + local -x COLUMNS=80 + epytest +} |
