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

[BUG] Temporarily file not properly cleaned on compilation flag change #6565

Open
user202729 opened this issue Dec 16, 2024 · 0 comments
Open

Comments

@user202729
Copy link

user202729 commented Dec 16, 2024

Describe the bug

As in the title.

Code to reproduce the behaviour:

python -m venv test
cd test
. bin/activate

pip install --verbose git+https://github.com/cython/cython
pip install cysignals
pip install setuptools # https://github.com/cython/cython/issues/5976

cat << 'EOF' > a.pyx
# cython: preliminary_late_includes_cy28=True
from cysignals.signals cimport sig_check
EOF

cythonize -X preliminary_late_includes_cy28=True -i a.pyx  # successful

rm -r a.c build/ a.cpython-311-x86_64-linux-gnu.so a.c.dep

cythonize -i a.pyx  # error

cythonize -X preliminary_late_includes_cy28=True -i a.pyx  # now error, need to clean temporary files (see below)

rm -r a.c build/ a.cpython-311-x86_64-linux-gnu.so a.c.dep

cythonize -X preliminary_late_includes_cy28=True -i a.pyx  # successful again

Expected behaviour

The cleaning of temporary file is not necessary, Cython does that automatically.

OS

Linux

Python version

3.12

Cython version

latest master

Additional context

Though the other bug is why setting the compiler directive from the file header doesn't work.

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