ingo-m / pyprf

A free & open python tool for population receptive field analysis.
GNU General Public License v3.0
15 stars 3 forks source link

Cython 0.28 #25

Open ingo-m opened 6 years ago

ingo-m commented 6 years ago

Cython 0.28 broke backwards compatibility.

When trying to compile with cython 0.28, the following problem occurs:

# *****************************************************************************
# *** Function for fast calculation of residuals

cdef (float[:], float[:]) funcCyRes(float[:] vecPrfTc_view,
    ^
------------------------------------------------------------

pyprf/analysis/cython_leastsquares.pyx:120:5: C struct/union member cannot be a memory view
Traceback (most recent call last):
  File "cython_leastsquares_setup.py", line 32, in <module>
    setup(ext_modules=cythonize('pyprf/analysis/cython_leastsquares.pyx'),
  File "/Users/john/miniconda2/envs/py_main/lib/python3.6/site-packages/Cython/Build/Dependencies.py", line 1026, in cythonize
    cythonize_one(*args)
  File "/Users/john/miniconda2/envs/py_main/lib/python3.6/site-packages/Cython/Build/Dependencies.py", line 1146, in cythonize_one
    raise CompileError(None, pyx_file)
Cython.Compiler.Errors.CompileError: pyprf/analysis/cython_leastsquares.pyx

For now, the solution is to pin the cython dependency to cython==0.27.1.

See:

https://github.com/mcedit/mcedit2/pull/399#issue-178362576

https://github.com/cython/cython/commit/0961b9a758592b667495e9155267c6b337b8b214