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

Cannot build py4s on Ubuntu Lucid #3

Open
stawo opened this issue Oct 7, 2010 · 1 comment
Open

Cannot build py4s on Ubuntu Lucid #3

stawo opened this issue Oct 7, 2010 · 1 comment

Comments

@stawo
Copy link

stawo commented Oct 7, 2010

Hi, I have some problems in building py4s on Ubuntu Lucid Lynx LTS.
This is what I've done:

  1. installed Cython with the command >>>sudo easy_install cython
  2. copied the source code of 4store in the same folder where the folder py4s is
  3. build py4s with the command >>>python install.py build

The building process fails and return this error:

cythoning _py4s.pyx to _py4s.c

Error converting Pyrex file to C:
------------------------------------------------------------
...
cdef class _Cursor:
    cdef py4s.fsp_link *_link
    cdef py4s.fs_query_state *_qs
    cdef py4s.fs_query *_qr
    cdef char *_query
    cdef bool _transaction
        ^
------------------------------------------------------------

'bool' is not a type identifier

Could you help me out?

@stawo
Copy link
Author

stawo commented Oct 8, 2010

Ok, it seems I found the problem.
The latest version of Cython is Cython 0.13 and straight from the release notes comes this:
"bool is no longer a valid type name by default. The problem is that it's not clear whether bool should refer to the Python type or the C++ type, and expecting one and finding the other has already led to several hard-to-find bugs. Both types are available for importing: you can use from cpython cimport bool for the Python bool type, and from libcpp cimport bool for the C++ type. bool is still a valid object by default, so one can still write bool(x)." (http://wiki.cython.org/ReleaseNotes-0.13)

So all I had to do was to add

from cpython cimport bool

to _py4s.pyx and Bob's your uncle! :)

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

1 participant