Date: Saturday, October 10, 2015 @ 03:51:18 Author: fyan Revision: 143521
upgpkg: python-pyperclip 1.5.14-1 Added: python-pyperclip/trunk/fix-test_copyUnicode.patch Modified: python-pyperclip/trunk/PKGBUILD Deleted: python-pyperclip/trunk/LICENSE.txt ----------------------------+ LICENSE.txt | 27 --------------------------- PKGBUILD | 30 ++++++++++++++++-------------- fix-test_copyUnicode.patch | 37 +++++++++++++++++++++++++++++++++++++ 3 files changed, 53 insertions(+), 41 deletions(-) Deleted: LICENSE.txt =================================================================== --- LICENSE.txt 2015-10-10 01:20:01 UTC (rev 143520) +++ LICENSE.txt 2015-10-10 01:51:18 UTC (rev 143521) @@ -1,27 +0,0 @@ -Copyright (c) 2014, Al Sweigart -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -* Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - -* Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -* Neither the name of the {organization} nor the names of its - contributors may be used to endorse or promote products derived from - this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. Modified: PKGBUILD =================================================================== --- PKGBUILD 2015-10-10 01:20:01 UTC (rev 143520) +++ PKGBUILD 2015-10-10 01:51:18 UTC (rev 143521) @@ -6,28 +6,30 @@ pkgbase=python-pyperclip pkgname=('python-pyperclip' 'python2-pyperclip') _pypiname=pyperclip -pkgver=1.5.13 +pkgver=1.5.14 +_commit=43a8668987165f82d95c95ed57adf7c59f94a92c pkgrel=1 pkgdesc="A cross-platform clipboard module for Python" arch=('any') -url="http://coffeeghost.net/2010/10/09/pyperclip-a-cross-platform-clipboard-module-for-python/" +url="https://github.com/asweigart/pyperclip" license=('BSD') -makedepends=('python-setuptools' 'python2-setuptools' 'xclip') +makedepends=('python-setuptools' 'python2-setuptools' 'xclip' 'git') checkdepends=('xorg-server-xvfb') -source=("https://pypi.python.org/packages/source/p/$_pypiname/$_pypiname-$pkgver.zip" - LICENSE.txt) -md5sums=('ad66fbf747e9ccf68d7fb14390744242' - 'b6cd06fd72984ac1f8428337aec8cff7') +source=("git+https://github.com/asweigart/pyperclip.git#commit=$_commit" + fix-test_copyUnicode.patch) +md5sums=('SKIP' + '473ee868530cc1d6e579f9df63085588') prepare() { - cp -a $_pypiname-$pkgver{,-py2} + (cd $_pypiname; git apply ../fix-test_copyUnicode.patch) + cp -a $_pypiname{,-py2} } check() { - cd "$srcdir/$_pypiname-$pkgver" + cd "$srcdir/$_pypiname" xvfb-run python tests/basicTests.py - cd "$srcdir/$_pypiname-$pkgver-py2" + cd "$srcdir/$_pypiname-py2" xvfb-run python2 tests/basicTests.py } @@ -34,17 +36,17 @@ package_python-pyperclip() { depends=('python' 'xclip') - cd "$srcdir/$_pypiname-$pkgver" + cd "$srcdir/$_pypiname" python setup.py install --root="$pkgdir" --optimize=1 - install -Dm644 ../LICENSE.txt "$pkgdir/usr/share/licenses/$pkgname/LICENSE.txt" + install -Dm644 LICENSE.txt "$pkgdir/usr/share/licenses/$pkgname/LICENSE.txt" } package_python2-pyperclip() { depends=('python2' 'xclip') - cd "$srcdir/$_pypiname-$pkgver-py2" + cd "$srcdir/$_pypiname-py2" python2 setup.py install --root="$pkgdir" --optimize=1 - install -Dm644 ../LICENSE.txt "$pkgdir/usr/share/licenses/$pkgname/LICENSE.txt" + install -Dm644 LICENSE.txt "$pkgdir/usr/share/licenses/$pkgname/LICENSE.txt" } # vim:set ts=2 sw=2 et: Added: fix-test_copyUnicode.patch =================================================================== --- fix-test_copyUnicode.patch (rev 0) +++ fix-test_copyUnicode.patch 2015-10-10 01:51:18 UTC (rev 143521) @@ -0,0 +1,37 @@ +commit dbd1d58ba6c350db3aa7d154e9a940d835ee52a4 +Author: Felix Yan <felixonm...@archlinux.org> +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 ab2b6df..1c3ec66 100644 +--- a/pyperclip/__init__.py ++++ b/pyperclip/__init__.py +@@ -113,6 +113,8 @@ def _copyQt(text): + + + def _copyXclip(text): ++ if not isinstance(text, text_type): ++ 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(): + + + def _copyXsel(text): ++ if not isinstance(text, text_type): ++ 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') + + def _copyKlipper(text): ++ if not isinstance(text, text_type): ++ text = text.decode('utf-8') + p = Popen(['qdbus', 'org.kde.klipper', '/klipper', + 'setClipboardContents', text.encode('utf-8')], + stdin=PIPE, close_fds=True)