Bug 1490964 - Build kf5 python bindings
Summary: Build kf5 python bindings
Keywords:
Status: NEW
Alias: None
Product: Fedora
Classification: Fedora
Component: kf5
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Rex Dieter
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On: 1490997
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-09-12 15:42 UTC by Rex Dieter
Modified: 2018-09-14 13:32 UTC (History)
5 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed:
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
KDE Software Compilation 372311 0 None None None 2017-09-13 15:21:18 UTC

Description Rex Dieter 2017-09-12 15:42:30 UTC
Tracking bug for building kf5 python bindings (where supported)

Comment 1 Jason Tibbitts 2017-09-12 16:06:25 UTC
If anyone has suggestions about how to get started with this, I may be able to put in some effort.  But at this point I'm not even sure where to start.

Comment 2 Rex Dieter 2017-09-12 16:26:53 UTC
Just to document where I got stuck:

camke-extra-modules includes:
/usr/share/ECM/find-modules/FindPythonModuleGeneration.cmake

which looks for libclang and fails on fedora.  As far as I can tell, it's looking for libclang-X.Y.so, which is something that fedora's llvm/clang packaging doesn't seem to provide.

Comment 3 Rex Dieter 2017-09-12 16:33:31 UTC
Manually specifying:
 -Dlibclang_LIBRARY:PATH=%{_libdir}/libclang.so

gets a little further:

Traceback (most recent call last):
  File "/usr/share/ECM/find-modules/sip_generator.py", line 41, in <module>
    from clang import cindex
ImportError: No module named clang
-- sip_generator failed a self-check for the PythonModuleGeneration Module.
Traceback (most recent call last):
  File "/usr/share/ECM/find-modules/sip_generator.py", line 41, in <module>
    from clang import cindex
ImportError: No module named clang
-- sip_generator failed a self-check for the PythonModuleGeneration Module.

Comment 4 Rex Dieter 2017-09-13 15:01:43 UTC
Followup, following bug #1490997 , once we have clang python bindings available at buildtime, builds generally(*) succeed (tested using kf5-kconfig-5.38 module at least).


(*) generally, modulo other issues: doesn't reliably support shadow/out-of-src-tree or parallel builds

Comment 5 Jason Tibbitts 2017-09-13 15:10:19 UTC
One possibility is that we just include the three or four python files needed directly in the package, so that we can at least have a package to test.  They're only used at build time in any case.  It should be possible to just copy them someplace in the source directory in after %autosetup and then export PYTHONPATH so that they're used.

Comment 6 Rex Dieter 2017-09-13 15:17:30 UTC
Good idea.

next, could consider bundling them somewhere in kf5 or extra-cmake-modules (or whatever) to be usable by all kf5- framework packages with python bindings

Comment 7 Rex Dieter 2017-09-13 15:21:18 UTC
Comment #3 issue upstream at https://bugs.kde.org/show_bug.cgi?id=372311

Comment 8 Rex Dieter 2018-09-14 13:31:50 UTC
To document progress, I have a proof-of-concept implented in kf5-kconfig (tier1) package, to provide python bindings.

Now that python2-clang is available everywhere at least.  Of course now have to deal with python2 deprecation in f30+


Note You need to log in before you can comment on or make changes to this bug.