[arch-commits] Commit in python-factory-boy/trunk (PKGBUILD python3.7.patch)
Felix Yan
felixonmars at archlinux.org
Sat May 25 04:21:35 UTC 2019
Date: Saturday, May 25, 2019 @ 04:21:35
Author: felixonmars
Revision: 469698
upgpkg: python-factory-boy 2.12.0-1
Modified:
python-factory-boy/trunk/PKGBUILD
Deleted:
python-factory-boy/trunk/python3.7.patch
-----------------+
PKGBUILD | 53 +++++++++++++++++------------------------------------
python3.7.patch | 16 ----------------
2 files changed, 17 insertions(+), 52 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2019-05-25 04:17:10 UTC (rev 469697)
+++ PKGBUILD 2019-05-25 04:21:35 UTC (rev 469698)
@@ -2,57 +2,38 @@
# Contributor: Simon Sapin <simon dot sapin at exyr dot org>
# Contributor: Kyle Keen <keenerd at gmail.com>
-pkgbase=python-factory-boy
-pkgname=(python-factory-boy python2-factory-boy)
-pkgver=2.11.1
-pkgrel=2
+pkgname=python-factory-boy
+pkgver=2.12.0
+pkgrel=1
pkgdesc="A versatile test fixtures replacement based on thoughtbot's factory_bot for Ruby"
-url="https://github.com/FactoryBoy/factory-boy"
+url="https://github.com/FactoryBoy/factory_boy"
license=('MIT')
arch=('any')
-makedepends=('python-setuptools' 'python2-setuptools' 'python-faker' 'python2-faker')
-checkdepends=('python-pytest-runner' 'python2-pytest-runner' 'python-flask' 'python2-flask'
- 'python-django' 'python2-django' 'python-sqlalchemy' 'python2-sqlalchemy'
- 'python-flask-sqlalchemy' 'python2-flask-sqlalchemy' 'python-mongoengine'
- 'python2-mongoengine' 'python2-mock' 'mongodb' 'pifpaf')
-source=("$pkgbase-$pkgver.tar.gz::https://github.com/FactoryBoy/factory_boy/archive/$pkgver.tar.gz"
- python3.7.patch)
-sha512sums=('f2a0856212bb47f29007a9ec52af129c63a0546f3d4eb733ce42eb285cad4eecabfd917badb18b723e2ee653c09422328413a3eb38b1cad53e4e538a7baffbc2'
- '937f3185c48a593b957745d4ba540427fcf6d8ee604f6198b5c7a07caa3d5cad5abbc516dcc5a795b634373612c0fcc31d806f635c405a77db8cf32afaa2cb98')
+depends=('python-faker')
+makedepends=('python-setuptools')
+checkdepends=('python-pytest-runner' 'python-flask' 'python-django' 'python-sqlalchemy'
+ 'python-flask-sqlalchemy' 'python-mongoengine' 'python-mongomock')
+source=("$pkgname-$pkgver.tar.gz::https://github.com/FactoryBoy/factory_boy/archive/$pkgver.tar.gz")
+sha512sums=('33236bc02d5331998bb210af498bea46fc9540e66af32db8fdab563193b7ae8870e7cc01c93c24a03ee23ba64bac6ca27a72bb51a264d1c7b6bf9b098c65d5d2')
prepare() {
- (cd factory_boy-$pkgver; patch -p1 -i ../python3.7.patch)
- cp -a factory_boy-$pkgver{,-py2}
+ cd factory_boy-$pkgver
+ # Use mongomock
+ sed -i '/serverselectiontimeoutms/a is_mock=True' tests/test_mongoengine.py
}
build() {
- cd "$srcdir"/factory_boy-$pkgver
+ cd factory_boy-$pkgver
python setup.py build
-
- cd "$srcdir"/factory_boy-$pkgver-py2
- python2 setup.py build
}
check() {
- cd "$srcdir"/factory_boy-$pkgver
- pifpaf run mongodb --port 27017 python setup.py pytest || warning "Tests failed"
-
- cd "$srcdir"/factory_boy-$pkgver-py2
- pifpaf run mongodb --port 27017 python2 setup.py pytest || warning "Tests failed"
+ cd factory_boy-$pkgver
+ python setup.py pytest
}
-package_python-factory-boy() {
- depends=('python-faker')
-
+package() {
cd factory_boy-$pkgver
python setup.py install --root="$pkgdir" --optimize=1
install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
}
-
-package_python2-factory-boy() {
- depends=('python2-faker')
-
- cd factory_boy-$pkgver-py2
- python2 setup.py install --root="$pkgdir" --optimize=1
- install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
-}
Deleted: python3.7.patch
===================================================================
--- python3.7.patch 2019-05-25 04:17:10 UTC (rev 469697)
+++ python3.7.patch 2019-05-25 04:21:35 UTC (rev 469698)
@@ -1,16 +0,0 @@
-diff --git a/factory/utils.py b/factory/utils.py
-index 75f352b..b0407e8 100644
---- a/factory/utils.py
-+++ b/factory/utils.py
-@@ -133,7 +133,10 @@ class ResetableIterator(object):
- if self.next_elements:
- yield self.next_elements.popleft()
- else:
-- value = next(self.iterator)
-+ try:
-+ value = next(self.iterator)
-+ except StopIteration:
-+ return
- self.past_elements.append(value)
- yield value
-
More information about the arch-commits
mailing list