libimobiledevice / libplist

A library to handle Apple Property List format in binary or XML
https://libimobiledevice.org
GNU Lesser General Public License v2.1
535 stars 304 forks source link

master version make cython fail on MacOS13 #141

Closed AKing23T closed 4 years ago

AKing23T commented 5 years ago

env:macos13,xcode10.1,python3,cython0.29.6. I git clone https://github.com/libimobiledevice/libplist.git in 20190723, run env PYTHON=/usr/local/bin/python3 PYTHON_VERSION=3.7 ./autogen.sh,---->ok run make ,--->fail,like

Error compiling Cython file:
------------------------------------------------------------
...

    if not fmt:
        if is_binary:
            if 'b' not in fp.mode:
                raise IOError('File handle must be opened in binary (b) mode to read binary property lists')
            cb = from_bin
                ^
------------------------------------------------------------

plist.pyx:870:17: Cannot assign type 'object (bytes, int __pyx_skip_dispatch)' to 'void *'

Error compiling Cython file:
------------------------------------------------------------
...
        if is_binary:
            if 'b' not in fp.mode:
                raise IOError('File handle must be opened in binary (b) mode to read binary property lists')
            cb = from_bin
        else:
            cb = from_xml
                ^
------------------------------------------------------------

plist.pyx:872:17: Cannot assign type 'object (object, int __pyx_skip_dispatch)' to 'void *'

Error compiling Cython file:
------------------------------------------------------------
...
            cb = from_xml
    else:
        if fmt not in (FMT_XML, FMT_BINARY):
            raise ValueError('Format must be constant FMT_XML or FMT_BINARY')
        if fmt == FMT_BINARY:
            cb = from_bin
                ^
------------------------------------------------------------

plist.pyx:877:17: Cannot assign type 'object (bytes, int __pyx_skip_dispatch)' to 'void *'

Error compiling Cython file:
------------------------------------------------------------
...
        if fmt not in (FMT_XML, FMT_BINARY):
            raise ValueError('Format must be constant FMT_XML or FMT_BINARY')
        if fmt == FMT_BINARY:
            cb = from_bin
        elif fmt == FMT_XML:
            cb = from_xml
                ^
------------------------------------------------------------

plist.pyx:879:17: Cannot assign type 'object (object, int __pyx_skip_dispatch)' to 'void *'

Error compiling Cython file:
------------------------------------------------------------
...
    if is_binary and fmt == FMT_XML:
        raise ValueError('Cannot parse binary property list as XML')
    elif not is_binary and fmt == FMT_BINARY:
        raise ValueError('Cannot parse XML property list as binary')

    return cb(fp.read())
            ^
------------------------------------------------------------

plist.pyx:886:13: Calling non-function type 'void'

Error compiling Cython file:
------------------------------------------------------------
...

    if fmt is not None:
        if fmt not in (FMT_XML, FMT_BINARY):
            raise ValueError('Format must be constant FMT_XML or FMT_BINARY')
        if fmt == FMT_BINARY:
            cb = from_bin
                ^
------------------------------------------------------------

plist.pyx:895:17: Cannot assign type 'object (bytes, int __pyx_skip_dispatch)' to 'void *'

Error compiling Cython file:
------------------------------------------------------------
...
        if fmt not in (FMT_XML, FMT_BINARY):
            raise ValueError('Format must be constant FMT_XML or FMT_BINARY')
        if fmt == FMT_BINARY:
            cb = from_bin
        else:
            cb = from_xml
                ^
------------------------------------------------------------

plist.pyx:897:17: Cannot assign type 'object (object, int __pyx_skip_dispatch)' to 'void *'

Error compiling Cython file:
------------------------------------------------------------
...
            cb = from_bin
        else:
            cb = from_xml
    else:
        if is_binary:
            cb = from_bin
                ^
------------------------------------------------------------

plist.pyx:900:17: Cannot assign type 'object (bytes, int __pyx_skip_dispatch)' to 'void *'

Error compiling Cython file:
------------------------------------------------------------
...
            cb = from_xml
    else:
        if is_binary:
            cb = from_bin
        else:
            cb = from_xml
                ^
------------------------------------------------------------

plist.pyx:902:17: Cannot assign type 'object (object, int __pyx_skip_dispatch)' to 'void *'

Error compiling Cython file:
------------------------------------------------------------
...
    if is_binary and fmt == FMT_XML:
        raise ValueError('Cannot parse binary property list as XML')
    elif not is_binary and fmt == FMT_BINARY:
        raise ValueError('Cannot parse XML property list as binary')

    return cb(data)
            ^
------------------------------------------------------------

plist.pyx:909:13: Calling non-function type 'void'
make[2]: *** [plist.c] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

but I download release2.0.0 to run make, it successed.

nikias commented 5 years ago

Yes I noticed this too. Working on a fix.

nikias commented 5 years ago

Can you try with latest? I pushed a fix with commit 6c684cc61a1189cc72d8609d49f3eb7cd954abab.

nikias commented 4 years ago

Closing, assuming fixed.