libstempo
libstempo copied to clipboard
Cython errors when installing
Cloning the git repository and installing libstempo with pip install .
is giving me a bunch of Cython errors like
Error compiling Cython file:
------------------------------------------------------------
...
cdef class tempopulsar:
"""tempopulsar(parfile, timfile=None, warnings=False, fixprefiterrors=True,
dofit=False, maxobs=None, units=False, ephem=None, t2cmethod=None,
toas=None, toaerrs=None, observatory=None, obsfreq=1400)"""
cpdef public object parfile
^
------------------------------------------------------------
libstempo/libstempo.pyx:627:10: Variables cannot be declared with 'cpdef'. Use 'cdef' instead.
This appears to be due to a change in Cython 3.0, released today(!). See here.
For now, changing "Cython>=0.22"
to "Cython>=0.22,<3.0"
in pyproject.toml
seems to work. But a better long-term solution might be to change some cpdef
statements to cdef
.
@rossjjennings I guess thus can be closed now that #54 has been merged.
@mattpitkin Sounds good to me.