kivy/pyobjus

Cant install pyobjus on MacOS 10.15.3

temitayoadefemimatthew opened this issue · 3 comments

i tried import pyobjus to my pycharm project and this is the error i recieved, can anyone advise me on what i can do. i already have cython installed in the project

Collecting pyobjus
  Using cached https://files.pythonhosted.org/packages/cb/9e/6425d66cf66892ee99ebdc86204c825d6817458328b6cdc3a6c51ad152d1/pyobjus-1.1.0.tar.gz
Installing collected packages: pyobjus
  Running setup.py install for pyobjus: started
    Running setup.py install for pyobjus: finished with status 'error'
    Complete output from command /Users/temitayoadefemi/tesr/bin/python -u -c "import setuptools, tokenize;__file__='/private/var/folders/7z/tyb3y9hd2b30lg4fml_bwf880000gn/T/pycharm-packaging/pyobjus/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /private/var/folders/7z/tyb3y9hd2b30lg4fml_bwf880000gn/T/pip-record-0_9n51m8/install-record.txt --single-version-externally-managed --compile --install-headers /Users/temitayoadefemi/tesr/include/site/python3.7/pyobjus:
    running install
    running build
    running build_py
    creating build
    creating build/lib.macosx-10.15-x86_64-3.7
    copying setup.py -> build/lib.macosx-10.15-x86_64-3.7
    creating build/lib.macosx-10.15-x86_64-3.7/pyobjus
    copying pyobjus/dylib_manager.py -> build/lib.macosx-10.15-x86_64-3.7/pyobjus
    copying pyobjus/protocols.py -> build/lib.macosx-10.15-x86_64-3.7/pyobjus
    copying pyobjus/__init__.py -> build/lib.macosx-10.15-x86_64-3.7/pyobjus
    copying pyobjus/objc_py_types.py -> build/lib.macosx-10.15-x86_64-3.7/pyobjus
    creating build/lib.macosx-10.15-x86_64-3.7/pyobjus/consts
    copying pyobjus/consts/__init__.py -> build/lib.macosx-10.15-x86_64-3.7/pyobjus/consts
    copying pyobjus/consts/corebluetooth.py -> build/lib.macosx-10.15-x86_64-3.7/pyobjus/consts
    warning: build_py: byte-compiling is disabled, skipping.
    
    running build_ext
    cythoning pyobjus/pyobjus.pyx to pyobjus/pyobjus.c
    /Users/temitayoadefemi/tesr/lib/python3.7/site-packages/Cython/Compiler/Main.py:369: FutureWarning: Cython directive 'language_level' not set, using 2 for now (Py2). This will change in a later release! File: /private/var/folders/7z/tyb3y9hd2b30lg4fml_bwf880000gn/T/pycharm-packaging/pyobjus/pyobjus/pyobjus.pyx
      tree = Parsing.p_module(s, pxd, full_module_name)
    building 'pyobjus' extension
    creating build/temp.macosx-10.15-x86_64-3.7
    creating build/temp.macosx-10.15-x86_64-3.7/pyobjus
    clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk -I/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/Tk.framework/Versions/8.5/Headers -I/usr/local/include -I/usr/local/opt/openssl@1.1/include -I/usr/local/opt/sqlite/include -I/Users/temitayoadefemi/tesr/include -I/usr/local/Cellar/python/3.7.7/Frameworks/Python.framework/Versions/3.7/include/python3.7m -c pyobjus/pyobjus.c -o build/temp.macosx-10.15-x86_64-3.7/pyobjus/pyobjus.o
    In file included from pyobjus/pyobjus.c:608:
    pyobjus/_runtime.h:33:23: error: too many arguments to function call, expected 0, have 2
      return objc_msgSend(pool, sel_registerName("init"));
             ~~~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/objc/message.h:62:1: note: 'objc_msgSend' declared here
    OBJC_EXPORT void
    ^
    /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/objc/objc-api.h:236:25: note: expanded from macro 'OBJC_EXPORT'
    #   define OBJC_EXPORT  OBJC_EXTERN OBJC_VISIBLE
                            ^
    /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/objc/objc-api.h:225:28: note: expanded from macro 'OBJC_EXTERN'
    #       define OBJC_EXTERN extern
                               ^
    In file included from pyobjus/pyobjus.c:608:
    pyobjus/_runtime.h:37:22: error: too many arguments to function call, expected 0, have 2
      (void)objc_msgSend(pool, sel_registerName("drain"));
            ~~~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/objc/message.h:62:1: note: 'objc_msgSend' declared here
    OBJC_EXPORT void
    ^
    /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/objc/objc-api.h:236:25: note: expanded from macro 'OBJC_EXPORT'
    #   define OBJC_EXPORT  OBJC_EXTERN OBJC_VISIBLE
                            ^
    /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/objc/objc-api.h:225:28: note: expanded from macro 'OBJC_EXTERN'
    #       define OBJC_EXTERN extern
                               ^
    pyobjus/pyobjus.c:24583:25: error: too many arguments to function call, expected 0, have 2
        (void)(objc_msgSend(__pyx_v_self->o_instance, sel_registerName(((char *)"release"))));
               ~~~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/objc/message.h:62:1: note: 'objc_msgSend' declared here
    OBJC_EXPORT void
    ^
    /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/objc/objc-api.h:236:25: note: expanded from macro 'OBJC_EXPORT'
    #   define OBJC_EXPORT  OBJC_EXTERN OBJC_VISIBLE
                            ^
    /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/objc/objc-api.h:225:28: note: expanded from macro 'OBJC_EXTERN'
    #       define OBJC_EXTERN extern
                               ^
    pyobjus/pyobjus.c:24660:45: error: too many arguments to function call, expected 0, have 2
        __pyx_v_self->o_instance = objc_msgSend(__pyx_v_self->o_instance, sel_registerName(((char *)"retain")));
                                   ~~~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/objc/message.h:62:1: note: 'objc_msgSend' declared here
    OBJC_EXPORT void
    ^
    /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/objc/objc-api.h:236:25: note: expanded from macro 'OBJC_EXPORT'
    #   define OBJC_EXPORT  OBJC_EXTERN OBJC_VISIBLE
                            ^
    /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/objc/objc-api.h:225:28: note: expanded from macro 'OBJC_EXTERN'
    #       define OBJC_EXTERN extern
                               ^
    4 errors generated.
    error: command 'clang' failed with exit status 1
    
    ----------------------------------------

Command "/Users/temitayoadefemi/tesr/bin/python -u -c "import setuptools, tokenize;__file__='/private/var/folders/7z/tyb3y9hd2b30lg4fml_bwf880000gn/T/pycharm-packaging/pyobjus/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /private/var/folders/7z/tyb3y9hd2b30lg4fml_bwf880000gn/T/pip-record-0_9n51m8/install-record.txt --single-version-externally-managed --compile --install-headers /Users/temitayoadefemi/tesr/include/site/python3.7/pyobjus" failed with error code 1 in /private/var/folders/7z/tyb3y9hd2b30lg4fml_bwf880000gn/T/pycharm-packaging/pyobjus/

Please i need help, ive tried everything

@RustyRyan98 I've just bumped into the same problem. Is there any update? Did you managed to work on pyobjus?

Try pip3 install https://github.com/kivy/pyobjus/archive/master.zip that should solve it