Installing python __init__.py file from multiple KF5 frameworks
Stephen Kelly
steveire at gmail.com
Tue May 17 23:09:46 BST 2016
Hi,
I've been working with Shaheed Hague on new python bindings for KF5. The
current state is gathered at the temporary location here:
https://github.com/steveire/frameworks-bindings
That repo builds a fork of ECM and a fork of 12 KF5 frameworks, and
builds and installs bindings for them:
$ find prefix/lib/python*
prefix/lib/python2.7
prefix/lib/python2.7/dist-packages
prefix/lib/python2.7/dist-packages/PyKF5
prefix/lib/python2.7/dist-packages/PyKF5/KDBusAddons.so
prefix/lib/python2.7/dist-packages/PyKF5/__init__.py
prefix/lib/python2.7/dist-packages/PyKF5/KItemModels.so
prefix/lib/python3.5
prefix/lib/python3.5/dist-packages
prefix/lib/python3.5/dist-packages/PyKF5
prefix/lib/python3.5/dist-packages/PyKF5/KDBusAddons.so
prefix/lib/python3.5/dist-packages/PyKF5/__init__.py
prefix/lib/python3.5/dist-packages/PyKF5/KItemModels.so
This is something that frameworks will start providing when we have
worked out the kinks in the binding generator.
A significant difference compared to PyKDE4 is that these bindings are
modular - they are versioned with the framework they bind to and that
means that they are CI tested with the framework too.
However, this means that all frameworks generate and install the
lib/python*/dist-packages/PyKF5/__init__.py
file. The file is identical for each framework as it is generated by the
build system.
>From a packagers point of view, I understand this is something to
overcome. After a conversation on IRC today it seems that packagers
could select a framework (say, kitemmodels) and split out packages which
contains the __init__.py files, such as 'python3-pykf5-base' and
'python2-pykf5-base' or so. Then all other frameworks would need to be
updated to not install the __init__.py file at all and instead depend on
the '-base' package.
Is that something that works for distros?
I also have been shown
https://www.python.org/dev/peps/pep-0420/
but I'm not certain what to do with the information there. If guidance
can be provided, I can probably change what we install if needed.
Thanks,
Steve.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/distributions/attachments/20160518/f44b8ea7/attachment.htm>
More information about the Distributions
mailing list