-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Closed
Description
Describe the bug
With the Cython code and the setup.py below, C compilation fails with errors like
ct.c:1409:49: error: unknown type name '__pyx_t_double_complex'
static PyObject *__pyx_f_2ct_func(CYTHON_UNUSED __pyx_t_double_complex __pyx_v_arg) {
To Reproduce
Code to reproduce the behaviour:
cdef func(arg: complex):
pass
The setup.py:
from setuptools import Extension
from setuptools import setup
from Cython.Build import cythonize
setup(
name="ct",
ext_modules=cythonize(
Extension("ct", sources=["ct.pyx"]),
language_level=3,
),
)I searched through the issues and documentation, and haven't been able to find anything specific to this problem.
Expected behavior
Since complex is a built-in type, I'd expect that either the correct type name be generated, or if this is the correct type name, that it be properly defined before being referenced.
Environment (please complete the following information):
- OS: I've reproduced this on MacOS 10.15.7 and Linux 2.6.32
- Python versions 3.8 and 3.9
- Cython versions 0.29.21 and 3.0a6
Additional context
Add any other context about the problem here.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels