Package: pyside
Version: 1.2.2-1
Severity: wishlist
Tags: patch
User: [email protected]
Usertags: origin-ubuntu wily ubuntu-patch

Hiya,

In Ubuntu we've added py3.5 as a supported version. This makes python
packages build python 3.5 extensions, which contain the multiarch
triplet in their filename.

  https://bugs.python.org/issue22980

For pyside, this means that it can't find the ShibokenConfig cmake file
for 3.5. shiboken is a BD of pyside, and after it is rebuilt for 3.5, it
produces the files

   -rw-r--r-- root/root      1317 2015-07-23 17:46 
./usr/lib/x86_64-linux-gnu/cmake/Shiboken-1.2.2/ShibokenConfig.cpython-34m.cmake
   -rw-r--r-- root/root      1402 2015-07-23 17:45 
./usr/lib/x86_64-linux-gnu/cmake/Shiboken-1.2.2/ShibokenConfig.cpython-35m-x86_64-linux-gnu.cmake

pyside looks up the cmake file by making use of an unversioned file
ShibokenConfig.cmake which uses a user-provided suffix to find
ShibokenConfig.cpython-<suffix>.cmake for the particular python version
you're asking for.

So either callers need to know that the suffix has to contain the
triplet for ≥ 3.5 (the attached patch), or shiboken needs to be fixed
somehow - for example by renaming the file back or giving it more smarts
to figure it out. Any fix in shiboken probably wants to take care to
preserve multiarch compatibility that is improved with this change in
3.5, assuming you care about that. There's not so many reverse-BDs of
shiboken though, so it might be easiest to fix them directly.

Cheers,
Iain
diff -Nru pyside-1.2.2/debian/rules pyside-1.2.2/debian/rules
--- pyside-1.2.2/debian/rules	2014-04-30 11:54:27.000000000 +0100
+++ pyside-1.2.2/debian/rules	2015-07-25 17:16:11.000000000 +0100
@@ -17,6 +17,12 @@
 
 DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
 
+# the python version we are being called on atm, in the form "34" (for 3.4)
+PYVER=$(subst .,,$*)
+# python ≥ 3.5 append the multiarch triplet to module names (in particular this
+# is reflected in ShibokenConfig.cmake)
+PYMODULESUFFIX=$(if $(shell test $(PYVER) -ge 35 && echo "yes"),"-$(DEB_HOST_MULTIARCH)","")
+
 ifneq (,$(filter debug,$(DEB_BUILD_OPTIONS)))
 	BD_DEBUG           = python-all-dbg (>= 2.6.6-3~), python3-all-dbg, shiboken-dbg (>= 1.2.2),
 endif
@@ -89,14 +95,14 @@
 	dh_auto_configure -a --builddirectory=build-$*-dbg -- \
 	$(CMAKE_COMMON_OPTIONS) \
 	-DCMAKE_BUILD_TYPE:STRING="Debug" \
-	-DPYTHON_SUFFIX=.cpython-$(subst .,,$*)dm
+	-DPYTHON_SUFFIX=.cpython-$(PYVER)dm$(PYMODULESUFFIX)
 
 override_dh_auto_configure_3-%:
 	mkdir -p build-$*
 	dh_auto_configure -a --builddirectory=build-$* -- \
 	$(CMAKE_COMMON_OPTIONS) \
 	-DCMAKE_BUILD_TYPE:STRING="Release" \
-	-DPYTHON_SUFFIX=.cpython-$(subst .,,$*)m \
+	-DPYTHON_SUFFIX=.cpython-$(PYVER)m$(PYMODULESUFFIX) \
 	-DDEFAULT_PYTHON_BASENAME=-python${DEFAULT_PY}
 
 #### BUILD ####
_______________________________________________
Python-modules-team mailing list
[email protected]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/python-modules-team

Reply via email to