[Python-modules-commits] r8195 - in packages/python-qt4/trunk/debian (3 files)

bzed at users.alioth.debian.org bzed at users.alioth.debian.org
Wed Apr 8 23:33:21 UTC 2009


    Date: Wednesday, April 8, 2009 @ 23:33:20
  Author: bzed
Revision: 8195

  - Move pyuic4's widget-plugins directory to
    /usr/share/python-qt4 as the directory must not be a
    namespace package - therefore it doesn't make sense to install
    it within the normal modules directory.
    Thanks to Pierre Chifflier for the bugreport (Closes: #523059).
* debian/patches/04_widget-plugins_location.dpatch:
  - Adding patch to tell pyuic about the new location of the
    widget plugins.

Added:
  packages/python-qt4/trunk/debian/patches/04_widget-plugins_location.dpatch
Modified:
  packages/python-qt4/trunk/debian/changelog
  packages/python-qt4/trunk/debian/rules

Modified: packages/python-qt4/trunk/debian/changelog
===================================================================
--- packages/python-qt4/trunk/debian/changelog	2009-04-08 22:02:21 UTC (rev 8194)
+++ packages/python-qt4/trunk/debian/changelog	2009-04-08 23:33:20 UTC (rev 8195)
@@ -6,9 +6,11 @@
     - Prepare build-process for Python 2.6.
     - Install the python-qt4-dbus debug extensions properly again,
       they were forgotten during the migration to python-support.
-    - Install .noinit into pyuic4's widget-plugins directory as
-      pyuic4 fails if __init__.py exists in the directory. Thanks
-      to Pierre Chifflier for the bugreport (Closes: #523059).
+    - Move pyuic4's widget-plugins directory to
+      /usr/share/python-qt4 as the directory must not be a
+      namespace package - therefore it doesn't make sense to install
+      it within the normal modules directory.
+      Thanks to Pierre Chifflier for the bugreport (Closes: #523059).
   * debian/*.install:
     - Handle *-package directories to support Python 2.6.
   * debian/control:
@@ -16,6 +18,9 @@
       thanks to Zed Pobre for the bug report (Closes: #505572).
     - pyqt4-dev-tools: make the dependency on python-qt a
       versioned one.
+  * debian/patches/04_widget-plugins_location.dpatch:
+    - Adding patch to tell pyuic about the new location of the
+      widget plugins.
 
  -- Bernd Zeimetz <bzed at debian.org>  Wed, 08 Apr 2009 23:14:23 +0200
 

Added: packages/python-qt4/trunk/debian/patches/04_widget-plugins_location.dpatch
===================================================================
--- packages/python-qt4/trunk/debian/patches/04_widget-plugins_location.dpatch	                        (rev 0)
+++ packages/python-qt4/trunk/debian/patches/04_widget-plugins_location.dpatch	2009-04-08 23:33:20 UTC (rev 8195)
@@ -0,0 +1,20 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 04_widget-plugins_location.dpatch by Bernd Zeimetz <bzed at debian.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Move widget plugins to a sane place.
+
+ at DPATCH@
+diff -urNad python-qt4~/pyuic/uic/objcreator.py python-qt4/pyuic/uic/objcreator.py
+--- python-qt4~/pyuic/uic/objcreator.py	2008-11-08 12:55:56.000000000 +0100
++++ python-qt4/pyuic/uic/objcreator.py	2009-04-09 01:26:57.000000000 +0200
+@@ -22,8 +22,7 @@
+         self._modules = [self._cpolicy.createQtGuiWrapper()]
+ 
+         # Get the optional plugins.
+-        plugindir = os.path.join(os.path.split(__file__)[0],
+-                                 "widget-plugins")
++        plugindir = '/usr/share/python-qt4/widget-plugins'
+ 
+         try:
+             plugins = os.listdir(plugindir)


Property changes on: packages/python-qt4/trunk/debian/patches/04_widget-plugins_location.dpatch
___________________________________________________________________
Added: svn:executable
   + *

Modified: packages/python-qt4/trunk/debian/rules
===================================================================
--- packages/python-qt4/trunk/debian/rules	2009-04-08 22:02:21 UTC (rev 8194)
+++ packages/python-qt4/trunk/debian/rules	2009-04-08 23:33:20 UTC (rev 8195)
@@ -156,6 +156,14 @@
 		! \( -name '*.so' -o -name '*config_d.py' \) | xargs rm -f
 	find debian/python-*-dbg -depth -type d -empty -exec rmdir {} \;
 
+
+	#move widget plugins to a sane place
+	mkdir -p debian/python-qt4/usr/share/python-qt4
+	mv debian/python-qt4/usr/lib/python$(DEFAULT_PYTHON)/*-packages/PyQt4/uic/widget-plugins \
+	   debian/python-qt4/usr/share/python-qt4
+	touch debian/python-qt4/usr/share/python-qt4/widget-plugins/.noinit
+	rm -rf debian/*/usr/lib/*/*-packages/PyQt4/uic/widget-plugins
+
 	#FIXME - copying the file to /usr/bin is not the best way,
 	# it should be imported properly instead.
 	# probably like ipython handles it.
@@ -196,15 +204,6 @@
 	done
 endif
 	dh_pysupport
-	# work around the broken way to handle widget plugins by shipping
-	# .noinit in the directory.
-	# we try to be compatible to older python-support versions to make
-	# backports more easy - but this was not tested.
-	if [ -d $(CURDIR)/debian/python-qt4/usr/share/pyshared/PyQt4/uic/widget-plugins ]; then \
-	  touch $(CURDIR)/debian/python-qt4/usr/share/pyshared/PyQt4/uic/widget-plugins/.noinit; \
-	else \
-	  touch $(CURDIR)/debian/python-qt4/usr/share/python-support/PyQt4/uic/widget-plugins/.noinit ;\
-	fi
 	dh_fixperms
 	dh_compress -X.py -X.bmp -X.ui -X.sql
 	dh_installdeb




More information about the Python-modules-commits mailing list