[arch-commits] Commit in python-cmd2/trunk (PKGBUILD python-3.5.patch)

Felix Yan fyan at archlinux.org
Mon Mar 7 15:06:15 UTC 2016


    Date: Monday, March 7, 2016 @ 16:06:15
  Author: fyan
Revision: 165516

upgpkg: python-cmd2 0.6.8-2

add an upstream patch to fix an error with python 3.5

Added:
  python-cmd2/trunk/python-3.5.patch
Modified:
  python-cmd2/trunk/PKGBUILD

------------------+
 PKGBUILD         |    9 ++++++---
 python-3.5.patch |   23 +++++++++++++++++++++++
 2 files changed, 29 insertions(+), 3 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2016-03-07 14:22:01 UTC (rev 165515)
+++ PKGBUILD	2016-03-07 15:06:15 UTC (rev 165516)
@@ -6,7 +6,7 @@
 pkgname=(python-cmd2 python2-cmd2)
 pkgver=0.6.8
 _commit=3ed12b6154320d6e3e89c5aace04b7e5ac9bed2c
-pkgrel=1
+pkgrel=2
 pkgdesc="Extra features for standard library's cmd module"
 arch=('any')
 url="https://github.com/python-cmd2/cmd2"
@@ -13,10 +13,13 @@
 license=('MIT')
 makedepends=('git' 'python-setuptools' 'python2-setuptools' 'python-pyparsing' 'python2-pyparsing')
 checkdepends=('python-pytest-runner' 'python2-pytest-runner')
-source=("git+https://github.com/python-cmd2/cmd2.git#commit=$_commit")
-md5sums=('SKIP')
+source=("git+https://github.com/python-cmd2/cmd2.git#commit=$_commit"
+        python-3.5.patch)
+md5sums=('SKIP'
+         'a67eb13a752b55ba755f7fa7f7e954c9')
 
 prepare() {
+  (cd cmd2; patch -p1 -i ../python-3.5.patch)
   cp -a cmd2{,-py2}
 }
 

Added: python-3.5.patch
===================================================================
--- python-3.5.patch	                        (rev 0)
+++ python-3.5.patch	2016-03-07 15:06:15 UTC (rev 165516)
@@ -0,0 +1,23 @@
+From 6ee37b45de8d2a8a1fe9f4db7f7a4b77f216b9ed Mon Sep 17 00:00:00 2001
+From: Hans Lellelid <hans at xmpl.org>
+Date: Thu, 18 Feb 2016 21:49:15 -0500
+Subject: [PATCH] subprocess.mswindows does not exist in python3.5
+
+Am hoping that the sys.platform (https://docs.python.org/2/library/sys.html#sys.platform) check is sufficient, though perhaps there was a reason this was not done initially.
+---
+ cmd2.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/cmd2.py b/cmd2.py
+index 63e422f..4b11958 100755
+--- a/cmd2.py
++++ b/cmd2.py
+@@ -190,7 +190,7 @@ def __init__(self):
+ to be installed on operating system.
+ %s"""
+ 
+-if subprocess.mswindows:
++if sys.platform == "win32":
+     try:
+         import win32clipboard
+         def get_paste_buffer():



More information about the arch-commits mailing list