[arch-commits] Commit in python-txaio/repos/community-staging-any (3 files)
Felix Yan
felixonmars at archlinux.org
Thu Oct 31 19:27:43 UTC 2019
Date: Thursday, October 31, 2019 @ 19:27:43
Author: felixonmars
Revision: 521696
archrelease: copy trunk to community-staging-any
Added:
python-txaio/repos/community-staging-any/PKGBUILD
(from rev 521695, python-txaio/trunk/PKGBUILD)
python-txaio/repos/community-staging-any/make-pytest-happy.patch
(from rev 521695, python-txaio/trunk/make-pytest-happy.patch)
Deleted:
python-txaio/repos/community-staging-any/PKGBUILD
-------------------------+
PKGBUILD | 122 ++++++++++++++++++++++++----------------------
make-pytest-happy.patch | 47 +++++++++++++++++
2 files changed, 111 insertions(+), 58 deletions(-)
Deleted: PKGBUILD
===================================================================
--- PKGBUILD 2019-10-31 19:27:29 UTC (rev 521695)
+++ PKGBUILD 2019-10-31 19:27:43 UTC (rev 521696)
@@ -1,58 +0,0 @@
-# Maintainer: Felix Yan <felixonmars at archlinux.org>
-# Contributor: Anatol Pomozov
-
-pkgbase=python-txaio
-pkgname=(python-txaio python2-txaio)
-pkgver=18.8.1
-pkgrel=2
-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=('5aa0024b32211534b0c673da13b092ba08e15195b3b016bc21104618605d5c0b49096fa2795e13d9d5c4247defa1d72f903cbcc8d00a21359825224faab64b64')
-
-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/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
-}
Copied: python-txaio/repos/community-staging-any/PKGBUILD (from rev 521695, python-txaio/trunk/PKGBUILD)
===================================================================
--- PKGBUILD (rev 0)
+++ PKGBUILD 2019-10-31 19:27:43 UTC (rev 521696)
@@ -0,0 +1,64 @@
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+# Contributor: Anatol Pomozov
+
+pkgbase=python-txaio
+pkgname=(python-txaio python2-txaio)
+pkgver=18.8.1
+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"
+ 'make-pytest-happy.patch')
+sha512sums=('5aa0024b32211534b0c673da13b092ba08e15195b3b016bc21104618605d5c0b49096fa2795e13d9d5c4247defa1d72f903cbcc8d00a21359825224faab64b64'
+ 'bc78ad2ba52d8cd9eb8a2743be93b88b3e162ede50e848e16a7db60f9c0a47115cd8fa92f4151c1d8377852524c07483a18d3d38e349347538a7bde1c56afe27')
+
+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
+
+ # https://github.com/crossbario/txaio/issues/140
+ patch -Np1 -d txaio-$pkgver <make-pytest-happy.patch
+
+ cp -a txaio-$pkgver{,-py2}
+
+ # Fix tests on Python 3.7 (https://github.com/crossbario/txaio/issues/134)
+ 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
+}
Copied: python-txaio/repos/community-staging-any/make-pytest-happy.patch (from rev 521695, python-txaio/trunk/make-pytest-happy.patch)
===================================================================
--- make-pytest-happy.patch (rev 0)
+++ make-pytest-happy.patch 2019-10-31 19:27:43 UTC (rev 521696)
@@ -0,0 +1,47 @@
+From 9217f054b7eccc120f84e01995479125e07de59a Mon Sep 17 00:00:00 2001
+From: meejah <meejah at meejah.ca>
+Date: Fri, 22 Feb 2019 12:01:46 -0700
+Subject: [PATCH] make pytest happy
+
+---
+ test/conftest.py | 12 ++++++++++--
+ 1 file changed, 10 insertions(+), 2 deletions(-)
+
+diff --git a/test/conftest.py b/test/conftest.py
+index 4a225c8..a3ca2d6 100644
+--- a/test/conftest.py
++++ b/test/conftest.py
+@@ -25,9 +25,9 @@ def framework(request):
+
+ try:
+ if request.param == 'twisted':
+- return framework_tx()
++ return _notfixture_framework_tx()
+ elif request.param == 'asyncio':
+- return framework_aio()
++ return _notfixture_framework_aio()
+ except ImportError:
+ pytest.skip()
+
+@@ -43,6 +43,10 @@ def framework_uninitialized():
+
+ @pytest.fixture
+ def framework_tx():
++ return _notfixture_framework_tx()
++
++
++def _notfixture_framework_tx():
+ try:
+ import txaio
+ from txaio import tx
+@@ -56,6 +60,10 @@ def framework_tx():
+
+ @pytest.fixture
+ def framework_aio():
++ return _notfixture_framework_aio()
++
++
++def _notfixture_framework_aio():
+ try:
+ import txaio
+ from txaio import aio
More information about the arch-commits
mailing list