-
Notifications
You must be signed in to change notification settings - Fork 14
Zbarcam for Python 3 #13
Comments
Thank you for the report. I thought I already created a ticket for it with the link to the upstream bug, but apparently not. Regarding the buildozer recipes, please share what you've tried so far and your errors and we can try to have a look together. |
So, I found a many(real many) libraries which support zbar for Python 3. And I was trying to build apk with it. Some libs crashed with buildozer(need custom recipe). Some libs crashed by openin app("libzbar.so.0" not found"). Now I'm trying to create a compiled recipe to zbarlight. And I can't understand which code must be in there. I read a zbar recipe but didn't understand how it works. I home that you can help me with creating a recipe |
There are all libs that I found: zbar_py, zbar-ctypes,libzbar-ctypes,libzbar-cffi,zbarlight, pyzbar. May be you will understand how customize recipe to build apk with it |
I wrote simple recipe and now have this error: |
I may take a look at it soon, but I believe we need to have #14 right before. |
Since #14 is done I've started the migration. I've picked up zbarlight rather than https://github.com/zplab/zbar-py because the former seemed more in active development and had more stars. However it already has an annoying feature that I've reported here Polyconseil/zbarlight#23 |
Moves from unmaintained zbar core python module, to `zbarlight` one. Currently uses an old `zbarlight==1.2` version rather than `2.0` because the other one requires `setuptools>=30.3` which doesn't yet have working p4a recipe. Unfortunately `zbarlight` doesn't yet make it possible to detect multiple code types at the same time, see: Polyconseil/zbarlight#23 But this is something we may workaround until it gets integrated upstream. Also, this brings another regression since the code type detection is fixed to `qrcode`. This will be fixed in subsequent commits. Last, this commit doesn't yet provide Python3 support, but migrating was the first mandatory step of it.
Moves from unmaintained zbar python module, to `zbarlight` one. Currently uses an old `zbarlight==1.2` version rather than `2.0` because the other one requires `setuptools>=30.3` which doesn't yet have working p4a recipe. Unfortunately `zbarlight` doesn't yet make it possible to detect multiple code types at the same time, see: Polyconseil/zbarlight#23 But this is something we may workaround until it gets integrated upstream. Also, this brings another regression since the code type detection is fixed to `qrcode`. This will be fixed in subsequent commits. Last, this commit doesn't yet provide Python3 support, but migrating was the first mandatory step of it.
zbarlight doesn't yet provide a more efficient way to do this, see: Polyconseil/zbarlight#23
Most of it is done for Python3, but we still need to work on the Pillow recipe kivy/python-for-android#786 and this one can be painful. I may take a look, but later then |
@11username11 there's apparently a working Pillow recipe here kivy/python-for-android#786 (comment) if you want to give it a try A dedicated pull request was created and merged in kivy/python-for-android#1339 Next up is to integrate it with garden.zbarcam. I gave it a quick try and I came across a bunch of issues with xcamera kivy-garden/garden.xcamera#5
|
So, I understood that you're trying to use zbarpy for Python3, aren't you? If I'm right we need to use NumPy for this lib. But NumPy can't work with buildozer and third version of Python |
No I'm planning to use |
I have got this working on Python 3 on android (eventually): Change:
|
Sweet well done! 👏 |
I forgot to mention the change was in Kivy, not in zbarcam/zbarlight etc. I've posted in their issues tracker for what looks like the same issue: |
Yep sure, you can still give it a try to pull request it upstream. Or until then eventually add a local recipe patch |
In Python 3, the buffer needs to an explicit bytestring rather than a string; hence changing: buf = '\x00' * self._bufsize to buf = b'\x00' * self._bufsize Fixes various issues: in Kivy kivy#5939 and in associated garden project ZbarCam kivy-garden/garden.zbarcam#13
How do you have it working with those requirements? For instance: Could not find a version that satisfies the requirement libzbar (from versions: ) EDIT: Ignore the comment above, I didn't put these recipes on P4A hence the problem. |
I can't use it for python 3(because of zbar). I found some libraries for decoding qr code for third version of language which don't use zbar. But I can't create right recipes for buildozer. May be you can help me? And we will add Python 3 support
The text was updated successfully, but these errors were encountered: