[arch-commits] Commit in python-dae/trunk (PKGBUILD python3.5.patch)

Felix Yan felixonmars at archlinux.org
Mon Dec 12 14:57:59 UTC 2016


    Date: Monday, December 12, 2016 @ 14:57:59
  Author: felixonmars
Revision: 199026

upgpkg: python-dae 1.0.1-2

add a patch to fix FS#52126

Added:
  python-dae/trunk/python3.5.patch
Modified:
  python-dae/trunk/PKGBUILD

-----------------+
 PKGBUILD        |   16 ++++++++++++----
 python3.5.patch |   47 +++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 59 insertions(+), 4 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2016-12-12 14:45:27 UTC (rev 199025)
+++ PKGBUILD	2016-12-12 14:57:59 UTC (rev 199026)
@@ -5,7 +5,7 @@
 
 pkgname=python-dae
 pkgver=1.0.1
-pkgrel=1
+pkgrel=2
 pkgdesc='Deepin desktop application engine'
 arch=('any')
 url="https://github.com/linuxdeepin/dae"
@@ -12,11 +12,19 @@
 license=('GPL3')
 depends=('python-xlib' 'python-pyqt5')
 makedepends=('git')
-source=("git+https://github.com/linuxdeepin/dae.git#tag=$pkgver")
-sha256sums=('SKIP')
+source=("git+https://github.com/linuxdeepin/dae.git#tag=$pkgver"
+        python3.5.patch)
+sha256sums=('SKIP'
+            '901f388e2ec29f4f54ef8e71e6db8d879577d129efca27d8e5cd0d8b1b8c9954')
 
-build(){
+prepare() {
   cd dae
+  # FS#52126 & https://cr.deepin.io/#/c/18253/
+  patch -p1 -i ../python3.5.patch
+}
+
+build() {
+  cd dae
   python setup.py build
 }
 

Added: python3.5.patch
===================================================================
--- python3.5.patch	                        (rev 0)
+++ python3.5.patch	2016-12-12 14:57:59 UTC (rev 199026)
@@ -0,0 +1,47 @@
+commit 350848717ee19b439ac51efd6d9dc2c88769ec3b
+Author: Felix Yan <felixonmars at archlinux.org>
+Date:   Mon Dec 12 22:52:53 2016 +0800
+
+    Explicitly convert property_content to bytes
+    
+    property_content being an instance of `str` fails with Python 3.5:
+    
+    ```
+      File "/usr/lib/python3.5/site-packages/dae/daeclient.py", line 81, in __init__
+        self.window = Window(None, index_path)
+      File "/usr/lib/python3.5/site-packages/dae/window.py", line 59, in __init__
+        super(Window, self).__init__(parent if isDialog else None)
+      File "/usr/lib/python3.5/site-packages/dae/shadowwindow.py", line 41, in __init__
+        self.setShadowWidth(10)
+      File "/usr/lib/python3.5/site-packages/dae/shadowwindow.py", line 60, in setShadowWidth
+        xutils.show_shadow(xutils.get_xwindow(int(self.winId())), str(width))
+      File "/usr/lib/python3.5/site-packages/dae/xutils.py", line 32, in show_shadow
+        ewmh.setXWindowProperty(xwin, "DEEPIN_WINDOW_SHADOW", str(shadow_width))
+      File "/usr/lib/python3.5/site-packages/dae/ewmh.py", line 119, in setXWindowProperty
+        property_content,
+      File "/usr/lib/python3.5/site-packages/Xlib/xobject/drawable.py", line 436, in change_property
+        data = (format, data))
+      File "/usr/lib/python3.5/site-packages/Xlib/protocol/rq.py", line 1338, in __init__
+        self._binary = self._request.to_binary(*args, **keys)
+      File "/usr/lib/python3.5/site-packages/Xlib/protocol/rq.py", line 1012, in to_binary
+        v, l, fm = f.pack_value(field_args[f.name])
+      File "/usr/lib/python3.5/site-packages/Xlib/protocol/rq.py", line 688, in pack_value
+        data = array(array_unsigned_codes[size], val).tostring()
+    TypeError: cannot use a str to initialize an array with typecode 'B'
+    ```
+    
+    Change-Id: I3e1de284be81a5d0acc622f445364a181115958a
+
+diff --git a/dae/ewmh.py b/dae/ewmh.py
+index df1fc6b..207b93b 100644
+--- a/dae/ewmh.py
++++ b/dae/ewmh.py
+@@ -116,7 +116,7 @@ class EWMH:
+             self.display.get_atom(property_type),
+             Xatom.STRING,
+             8,
+-            property_content,
++            property_content.encode("ascii"),
+             )
+         self.display.sync()
+ 



More information about the arch-commits mailing list