Skip to content

Build fails with NumPy 2.x #586

@penguinpee

Description

@penguinpee

With NumPy 2.2.0 the following error occurs. Fedora intents to ship NumPy 2.x with the next release (Fedora 42) and would like to drop NumPy 1.x from that release.

[9/63] Generating 'nipy/algorithms/graph/_graph.cpython-313-x86_64-linux-gnu.so.p/_graph.c'
FAILED: nipy/algorithms/graph/_graph.cpython-313-x86_64-linux-gnu.so.p/_graph.c
/builddir/build/BUILD/python-nipy-0.6.1-build/nipy-0.6.0/nipy/_build_utils/cythoner.py ../nipy/algorithms/graph/_graph.pyx nipy/algorithms/graph/_graph.cpython-313-x86_64-linux-gnu.so.p/_graph.c
Error compiling Cython file:
------------------------------------------------------------
...
import numpy as np
cimport numpy as np
cimport cython
ctypedef np.float64_t DOUBLE
ctypedef np.int_t INT
         ^
------------------------------------------------------------
/builddir/build/BUILD/python-nipy-0.6.1-build/nipy-0.6.0/nipy/algorithms/graph/_graph.pyx:5:9: 'int_t' is not a type identifier
Traceback (most recent call last):
  File "/builddir/build/BUILD/python-nipy-0.6.1-build/nipy-0.6.0/nipy/_build_utils/cythoner.py", line 37, in <module>
    main()
    ~~~~^^
  File "/builddir/build/BUILD/python-nipy-0.6.1-build/nipy-0.6.0/nipy/_build_utils/cythoner.py", line 20, in main
    sbp.run(
    ~~~~~~~^
        [
        ^
    ...<10 lines>...
        check=True,
        ^^^^^^^^^^^
    )
    ^
  File "/usr/lib64/python3.13/subprocess.py", line 577, in run
    raise CalledProcessError(retcode, process.args,
                             output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['cython', '-3', '--fast-fail', '--output-file', '/builddir/build/BUILD/python-nipy-0.6.1-build/nipy-0.6.0/.mesonpy-11n2xx_m/nipy/algorithms/graph/_graph.cpython-313-x86_64-linux-gnu.so.p/_graph.c', '--include-dir', '/builddir/build/BUILD/python-nipy-0.6.1-build/nipy-0.6.0/.mesonpy-11n2xx_m', '/builddir/build/BUILD/python-nipy-0.6.1-build/nipy-0.6.0/nipy/algorithms/graph/_graph.pyx']' returned non-zero exit status 1.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions