[Debian-astro-maintainers] Bug#1056043: yt ftbfs with Python 3.12 (and cython 3.0.5)

Matthias Klose doko at debian.org
Thu Nov 16 09:00:11 GMT 2023


Package: src:yt
Version: 4.2.2-1
Severity: important
Tags: sid trixie
User: debian-python at lists.debian.org
Usertags: python3.12

yt ftbfs with Python 3.12 (and cython 3.0.5):

[...]
Error compiling Cython file:
------------------------------------------------------------
...
     # Compute number of fields to skip. This should be 31 in 3 dimensions
     skip_len = (1          # father index
                 + 2*ndim   # neighbor index
                 + 2**ndim  # son index
                 + 2**ndim  # cpu map
                 + 2**ndim  # refinement map
                 ^
------------------------------------------------------------

yt/frontends/ramses/io_utils.pyx:48:16: Cannot assign type 'double' to 
'INT64_t'

Error compiling Cython file:
------------------------------------------------------------
...
     nlevelmax = headers['nlevelmax']
     n_levels = nlevelmax - min_level
     ncpu = headers['ncpu']

     ncpu_and_bound = nboundary + ncpu
     twotondim = 2**ndim
                  ^
------------------------------------------------------------

yt/frontends/ramses/io_utils.pyx:103:17: Cannot assign type 'double' to 
'INT64_t'

Error compiling Cython file:
------------------------------------------------------------
...
     cdef str field
     cdef INT64_t twotondim
     cdef int ilevel, icpu, ifield, nfields, nlevels, nc, ncpu_selected
     cdef np.ndarray[np.uint8_t, ndim=1] mask

     twotondim = 2**ndim
                  ^
------------------------------------------------------------

yt/frontends/ramses/io_utils.pyx:157:17: Cannot assign type 'double' to 
'INT64_t'
Traceback (most recent call last):
   File "/usr/lib/python3/dist-packages/Cython/Build/Dependencies.py", 
line 1345, in cythonize_one_helper
     return cythonize_one(*m)
            ^^^^^^^^^^^^^^^^^
   File "/usr/lib/python3/dist-packages/Cython/Build/Dependencies.py", 
line 1321, in cythonize_one
     raise CompileError(None, pyx_file)
Cython.Compiler.Errors.CompileError: yt/frontends/ramses/io_utils.pyx

Error compiling Cython file:
------------------------------------------------------------
...
@cython.cdivision(True)
@cython.boundscheck(False)
@cython.wraparound(False)
cdef np.int64_t bitrange(np.int64_t x, np.int64_t width,
                          np.int64_t start, np.int64_t end):
     return x >> (width-end) & ((2**(end-start))-1)
                             ^
------------------------------------------------------------

yt/utilities/lib/geometry_utils.pyx:92:28: Invalid operand types for '&' 
(int64_t; double)

Error compiling Cython file:
------------------------------------------------------------
...
@cython.boundscheck(False)
@cython.wraparound(False)
cdef np.int64_t rrot(np.int64_t x, np.int64_t i, np.int64_t width):
     i = i%width
     x = (x>>i) | (x<<width-i)
     return x&(2**width-1)
             ^
------------------------------------------------------------

yt/utilities/lib/geometry_utils.pyx:100:12: Invalid operand types for 
'&' (int64_t; double)

Error compiling Cython file:
------------------------------------------------------------
...
@cython.boundscheck(False)
@cython.wraparound(False)
cdef np.int64_t lrot(np.int64_t x, np.int64_t i, np.int64_t width):
     i = i%width
     x = (x<<i) | (x>>width-i)
     return x&(2**width-1)
             ^
------------------------------------------------------------

yt/utilities/lib/geometry_utils.pyx:108:12: Invalid operand types for 
'&' (int64_t; double)

Error compiling Cython file:
------------------------------------------------------------
...
@cython.cdivision(True)
@cython.boundscheck(False)
@cython.wraparound(False)
cdef np.int64_t setbit(np.int64_t x, np.int64_t w, np.int64_t i, 
np.int64_t b):
     if b == 1:
         return x | 2**(w-i-1)
                  ^
------------------------------------------------------------

yt/utilities/lib/geometry_utils.pyx:129:17: Invalid operand types for 
'|' (int64_t; double)

Error compiling Cython file:
------------------------------------------------------------
...
@cython.wraparound(False)
cdef np.int64_t setbit(np.int64_t x, np.int64_t w, np.int64_t i, 
np.int64_t b):
     if b == 1:
         return x | 2**(w-i-1)
     elif b == 0:
         return x & ~2**(w-i-1)
                    ^
------------------------------------------------------------

yt/utilities/lib/geometry_utils.pyx:131:19: Invalid operand type for '~' 
(double)
Traceback (most recent call last):
   File "/usr/lib/python3/dist-packages/Cython/Build/Dependencies.py", 
line 1345, in cythonize_one_helper
     return cythonize_one(*m)
            ^^^^^^^^^^^^^^^^^
   File "/usr/lib/python3/dist-packages/Cython/Build/Dependencies.py", 
line 1321, in cythonize_one
     raise CompileError(None, pyx_file)
Cython.Compiler.Errors.CompileError: yt/utilities/lib/geometry_utils.pyx
multiprocessing.pool.RemoteTraceback:
"""
Traceback (most recent call last):
   File "/usr/lib/python3.11/multiprocessing/pool.py", line 125, in worker
     result = (True, func(*args, **kwds))
                     ^^^^^^^^^^^^^^^^^^^
   File "/usr/lib/python3.11/multiprocessing/pool.py", line 48, in mapstar
     return list(map(*args))
            ^^^^^^^^^^^^^^^^
   File "/usr/lib/python3/dist-packages/Cython/Build/Dependencies.py", 
line 1345, in cythonize_one_helper
     return cythonize_one(*m)
            ^^^^^^^^^^^^^^^^^
   File "/usr/lib/python3/dist-packages/Cython/Build/Dependencies.py", 
line 1321, in cythonize_one
     raise CompileError(None, pyx_file)
Cython.Compiler.Errors.CompileError: yt/frontends/ramses/io_utils.pyx
"""

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
   File "/<<PKGBUILDDIR>>/setup.py", line 90, in <module>
     setup(
   File "/usr/lib/python3/dist-packages/setuptools/__init__.py", line 
107, in setup
     return distutils.core.setup(**attrs)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   File "/usr/lib/python3/dist-packages/setuptools/_distutils/core.py", 
line 185, in setup
     return run_commands(dist)
            ^^^^^^^^^^^^^^^^^^
   File "/usr/lib/python3/dist-packages/setuptools/_distutils/core.py", 
line 201, in run_commands
     dist.run_commands()
   File "/usr/lib/python3/dist-packages/setuptools/_distutils/dist.py", 
line 969, in run_commands
     self.run_command(cmd)
   File "/usr/lib/python3/dist-packages/setuptools/dist.py", line 1233, 
in run_command
     super().run_command(command)
   File "/usr/lib/python3/dist-packages/setuptools/_distutils/dist.py", 
line 988, in run_command
     cmd_obj.run()
   File 
"/usr/lib/python3/dist-packages/setuptools/_distutils/command/build.py", 
line 131, in run
     self.run_command(cmd_name)
   File "/usr/lib/python3/dist-packages/setuptools/_distutils/cmd.py", 
line 318, in run_command
[1/2] Cythonizing yt/frontends/ramses/io_utils.pyx
     self.distribution.run_command(command)
   File "/usr/lib/python3/dist-packages/setuptools/dist.py", line 1233, 
in run_command
     super().run_command(command)
   File "/usr/lib/python3/dist-packages/setuptools/_distutils/dist.py", 
line 988, in run_command
     cmd_obj.run()
   File "/usr/lib/python3/dist-packages/setuptools/command/build_py.py", 
line 65, in run
     self.build_package_data()
   File "/usr/lib/python3/dist-packages/setuptools/command/build_py.py", 
line 161, in build_package_data
     for target, srcfile in self._get_package_data_output_mapping():
   File "/usr/lib/python3/dist-packages/setuptools/command/build_py.py", 
line 153, in _get_package_data_output_mapping
     for package, src_dir, build_dir, filenames in self.data_files:
                                                   ^^^^^^^^^^^^^^^
   File "/usr/lib/python3/dist-packages/setuptools/command/build_py.py", 
line 74, in __getattr__
     self.data_files = self._get_data_files()
                       ^^^^^^^^^^^^^^^^^^^^^^
   File "/usr/lib/python3/dist-packages/setuptools/command/build_py.py", 
line 86, in _get_data_files
     self.analyze_manifest()
   File "/usr/lib/python3/dist-packages/setuptools/command/build_py.py", 
line 183, in analyze_manifest
     self.run_command('egg_info')
   File "/usr/lib/python3/dist-packages/setuptools/_distutils/cmd.py", 
line 318, in run_command
     self.distribution.run_command(command)
   File "/usr/lib/python3/dist-packages/setuptools/dist.py", line 1233, 
in run_command
     super().run_command(command)
   File "/usr/lib/python3/dist-packages/setuptools/_distutils/dist.py", 
line 988, in run_command
     cmd_obj.run()
   File "/usr/lib/python3/dist-packages/setuptools/command/egg_info.py", 
line 319, in run
     self.find_sources()
   File "/usr/lib/python3/dist-packages/setuptools/command/egg_info.py", 
line 327, in find_sources
     mm.run()
   File "/usr/lib/python3/dist-packages/setuptools/command/egg_info.py", 
line 549, in run
     self.add_defaults()
   File "/usr/lib/python3/dist-packages/setuptools/command/egg_info.py", 
line 587, in add_defaults
     sdist.add_defaults(self)
   File "/usr/lib/python3/dist-packages/setuptools/command/sdist.py", 
line 113, in add_defaults
     super().add_defaults()
   File 
"/usr/lib/python3/dist-packages/setuptools/_distutils/command/sdist.py", 
line 251, in add_defaults
     self._add_defaults_ext()
   File 
"/usr/lib/python3/dist-packages/setuptools/_distutils/command/sdist.py", 
line 335, in _add_defaults_ext
     build_ext = self.get_finalized_command('build_ext')
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   File "/usr/lib/python3/dist-packages/setuptools/_distutils/cmd.py", 
line 305, in get_finalized_command
     cmd_obj.ensure_finalized()
[2/2] Cythonizing yt/utilities/lib/geometry_utils.pyx
   File "/usr/lib/python3/dist-packages/setuptools/_distutils/cmd.py", 
line 111, in ensure_finalized
     self.finalize_options()
   File "/<<PKGBUILDDIR>>/setupext.py", line 392, in finalize_options
     self.distribution.ext_modules[:] = cythonize(
                                        ^^^^^^^^^^
   File "/usr/lib/python3/dist-packages/Cython/Build/Dependencies.py", 
line 1145, in cythonize
     result.get(99999)  # seconds
     ^^^^^^^^^^^^^^^^^
   File "/usr/lib/python3.11/multiprocessing/pool.py", line 774, in get
     raise self._value
Cython.Compiler.Errors.CompileError: yt/frontends/ramses/io_utils.pyx
E: pybuild pybuild:395: build: plugin distutils failed with: exit 
code=1: /usr/bin/python3 setup.py build


complete build log at
https://launchpadlibrarian.net/697893855/buildlog_ubuntu-noble-amd64.yt_4.2.2-1build1_BUILDING.txt.gz



More information about the Debian-astro-maintainers mailing list