[Python-modules-commits] r8881 - in packages/pyscript/trunk/debian (4 files)

dktrkranz-guest at users.alioth.debian.org dktrkranz-guest at users.alioth.debian.org
Sat Jun 27 15:00:28 UTC 2009


    Date: Saturday, June 27, 2009 @ 15:00:22
  Author: dktrkranz-guest
Revision: 8881

Do not use "as" as variable name, it's a reserved word in Python 2.6

Added:
  packages/pyscript/trunk/debian/patches/
  packages/pyscript/trunk/debian/patches/01_Python2.6_reserved_words.patch
Modified:
  packages/pyscript/trunk/debian/changelog
  packages/pyscript/trunk/debian/rules

Modified: packages/pyscript/trunk/debian/changelog
===================================================================
--- packages/pyscript/trunk/debian/changelog	2009-06-27 14:53:39 UTC (rev 8880)
+++ packages/pyscript/trunk/debian/changelog	2009-06-27 15:00:22 UTC (rev 8881)
@@ -1,3 +1,11 @@
+pyscript (0.6.1-3) UNRELEASED; urgency=low
+
+  * debian/patches/01_Python2.6_reserved_words.patch:
+    - Do not use "as" as variable name, it's a reserved word in
+      Python 2.6 (LP: #392870).
+
+ -- Luca Falavigna <dktrkranz at ubuntu.com>  Sat, 27 Jun 2009 14:34:11 +0000
+
 pyscript (0.6.1-2) unstable; urgency=low
 
   [ Arnaud Fontaine ]

Added: packages/pyscript/trunk/debian/patches/01_Python2.6_reserved_words.patch
===================================================================
--- packages/pyscript/trunk/debian/patches/01_Python2.6_reserved_words.patch	                        (rev 0)
+++ packages/pyscript/trunk/debian/patches/01_Python2.6_reserved_words.patch	2009-06-27 15:00:22 UTC (rev 8881)
@@ -0,0 +1,37 @@
+Description: Exit gracefully from PythonCAD
+Origin: Ubuntu
+Bug-Ubuntu: #392870
+
+diff -Nur -x '*.orig' -x '*~' pyscript-0.6.1/pyscript/groups.py pyscript-0.6.1.new/pyscript/groups.py
+--- pyscript-0.6.1/pyscript/groups.py	2006-02-28 18:16:58.000000000 +0000
++++ pyscript-0.6.1.new/pyscript/groups.py	2009-06-27 14:29:26.000000000 +0000
+@@ -387,10 +387,10 @@
+     assert a2 in ["n", "ne", "e", "se", "s", "sw", "w", "nw", "c"]
+ 
+     # note the swap:
+-    as = options.get('as', a2)
++    _as = options.get('as', a2)
+     ae = options.get('ae', a1)
+ 
+-    assert as in ["n", "ne", "e", "se", "s", "sw", "w", "nw", "c"]
++    assert _as in ["n", "ne", "e", "se", "s", "sw", "w", "nw", "c"]
+     assert ae in ["n", "ne", "e", "se", "s", "sw", "w", "nw", "c"]
+ 
+     # these two have to be present
+@@ -424,14 +424,14 @@
+ 
+         # place items at the edges
+         # ---first object----
+-        ov = getattr(items[0].bbox(), as)-p1
++        ov = getattr(items[0].bbox(), _as)-p1
+ 
+         # how much we need to move by
+         mv = -pv.U*ov*pv.U
+         items[0].move(mv)
+ 
+         space -= abs(( getattr(items[0].bbox(), a1)
+-                         - getattr(items[0].bbox(), as) )*pv.U)
++                         - getattr(items[0].bbox(), _as) )*pv.U)
+ 
+         # ---second object---
+         ov = getattr(items[-1].bbox(), ae)-p2

Modified: packages/pyscript/trunk/debian/rules
===================================================================
--- packages/pyscript/trunk/debian/rules	2009-06-27 14:53:39 UTC (rev 8880)
+++ packages/pyscript/trunk/debian/rules	2009-06-27 15:00:22 UTC (rev 8881)
@@ -5,6 +5,7 @@
 
 include /usr/share/cdbs/1/rules/debhelper.mk
 include /usr/share/cdbs/1/class/python-distutils.mk
+include /usr/share/cdbs/1/rules/simple-patchsys.mk
 
 # Don't compress .py files
 DEB_COMPRESS_EXCLUDE := .py




More information about the Python-modules-commits mailing list