[arch-commits] Commit in python-pyperclip/trunk (PKGBUILD fix-test_copyUnicode.patch)

2015-10-30 Thread Felix Yan
Date: Saturday, October 31, 2015 @ 06:38:24
  Author: fyan
Revision: 145347

upgpkg: python-pyperclip 1.5.20-1

Modified:
  python-pyperclip/trunk/PKGBUILD
Deleted:
  python-pyperclip/trunk/fix-test_copyUnicode.patch

+
 PKGBUILD   |   35 +--
 fix-test_copyUnicode.patch |   37 -
 2 files changed, 21 insertions(+), 51 deletions(-)

Modified: PKGBUILD
===
--- PKGBUILD2015-10-31 05:34:21 UTC (rev 145346)
+++ PKGBUILD2015-10-31 05:38:24 UTC (rev 145347)
@@ -6,36 +6,38 @@
 pkgbase=python-pyperclip
 pkgname=('python-pyperclip' 'python2-pyperclip')
 _pypiname=pyperclip
-pkgver=1.5.19
-_commit=74ebe1f0bf8f05add1590ebe58e60e27b620461d
+pkgver=1.5.20
+_commit=6f8f6510f2b5fcab0deb148abc1280abed79892b
 pkgrel=1
 pkgdesc="A cross-platform clipboard module for Python"
 arch=('any')
 url="https://github.com/asweigart/pyperclip;
 license=('BSD')
-makedepends=('python-setuptools' 'python2-setuptools' 'xclip' 'git')
-checkdepends=('xorg-server-xvfb')
-source=("git+https://github.com/asweigart/pyperclip.git#commit=$_commit;
-fix-test_copyUnicode.patch)
-md5sums=('SKIP'
- '40675a4461359c8e2c22ee4bd240d76c')
+makedepends=('python-setuptools' 'python2-setuptools' 'git')
+# GTK/Qt tests crash xvfb, and Klipper tests require a running klipper
+checkdepends=('xorg-server-xvfb' 'python-pytest' 'python2-pytest'
+  'xsel' 'xclip')
+source=("git+https://github.com/asweigart/pyperclip.git#commit=$_commit;)
+md5sums=('SKIP')
 
 prepare() {
-  # https://github.com/asweigart/pyperclip/pull/28
-  (cd $_pypiname; patch -p1 -i ../fix-test_copyUnicode.patch)
   cp -a $_pypiname{,-py2}
 }
 
 check() {
   cd "$srcdir/$_pypiname"
-  xvfb-run python tests/basicTests.py
+  PYTHONPATH="$PWD/build/lib:$PYTHONPATH" xvfb-run py.test
 
   cd "$srcdir/$_pypiname-py2"
-  xvfb-run python2 tests/basicTests.py
+  PYTHONPATH="$PWD/build/lib:$PYTHONPATH" xvfb-run py.test2
 }
 
 package_python-pyperclip() {
-  depends=('python' 'xclip')
+  depends=('python')
+  optdepends=('xclip: xclip backend'
+  'xsel: xsel backend'
+  'python-pyqt4: qt backend'
+  'plasma-workspace: klipper backend')
 
   cd "$srcdir/$_pypiname"
   python setup.py install --root="$pkgdir" --optimize=1
@@ -43,7 +45,12 @@
 }
 
 package_python2-pyperclip() {
-  depends=('python2' 'xclip')
+  depends=('python2')
+  optdepends=('xclip: xclip backend'
+  'xsel: xsel backend'
+  'python2-pyqt4: qt backend'
+  'plasma-workspace: klipper backend'
+  'pygtk: gtk backend')
 
   cd "$srcdir/$_pypiname-py2"
   python2 setup.py install --root="$pkgdir" --optimize=1

Deleted: fix-test_copyUnicode.patch
===
--- fix-test_copyUnicode.patch  2015-10-31 05:34:21 UTC (rev 145346)
+++ fix-test_copyUnicode.patch  2015-10-31 05:38:24 UTC (rev 145347)
@@ -1,37 +0,0 @@
-commit 8da536e515f71a2caf2256b4d936851da0ce2bcf
-Author: Felix Yan 
-Date:   Sat Oct 10 09:34:35 2015 +0800
-
-Fix test_copyUnicode under PyPy
-
-diff --git a/pyperclip/__init__.py b/pyperclip/__init__.py
-index 9c12381..e475b95 100644
 a/pyperclip/__init__.py
-+++ b/pyperclip/__init__.py
-@@ -141,6 +141,8 @@ def _copyQt(text):
- 
- 
- def _copyXclip(text):
-+if not isinstance(text, STRING_FUNCTION):
-+text = text.decode('utf-8')
- p = Popen(['xclip', '-selection', 'c'], stdin=PIPE, close_fds=True)
- p.communicate(input=text.encode('utf-8'))
- 
-@@ -152,6 +154,8 @@ def _pasteXclip():
- 
- 
- def _copyXsel(text):
-+if not isinstance(text, STRING_FUNCTION):
-+text = text.decode('utf-8')
- p = Popen(['xsel', '-b', '-i'], stdin=PIPE, close_fds=True)
- p.communicate(input=text.encode('utf-8'))
- 
-@@ -163,6 +167,8 @@ def _pasteXsel():
- 
- 
- def _copyKlipper(text):
-+if not isinstance(text, STRING_FUNCTION):
-+text = text.decode('utf-8')
- p = Popen(['qdbus', 'org.kde.klipper', '/klipper',
- 'setClipboardContents', text.encode('utf-8')],
-  stdin=PIPE, close_fds=True)


[arch-commits] Commit in python-pyperclip/trunk (PKGBUILD fix-test_copyUnicode.patch)

2015-10-28 Thread Felix Yan
Date: Thursday, October 29, 2015 @ 03:21:17
  Author: fyan
Revision: 145209

upgpkg: python-pyperclip 1.5.17.20151029-1

Modified:
  python-pyperclip/trunk/PKGBUILD
  python-pyperclip/trunk/fix-test_copyUnicode.patch

+
 PKGBUILD   |9 +
 fix-test_copyUnicode.patch |   18 +-
 2 files changed, 14 insertions(+), 13 deletions(-)

Modified: PKGBUILD
===
--- PKGBUILD2015-10-29 02:04:32 UTC (rev 145208)
+++ PKGBUILD2015-10-29 02:21:17 UTC (rev 145209)
@@ -6,8 +6,8 @@
 pkgbase=python-pyperclip
 pkgname=('python-pyperclip' 'python2-pyperclip')
 _pypiname=pyperclip
-pkgver=1.5.15
-_commit=c57ed8ea81d5658b88f5e4dbe35938bb8be1da53
+pkgver=1.5.17.20151029
+_commit=07b90a4e082b46d868c3297188e7ad664fbc6e1e
 pkgrel=1
 pkgdesc="A cross-platform clipboard module for Python"
 arch=('any')
@@ -18,10 +18,11 @@
 source=("git+https://github.com/asweigart/pyperclip.git#commit=$_commit;
 fix-test_copyUnicode.patch)
 md5sums=('SKIP'
- '473ee868530cc1d6e579f9df63085588')
+ '40675a4461359c8e2c22ee4bd240d76c')
 
 prepare() {
-  (cd $_pypiname; git apply ../fix-test_copyUnicode.patch)
+  # https://github.com/asweigart/pyperclip/pull/28
+  (cd $_pypiname; patch -p1 -i ../fix-test_copyUnicode.patch)
   cp -a $_pypiname{,-py2}
 }
 

Modified: fix-test_copyUnicode.patch
===
--- fix-test_copyUnicode.patch  2015-10-29 02:04:32 UTC (rev 145208)
+++ fix-test_copyUnicode.patch  2015-10-29 02:21:17 UTC (rev 145209)
@@ -1,4 +1,4 @@
-commit dbd1d58ba6c350db3aa7d154e9a940d835ee52a4
+commit 8da536e515f71a2caf2256b4d936851da0ce2bcf
 Author: Felix Yan 
 Date:   Sat Oct 10 09:34:35 2015 +0800
 
@@ -5,32 +5,32 @@
 Fix test_copyUnicode under PyPy
 
 diff --git a/pyperclip/__init__.py b/pyperclip/__init__.py
-index ab2b6df..1c3ec66 100644
+index 9c12381..e475b95 100644
 --- a/pyperclip/__init__.py
 +++ b/pyperclip/__init__.py
-@@ -113,6 +113,8 @@ def _copyQt(text):
+@@ -141,6 +141,8 @@ def _copyQt(text):
  
  
  def _copyXclip(text):
-+if not isinstance(text, text_type):
++if not isinstance(text, STRING_FUNCTION):
 +text = text.decode('utf-8')
  p = Popen(['xclip', '-selection', 'c'], stdin=PIPE, close_fds=True)
  p.communicate(input=text.encode('utf-8'))
  
-@@ -124,6 +126,8 @@ def _pasteXclip():
+@@ -152,6 +154,8 @@ def _pasteXclip():
  
  
  def _copyXsel(text):
-+if not isinstance(text, text_type):
++if not isinstance(text, STRING_FUNCTION):
 +text = text.decode('utf-8')
  p = Popen(['xsel', '-b', '-i'], stdin=PIPE, close_fds=True)
  p.communicate(input=text.encode('utf-8'))
  
-@@ -134,6 +138,8 @@ def _pasteXsel():
- return stdout.decode('utf-8')
+@@ -163,6 +167,8 @@ def _pasteXsel():
  
+ 
  def _copyKlipper(text):
-+if not isinstance(text, text_type):
++if not isinstance(text, STRING_FUNCTION):
 +text = text.decode('utf-8')
  p = Popen(['qdbus', 'org.kde.klipper', '/klipper',
  'setClipboardContents', text.encode('utf-8')],