Skip to content

build fails with python 3.9(.1) on latest rpi (buster) #206

Open
@sebres

Description

@sebres

Despite the docu says that slot tp_print was already renamed in 3.8, but it looks like a certain incompatibility using python 3.9 only (missing some rule/definition in make file?), because it still seemed to use these "obsolete" members for some reason:

$ python3 --version
Python 3.9.1
$ python3 -m pip install python-openzwave |& tee log.txt
Collecting python-openzwave
  Using cached python_openzwave-0.4.19.zip (147 kB)
Requirement already satisfied: pyserial in ./lib/python3.9/site-packages (from python-openzwave) (3.5)
...
    Running setup.py install for python-openzwave: finished with status 'error'
    ERROR: Command errored out with exit status 1:
     command: python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'.../setup.py'"'"'; __file__='"'"'.../setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record .../install-record.txt --single-version-externally-managed --compile --install-headers /ha/include/site/python3.9/python-openzwave
    Complete output (1689 lines):
    ImportError in : from wheel.bdist_wheel import bdist_wheel as _bdist_wheel
    sysargv ['.../setup.py', 'install', '--record', '/tmp/pip-record-kf__8sp5/install-record.txt', '--single-version-externally-managed', '--compile', '--install-headers', '/ha/include/site/python3.9/python-openzwave']
    Found SETUP_DIR : ...
    NameError in : class bdist_wheel(_bdist_wheel) - Use bdist_egg instead
    <pyozw_setup.EmbedTemplate object at 0xb5a33f88>
    {'name': 'libopenzwave', 'sources': ['openzwave-embed/open-zwave-master/python-openzwave/src-lib/libopenzwave/libopenzwave.cpp'], 'include_dirs': ['src-lib/libopenzwave/', 'openzwave-embed/open-zwave-master/cpp/src', 'openzwave-embed/open-zwave-master/cpp/src/value_classes', 'openzwave-embed/open-zwave-master/cpp/src/platform', 'openzwave-embed/open-zwave-master/cpp/build/linux'], 'define_macros': [('PY_LIB_VERSION', '0.4.19'), ('PY_SSIZE_T_CLEAN', 1), ('PY_LIB_FLAVOR', 'embed'), ('PY_LIB_BACKEND', 'cpp')], 'libraries': ['udev', 'stdc++', 'resolv'], 'extra_objects': ['openzwave-embed/open-zwave-master/libopenzwave.a'], 'extra_compile_args': [], 'extra_link_args': [], 'language': 'c++'}
    ['six', 'pyserial', 'PyDispatcher>=2.0.5']
    running install
...
    .../src-lib/libopenzwave/libopenzwave.cpp: In function ‘int __Pyx_modinit_type_init_code()’:
    .../src-lib/libopenzwave/libopenzwave.cpp:40702:39: error: ‘PyTypeObject’ {aka ‘struct _typeobject’} has no member named ‘tp_print’; did you mean ‘tp_dict’?
       __pyx_type_12libopenzwave_PyOptions.tp_print = 0;
                                           ^~~~~~~~
                                           tp_dict
    .../src-lib/libopenzwave/libopenzwave.cpp:40720:38: error: ‘PyTypeObject’ {aka ‘struct _typeobject’} has no member named ‘tp_print’; did you mean ‘tp_dict’?
       __pyx_type_12libopenzwave_RetAlloc.tp_print = 0;
                                          ^~~~~~~~
                                          tp_dict
    .../src-lib/libopenzwave/libopenzwave.cpp:40728:54: error: ‘PyTypeObject’ {aka ‘struct _typeobject’} has no member named ‘tp_print’; did you mean ‘tp_dict’?
       __pyx_type_12libopenzwave_InstanceAssociationAlloc.tp_print = 0;
                                                          ^~~~~~~~
                                                          tp_dict
    .../src-lib/libopenzwave/libopenzwave.cpp:40736:39: error: ‘PyTypeObject’ {aka ‘struct _typeobject’} has no member named ‘tp_print’; did you mean ‘tp_dict’?
       __pyx_type_12libopenzwave_PyManager.tp_print = 0;
                                           ^~~~~~~~
                                           tp_dict
...
    error: command '/usr/bin/gcc' failed with exit code 1

Build with python 3.8.7 succeeds without any error (no ImportError and no gcc errors at all).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions