src/setup.py: Don't cythonize everything in src/
mkoeppe opened this issue · 12 comments
mkoeppe commented
In the version of setup.py used by the editable install:
extensions = cythonize(
["**/*.pyx"],
at least it should restrict itself to sage/**/*.pyx
so that it does not go cythonizing in random directories that the user may have in this directory... such as a venv...
Depends on #32673
CC: @tobiasdiez @kliem
Component: build
Author: Matthias Koeppe
Branch/Commit: ff2a352
Reviewer: Jonathan Kliem
Issue created by migration from https://trac.sagemath.org/ticket/32672
mkoeppe commented
mkoeppe commented
Author: Matthias Koeppe
sagetrac-git commented
sagetrac-git commented
mkoeppe commented
Description changed:
---
+++
@@ -1,3 +1,4 @@
+In the version of setup.py used by the editable install:
```
extensions = cythonize(kliem commented
Reviewer: Jonathan Kliem
kliem commented
comment:7
LGTM.
Btw, this is how I verified how it works. cythonize calls extended_iglob
sage: _ = !cd $SAGE_SRC
sage: from Cython.Build.Dependencies import extended_iglob
sage: a = list(extended_iglob("sage/**/*.pyx"))
sage: b = list(extended_iglob("**/*.pyx"))
sage: list(t for t in b if not t in a)
['foo.pyx']
sage: list(t for t in a if not t in b)
[]
In my case I placed foo.pyx in SAGE_SRC.
mkoeppe commented
comment:8
Thank you!
vbraun commented
Changed branch from u/mkoeppe/src_setup_py__don_t_cythonize_everything_in_src_ to ff2a352