foolwood / foolwood/SiamMask

Cython.Compiler.Errors.CompileError: region.pyx

Open
#60 5 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
3.6k
Forks
804
PR merge metrics
No merged PRs in 30d

Description

when I run the bash make.sh, I will get this problem

python setup.py build_ext --inplace
Compiling region.pyx because it changed.
Cythonizing region.pyx

Error compiling Cython file:
------------------------------------------------------------
...
from libc.stdio cimport sprintf
from libc.string cimport strlen

cimport c_region

cpdef enum RegionType:
^
------------------------------------------------------------

region.pyx:10:6: C struct/union/enum cannot be declared cpdef

Error compiling Cython file:
------------------------------------------------------------
...
return overlaps

def vot_float2str(template, float value):
cdef bytes ptemplate = template.encode()
cdef const char* ctemplate = ptemplate
^
------------------------------------------------------------

region.pyx:233:19: Syntax error in C variable declaration
Traceback (most recent call last):
File "setup.py", line 14, in
ext_modules = cythonize([Extension("region", ["region.pyx"])])
File "python_package/lib/python2.7/site-packages/Cython/Build/Dependencies.py", line 667, in cythonize
cythonize_one(*args[1:])
File "python_package/lib/python2.7/site-packages/Cython/Build/Dependencies.py", line 731, in cythonize_one
raise CompileError(None, pyx_file)
Cython.Compiler.Errors.CompileError: region.pyx

How to solve it?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.