[arch-commits] Commit in python-txaio/repos (2 files)

Evangelos Foutras foutrelis at archlinux.org
Mon Jul 23 09:02:37 UTC 2018


    Date: Monday, July 23, 2018 @ 09:02:37
  Author: foutrelis
Revision: 362938

archrelease: copy trunk to community-staging-any

Added:
  python-txaio/repos/community-staging-any/
  python-txaio/repos/community-staging-any/PKGBUILD
    (from rev 362937, python-txaio/trunk/PKGBUILD)

----------+
 PKGBUILD |   60 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 60 insertions(+)

Copied: python-txaio/repos/community-staging-any/PKGBUILD (from rev 362937, python-txaio/trunk/PKGBUILD)
===================================================================
--- community-staging-any/PKGBUILD	                        (rev 0)
+++ community-staging-any/PKGBUILD	2018-07-23 09:02:37 UTC (rev 362938)
@@ -0,0 +1,60 @@
+# $Id$
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+# Contributor: Anatol Pomozov
+
+pkgbase=python-txaio
+pkgname=(python-txaio python2-txaio)
+pkgver=2.10.0
+pkgrel=3
+pkgdesc='Compatibility API between asyncio/Twisted/Trollius'
+arch=('any')
+url="https://github.com/crossbario/txaio"
+license=('MIT')
+makedepends=('python-setuptools' 'python2-setuptools')
+checkdepends=('python-pytest' 'python-mock' 'python-twisted' 'python2-pytest' 'python2-mock' 'python2-twisted')
+source=("https://pypi.io/packages/source/t/txaio/txaio-$pkgver.tar.gz")
+sha512sums=('45f85eca04dadc44f47bea0359902965db7c85892303b73d1c227b065965a1e83d8b3e555affcb8b43c6fdbd4d25c8d475d763c8ec8984f3e6fc1ad2befff6c4')
+
+prepare() {
+  # This tests whether pip can install the sdist, and is completely broken
+  # except in their boutique setup. They won't fix it.
+  # https://github.com/crossbario/txaio/issues/77#issuecomment-246276723
+  rm txaio-$pkgver/test/test_packaging.py
+  cp -a txaio-$pkgver{,-py2}
+
+  # Fix tests on Python 3.7 (https://github.com/crossbario/txaio/issues/134)
+  sed -i 's/await/async_wait/' txaio-$pkgver/test/*.py
+  sed -i 's/asyncio\.test_utils/test.test_asyncio.utils/' txaio-$pkgver/test/*.py
+}
+
+build() {
+  cd "$srcdir"/txaio-$pkgver
+  python setup.py build
+
+  cd "$srcdir"/txaio-$pkgver-py2
+  python2 setup.py build
+}
+
+check() {
+  cd "$srcdir"/txaio-$pkgver
+  python -m pytest
+
+  cd "$srcdir"/txaio-$pkgver-py2
+  python2 -m pytest
+}
+
+package_python-txaio() {
+  depends=('python-six')
+
+  cd txaio-$pkgver
+  python setup.py install --root="$pkgdir" --optimize=1
+  install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
+}
+
+package_python2-txaio() {
+  depends=('python2-six')
+
+  cd txaio-$pkgver-py2
+  python2 setup.py install --root="$pkgdir" --optimize=1
+  install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
+}



More information about the arch-commits mailing list