Bug ID 1171013
Summary Protobuf bindings for Python 3 do not include C++ extension
Classification openSUSE
Product openSUSE Tumbleweed
Version Current
Hardware Other
OS Other
Status NEW
Severity Normal
Priority P5 - None
Component Development
Assignee screening-team-bugs@suse.de
Reporter adam.reichold@t-online.de
QA Contact qa-bugs@suse.de
Found By ---
Blocker ---

It seems the Protobuf bindings for Python 3 do not include the CPython
extension making use of the C++ library, but always use the pure Python
implementation, i.e.
running with PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=cpp yields

  File "/usr/lib/python3.8/site-packages/google/protobuf/descriptor.py", line
47, in <module>
    from google.protobuf.pyext import _message
ImportError: cannot import name '_message' from 'google.protobuf.pyext'
(/usr/lib/python3.8/site-packages/google/protobuf/pyext/__init__.py)

Installing protobuf via pip installs a prebuilt binary and that indeed seems to
work with significantly improved performance but I would very much prefer to
stick with the distribution package if it could be changed to include the
CPython extension.

>From what I found, Arch had a similar issue, c.f.
https://bugs.archlinux.org/task/54959 which was fixed by passing
--cpp_implementation to setup.py, c.f.
https://git.archlinux.org/svntogit/packages.git/tree/trunk/PKGBUILD?h=packages/protobuf#n33


You are receiving this mail because: