Packaging PythonQt for Qt 5

Erik Lundin erik at lists.lun.nu
Tue May 23 08:13:13 UTC 2017


Hello,

I sent this email to the debian-mentors list, and got directed to the 
Debian Qt/KDE team, so here follows the same content:

We're using PythonQt built for Qt 5 at work, and I have been looking at 
the possibility to package it for Debian. Here is what I have found so far:

* Qt 4 support for PythonQt seems to have been abandoned upstream. There 
is a branch with the last working version for Qt 4, and version 3.1 
(latest release) assumes Qt 5.
* Support for CMake has been removed upstream.
* The current Debian packages are Qt 4 only, and made for QMake.
* pythonqt is orphaned in Debian
* Debian tracker: https://tracker.debian.org/pkg/pythonqt

I have made necessary changes for building the package using QMake, and 
now would like to contribute them back to the community. However, I'm 
new when it comes to Debian packaging, so please help me with the following:

*Qt 4 vs Qt 5 versions of installed files*
Compatibility between the packages for Qt 4 and Qt 5 has to be handled, 
i.e. the new package should not just install files with the same names 
as the previous packages. Since Qt 4 is abandoned upstream, I changed 
the packaging scripts to only build for Qt 5 and changed the names to 
"libpythonqt-qt5-3.1" and "libpythonqt-qt5-dev". However, the installed 
files still have the same names as the files of the previous packages 
(at least the dev package, which has files installed in 
/usr/include/PythonQt). Possible solutions to the dev package problem:

* Install header files to /usr/include/PythonQt5 or some other Qt 5 
specific folder.
* Install header files to /usr/include/PythonQt and let 
libpythonqt-qt5-dev conflict libpythonqt-dev so only one of them can be 
installed at a time.
* Install header files to /usr/include/PythonQt and only use the name 
libpythonqt-dev (no Qt 5 in the name). The policy manual, section 8.4, 
suggests that this is a possibility if you only want to support one 
development version at a time.

*Library files*
The library files have different names, because of the new version 
(libPythonQt.so.3.1.0 vs libPythonQt.so.3.0.0), but would it be wise to 
rename the Qt 5 library to libPythonQt5.so.3.1.0 or something similarly, 
just to clearly indicate the difference? Since Qt 4 is abandoned 
upstream, I don't expect any Qt 4 packages with version 3.1.0 of the so 
files. The policy manual, section 8.1, says that "the package should 
install the shared libraries under their normal names".

The previous package libpythonqt3.0 creates the symlink 
libPythonQt.so.3.0 -> libPythonQt.so.3.0.0 but not libPythonQt.so.3 -> 
libPythonQt.so.3.0.0. Should this file be skipped also in the Qt 5 case? 
The symlink libPythonQt.so is created by the dev package, which is fine 
if the second or third solution to the dev package problem above is 
selected.

*PythonQt_QtAll*
Previous packages built using CMake were configured to wrap the 
extension PythonQt_QtAll and only create one set of library files. 
However, the possibility to do that seems to have disappeared, and now a 
new set of library files are created (libPythonQt_QtAll.so.3.1.0 with 
corresponding symlinks). The packaging guide, section 8.1, suggests that 
it is OK to put several libraries into the same package if their SONAMES 
will always change together, and I assume that this is the case here, so 
I'm prepared to do that. Any opinions on that?

Regards,
Erik




More information about the pkg-kde-talk mailing list