Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build fails with Cython 3.0.0b1 #8

Open
mgorny opened this issue Mar 3, 2023 · 0 comments
Open

Build fails with Cython 3.0.0b1 #8

mgorny opened this issue Mar 3, 2023 · 0 comments

Comments

@mgorny
Copy link

mgorny commented Mar 3, 2023

After installing Cython==3.0.0b1, I get the following build error:

$ python setup.py build
Please make sure to:
- Have libglyr >= 1.0.0 and all developement deps installed.
- Have a working compiler.

Cython will be installed automatically.

Compiling src/glyr.pyx because it changed.
[1/1] Cythonizing src/glyr.pyx
/tmp/python-glyr/.venv/lib/python3.11/site-packages/Cython/Compiler/Main.py:370: FutureWarning: Cython directive 'language_level' not set, using '3str' for now (Py3). This has changed from earlier releases! File: /tmp/python-glyr/src/glyr.pyx
  tree = Parsing.p_module(s, pxd, full_module_name)

Error compiling Cython file:
------------------------------------------------------------
...

# Initialize Library
glyr_init()

# Register destroyage using the C-level atexit
atexit(<void (*)() nogil>glyr_cleanup)
       ^
------------------------------------------------------------

src/glyr.pyx:28:7: Cannot assign type 'void (*)(void) except * nogil' to 'void (*)(void) noexcept nogil'

Error compiling Cython file:
------------------------------------------------------------
...
        :py_func: A callable object, like a function.
        """
        self_ptr = self._ptr()

        with nogil:
            C.glyr_db_foreach(self_ptr, _db_proxy_callback, <void*>py_func)
                                        ^
------------------------------------------------------------

src/database.pyx:144:40: Cannot assign type 'int (GlyrQuery *, GlyrMemCache *, void *) except? -1 nogil' to 'glyr_foreach_callback'
Traceback (most recent call last):
  File "/tmp/python-glyr/setup.py", line 15, in <module>
    setup(
  File "/tmp/python-glyr/.venv/lib/python3.11/site-packages/setuptools/_distutils/core.py", line 185, in setup
    return run_commands(dist)
           ^^^^^^^^^^^^^^^^^^
  File "/tmp/python-glyr/.venv/lib/python3.11/site-packages/setuptools/_distutils/core.py", line 201, in run_commands
    dist.run_commands()
  File "/tmp/python-glyr/.venv/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 969, in run_commands
    self.run_command(cmd)
  File "/tmp/python-glyr/.venv/lib/python3.11/site-packages/setuptools/dist.py", line 1221, in run_command
    super().run_command(command)
  File "/tmp/python-glyr/.venv/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
    cmd_obj.run()
  File "/tmp/python-glyr/.venv/lib/python3.11/site-packages/setuptools/_distutils/command/build.py", line 131, in run
    self.run_command(cmd_name)
  File "/tmp/python-glyr/.venv/lib/python3.11/site-packages/setuptools/_distutils/cmd.py", line 318, in run_command
    self.distribution.run_command(command)
  File "/tmp/python-glyr/.venv/lib/python3.11/site-packages/setuptools/dist.py", line 1221, in run_command
    super().run_command(command)
  File "/tmp/python-glyr/.venv/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
    cmd_obj.run()
  File "/tmp/python-glyr/.venv/lib/python3.11/site-packages/setuptools/_distutils/command/build_ext.py", line 345, in run
    self.build_extensions()
  File "/tmp/python-glyr/.venv/lib/python3.11/site-packages/setuptools/_distutils/command/build_ext.py", line 467, in build_extensions
    self._build_extensions_serial()
  File "/tmp/python-glyr/.venv/lib/python3.11/site-packages/setuptools/_distutils/command/build_ext.py", line 493, in _build_extensions_serial
    self.build_extension(ext)
  File "/tmp/python-glyr/.venv/lib/python3.11/site-packages/Cython/Distutils/build_ext.py", line 122, in build_extension
    new_ext = cythonize(
              ^^^^^^^^^^
  File "/tmp/python-glyr/.venv/lib/python3.11/site-packages/Cython/Build/Dependencies.py", line 1134, in cythonize
    cythonize_one(*args)
  File "/tmp/python-glyr/.venv/lib/python3.11/site-packages/Cython/Build/Dependencies.py", line 1301, in cythonize_one
    raise CompileError(None, pyx_file)
Cython.Compiler.Errors.CompileError: src/glyr.pyx
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant