DAWG
DAWG copied to clipboard
Python 3.7 / Cython 28.5 build fails
I'm trying to build this with Python 3.7 and Cython 28.5.
python setup.py install
gives several compilation errors related to the new Python 3.7 C-API.
I understand that I seem to need to run the update_cpp.sh
script. This gives me a Cython compilation error, which is fixed by the below patch. Re-generating the C++ files then works, and so does installing the package. I'm hesitant to open a pull request because a) there are enormous changes to the checked-in C++ files, and b) I'm not sure if my change is a very good idea. I'm not too familiar with Cython, unfortunately. Maybe someone can help me out.
The aforementioned patch:
diff --git a/src/dawg.pyx b/src/dawg.pyx
index 133c7fc..2e05087 100644
--- a/src/dawg.pyx
+++ b/src/dawg.pyx
@@ -346,7 +346,7 @@ cdef class CompletionDAWG(DAWG):
return completer.Next()
- cpdef bytes tobytes(self) except +:
+ cpdef bytes tobytes(self):
"""
Return raw DAWG content as bytes.
"""
I think I'm having the same issues. Fix would be appreciated!
I confirm that the above fix works with Python 3.7.3 and Cython 0.29.13.