DedalusProject / dedalus

A flexible framework for solving PDEs with modern spectral methods.

Home Page:http://dedalus-project.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

v2 master doesn not compile with cython >=3.0

simonkneer opened this issue · comments

I needed to reinstall v2 today but ran into some issues.
Turns out that it doesn't compile with cython>= 3.0.
I suggest you edit pyproject.toml to:

[build-system] requires = ["cython >= 0.22", "cython < 3.0", "mpi4py >= 2.0.0", "numpy >= 1.20.0", "setuptools", "wheel"]

Don't know if this is the same issue, but I had to change the cython requirement to specifically be less than 3.0.4:

"cython >= 0.22,<3.0.4"

in order to avoid the following error when Cython compiling:

dedalus/core/transposes.pyx:300:26: Compiler crash in AnalyseExpressionsTransform:
.
.
.
File /Cython/Compiler/ExprNodes.py", line 4968, in analyse_types
  performance_hint(index.pos, "Index should be typed for more efficient access")
  TypeError: performance_hint() missing 1 required positional argument: 'env'

It looks like the 3.0.4 commit introduced the requirement to pass 'env' to performance_hint():

cython/cython@1b2b8a2

This should be fixed with newer releases of cython.