commit:     ec9ecde86fb335eda64659a813616d74af30c5ca
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Tue Feb 18 16:43:27 2025 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Feb 18 16:43:27 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ec9ecde8

dev-python/pythran: add := dep on numpy

A user upgrading an older system hit the following when building
dev-python/bottleneck:
```
[...]
  File "/usr/lib/python3.11/site-packages/pythran/analyses/aliases.py", line 6, 
in <module>
    from pythran.tables import functions, methods, MODULES
  File "/usr/lib/python3.11/site-packages/pythran/tables.py", line 4597, in 
<module>
    save_arguments((), MODULES)
  File "/usr/lib/python3.11/site-packages/pythran/tables.py", line 4560, in 
save_arguments
    save_arguments(module_name + (elem,), signature)
  File "/usr/lib/python3.11/site-packages/pythran/tables.py", line 4560, in 
save_arguments
    save_arguments(module_name + (elem,), signature)
  File "/usr/lib/python3.11/site-packages/pythran/tables.py", line 4564, in 
save_arguments
    themodule = import_module(".".join(module_name))
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/scipy/special/__init__.py", line 772, 
in <module>
    from . import _ufuncs
  File "scipy/special/_ufuncs.pyx", line 1, in init scipy.special._ufuncs
ValueError: numpy.dtype size changed, may indicate binary incompatibility. 
Expected 96 from C header, got 88 from PyObject
UPDATING 
/var/tmp/portage/dev-python/bottleneck-1.4.2/work/bottleneck-1.4.2-python3_11/build/lib.linux-x86_64-cpython-311/bottleneck/_version.py
set 
/var/tmp/portage/dev-python/bottleneck-1.4.2/work/bottleneck-1.4.2-python3_11/build/lib.linux-x86_64-cpython-311/bottleneck/_version.py
 to '1.4.2'
 * ERROR: dev-python/bottleneck-1.4.2::gentoo failed (compile phase):
 *   Wheel build failed
```

scipy has a := dep on numpy but pythran didn't.

Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../pythran/{pythran-0.16.1-r2.ebuild => pythran-0.16.1-r3.ebuild}    | 4 ++--
 .../pythran/{pythran-0.17.0.ebuild => pythran-0.17.0-r1.ebuild}       | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/dev-python/pythran/pythran-0.16.1-r2.ebuild 
b/dev-python/pythran/pythran-0.16.1-r3.ebuild
similarity index 97%
rename from dev-python/pythran/pythran-0.16.1-r2.ebuild
rename to dev-python/pythran/pythran-0.16.1-r3.ebuild
index 3fa68c4a517a..4e1d72e9f9a3 100644
--- a/dev-python/pythran/pythran-0.16.1-r2.ebuild
+++ b/dev-python/pythran/pythran-0.16.1-r3.ebuild
@@ -1,4 +1,4 @@
-# Copyright 2021-2024 Gentoo Authors
+# Copyright 2021-2025 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=8
@@ -29,7 +29,7 @@ RDEPEND="
        dev-cpp/xsimd
        =dev-python/beniget-0.4*[${PYTHON_USEDEP}]
        =dev-python/gast-0.5*[${PYTHON_USEDEP}]
-       dev-python/numpy[${PYTHON_USEDEP}]
+       dev-python/numpy:=[${PYTHON_USEDEP}]
        >=dev-python/ply-3.4[${PYTHON_USEDEP}]
        || (
                <dev-python/setuptools-73[${PYTHON_USEDEP}]

diff --git a/dev-python/pythran/pythran-0.17.0.ebuild 
b/dev-python/pythran/pythran-0.17.0-r1.ebuild
similarity index 97%
rename from dev-python/pythran/pythran-0.17.0.ebuild
rename to dev-python/pythran/pythran-0.17.0-r1.ebuild
index 4b14e228d55b..e55565ad791b 100644
--- a/dev-python/pythran/pythran-0.17.0.ebuild
+++ b/dev-python/pythran/pythran-0.17.0-r1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 2021-2024 Gentoo Authors
+# Copyright 2021-2025 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=8
@@ -29,7 +29,7 @@ RDEPEND="
        dev-cpp/xsimd
        =dev-python/beniget-0.4*[${PYTHON_USEDEP}]
        =dev-python/gast-0.6*[${PYTHON_USEDEP}]
-       dev-python/numpy[${PYTHON_USEDEP}]
+       dev-python/numpy:=[${PYTHON_USEDEP}]
        >=dev-python/ply-3.4[${PYTHON_USEDEP}]
        >=dev-python/setuptools-73.0.1[${PYTHON_USEDEP}]
 "

Reply via email to