Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 921618

Summary: media-libs/zxing-cpp Add tests and python bindings
Product: Gentoo Linux Reporter: Marcin Deranek <marcin.deranek>
Component: Current packagesAssignee: Gentoo KDE team <kde>
Status: UNCONFIRMED ---    
Severity: minor CC: anthonyryan1
Priority: Normal Keywords: PullRequest
Version: unspecified   
Hardware: All   
OS: Linux   
See Also: https://github.com/gentoo/gentoo/pull/38978
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: Sample media-libs/zxing-cpp ebuild with tests and python bindings
QA imperfect python multi-target ebuild

Description Marcin Deranek 2024-01-08 21:48:13 UTC
Created attachment 881688 [details]
Sample media-libs/zxing-cpp ebuild with tests and python bindings

Please add tests and python binding to media-libs/zxing-cpp. See attached sample ebuild which does exactly that (tested).
Comment 1 Anthony Ryan 2024-08-21 00:30:46 UTC
I also made an attempt at this today, but I've decided to give up for now and use pip in a virtualenv after sinking too many hours trying to get this right.

I'm attaching my work in progress ebuild in case someone else wants to continue.

I really wanted to get python multi-version support working, because I detest python libraries that are single target. It makes migrating python versions such a headache when it's effortless on multi-version libs.

My ebuild has two lingering problems that have led me to give up:

1. We need distuitls-r1 to get the python metadata, but the upstream's setup.py custom cmake wrapper doesn't pass the cmake variables Gentoo expects. We get a handful of QA warnings for each one built.

Similarly, if we use cmake directly, we're missing the python metadata we expect.


2. I believe it's copying the entire library into each python .so file, which isn't ideal. At least all copies are going to be updated each time the ebuild is, but it should be using the system library and only having the python code in each python .so
Comment 2 Anthony Ryan 2024-08-21 00:31:49 UTC
Created attachment 900841 [details]
QA imperfect python multi-target ebuild