[Python-modules-commits] r5702 - in packages/python-kde3/trunk/debian (4 files)

kitterma-guest at users.alioth.debian.org kitterma-guest at users.alioth.debian.org
Thu Jun 19 04:56:52 UTC 2008


    Date: Thursday, June 19, 2008 @ 04:56:48
  Author: kitterma-guest
Revision: 5702

Feedback potentially useful Ubuntu changes to Debian: 

  [ Stephan Hermann ]
  * Add 06_kdepyuic_i18n.dpatch:
    - kdepyuic now has a useKDEi18n cmdline option, set
      to TRUE by default, so that .py files generated from
      .ui files are using i18n by default.
    - fixes long options parsing, using a list of string
      instead of a long string

  * Update debian/rules to move kdeconfig files from
    /usr/lib/python-2.*/site-packages to /usr/lib/python2.4/site-packages so
    it is in the normal path

Added:
  packages/python-kde3/trunk/debian/patches/06_kdepyuic_i18n.dpatch
Modified:
  packages/python-kde3/trunk/debian/changelog
  packages/python-kde3/trunk/debian/patches/00list
  packages/python-kde3/trunk/debian/rules

Modified: packages/python-kde3/trunk/debian/changelog
===================================================================
--- packages/python-kde3/trunk/debian/changelog	2008-06-19 00:52:03 UTC (rev 5701)
+++ packages/python-kde3/trunk/debian/changelog	2008-06-19 04:56:48 UTC (rev 5702)
@@ -1,3 +1,19 @@
+python-kde3 (3.16.1-2) UNRELEASED; urgency=low
+
+  [ Stephan Hermann ]
+  * Add 06_kdepyuic_i18n.dpatch:
+    - kdepyuic now has a useKDEi18n cmdline option, set
+      to TRUE by default, so that .py files generated from
+      .ui files are using i18n by default.
+    - fixes long options parsing, using a list of string
+      instead of a long string
+
+  * Update debian/rules to move kdeconfig files from
+    /usr/lib/python-2.*/site-packages to /usr/lib/python2.4/site-packages so
+    it is in the normal path (LP: #229845)
+
+ -- Scott Kitterman <scott at kitterman.com>  Wed, 18 Jun 2008 22:11:32 -0400
+
 python-kde3 (3.16.1-1) unstable; urgency=low
 
   [ Piotr Ożarowski ]

Modified: packages/python-kde3/trunk/debian/patches/00list
===================================================================
--- packages/python-kde3/trunk/debian/patches/00list	2008-06-19 00:52:03 UTC (rev 5701)
+++ packages/python-kde3/trunk/debian/patches/00list	2008-06-19 04:56:48 UTC (rev 5702)
@@ -3,3 +3,4 @@
 03_dcopext
 04_dcop
 05_kmimetype-is
+06_kdepyuic_i18n

Added: packages/python-kde3/trunk/debian/patches/06_kdepyuic_i18n.dpatch
===================================================================
--- packages/python-kde3/trunk/debian/patches/06_kdepyuic_i18n.dpatch	                        (rev 0)
+++ packages/python-kde3/trunk/debian/patches/06_kdepyuic_i18n.dpatch	2008-06-19 04:56:48 UTC (rev 5702)
@@ -0,0 +1,86 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## kubuntu_04_kdepyuic_i18n.dpatch by  <sh at sourcecode.de>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: No description.
+
+ at DPATCH@
+diff -urNad python-kde3-3.16.0~/contrib/kdepyuic python-kde3-3.16.0/contrib/kdepyuic
+--- python-kde3-3.16.0~/contrib/kdepyuic	2008-01-04 12:42:58.000000000 +0100
++++ python-kde3-3.16.0/contrib/kdepyuic	2008-01-04 13:14:56.000000000 +0100
+@@ -37,6 +37,7 @@
+ addImport  = TRUE
+ pyuicPath  = "pyuic"
+ filename   = ""
++i18nFunc   = FALSE
+ 
+ 
+ # --------- support functions ----------
+@@ -45,8 +46,8 @@
+     global filename
+ 
+     opterr = 0
+-    shortOptions = "aip:"
+-    longOptions  = "noapp noimport pyuic="
++    shortOptions = 'aip:'
++    longOptions  = ['noapp', 'noimport', 'pyuic=', 'usekdei18n']
+ 
+     try:
+         optlist, args = getopt.getopt (sys.argv [1:], shortOptions, longOptions)
+@@ -64,6 +65,7 @@
+     -a, --noapp Don't add KApplication code
+     -i, --noimport  Don't add kdecore, kdeui import statements
+     -p, --pyuic Path to pyuic program
++    --usekdei18n Adds KDEs default i18n functions to your Python KDE ui file
+   """
+         return FALSE
+ 
+@@ -71,7 +73,7 @@
+     return checkOptions (optlist)
+ 
+ def checkOptions (optlist):
+-    global addApp, addImport, pyuicPath
++    global addApp, addImport, pyuicPath, i18nFunc
+ 
+     for pair in optlist:
+         if (pair [0] == '--noapp') or (pair [0] == '-a'):
+@@ -83,6 +85,10 @@
+         elif (pair [0] == '--pyuic') or (pair [0] == '-p'):
+             pyuicPath = pair [1]
+ 
++        if (pair [0] == '--usekdei18n'):
++            i18nFunc=TRUE
++        else:
++            i18nFunc=FALSE
+ 
+ 
+ # --------- operations ----------
+@@ -90,6 +96,8 @@
+ def addimport (n):
+     if addApp:
+         n.write ('from kdecore import KCmdLineArgs, KApplication\n')
++    if i18nFunc:
++        n.write ('from kdecore import i18n\n')
+     n.write ('from kdeui import *\n\n')
+ 
+ 
+@@ -104,11 +112,16 @@
+ def doPyuic ():
+ 
+     fn = os.path.splitext (os.path.basename(filename)) [0] + '.py'
++    opts = ""
++
++    if i18nFunc:
++       opts = opts + ' -tr i18n '
+ 
+     if addApp:
+-        opts = ' -x -o '
+-    else:
+-        opts = ' -o '
++        opts = opts + ' -x '
++
++    opts = opts + ' -o '
++
+ 
+     if os.system (pyuicPath + opts + fn + ' ' + filename) != 0:
+         print pyuicPath + opts + fn + ' ' + filename + " failed"


Property changes on: packages/python-kde3/trunk/debian/patches/06_kdepyuic_i18n.dpatch
___________________________________________________________________
Name: svn:executable
   + *

Modified: packages/python-kde3/trunk/debian/rules
===================================================================
--- packages/python-kde3/trunk/debian/rules	2008-06-19 00:52:03 UTC (rev 5701)
+++ packages/python-kde3/trunk/debian/rules	2008-06-19 04:56:48 UTC (rev 5702)
@@ -85,13 +85,13 @@
 	dh_install -i -X'\.diff$$' -X'\.in$$' -X'\.html$$'
 	for version in ${PYTHONS};\
 	do\
-		mkdir -p debian/python-kde3-dev/usr/lib/python$$version/site-packages;\
-		cp debian/pykdeconfig.py debian/python-kde3-dev/usr/lib/python$$version/site-packages/;\
-		cp build-$$version/pykdeconfig.py debian/python-kde3-dev/usr/lib/python$$version/site-packages/pykdeconfig_nd.py;\
+		mkdir -p debian/python-kde3-dev/usr/lib/python-$$version/site-packages;\
+		cp debian/pykdeconfig.py debian/python-kde3-dev/usr/lib/python-$$version/site-packages/;\
+		cp build-$$version/pykdeconfig.py debian/python-kde3-dev/usr/lib/python-$$version/site-packages/pykdeconfig_nd.py;\
 	done
 	for version in ${DBG_PYTHONS};\
 	do\
-		cp dbg-build-$$version/pykdeconfig.py debian/python-kde3-dev/usr/lib/python$$version/site-packages/pykdeconfig_d.py;\
+		cp dbg-build-$$version/pykdeconfig.py debian/python-kde3-dev/usr/lib/python-$$version/site-packages/pykdeconfig_d.py;\
 	done
 
 install-arch:




More information about the Python-modules-commits mailing list