Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python 3.7 / Cython 28.5 build fails #31

Open
tronje opened this issue Aug 13, 2018 · 2 comments
Open

Python 3.7 / Cython 28.5 build fails #31

tronje opened this issue Aug 13, 2018 · 2 comments

Comments

@tronje
Copy link

tronje commented Aug 13, 2018

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.
         """
@jdagdelen
Copy link

jdagdelen commented Aug 23, 2018

I think I'm having the same issues. Fix would be appreciated!

@ianozsvald
Copy link

I confirm that the above fix works with Python 3.7.3 and Cython 0.29.13.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants