[arch-commits] Commit in python-mongoengine/repos (2 files)
Evangelos Foutras
foutrelis at archlinux.org
Sat Oct 26 20:23:36 UTC 2019
Date: Saturday, October 26, 2019 @ 20:23:36
Author: foutrelis
Revision: 520498
archrelease: copy trunk to community-staging-any
Added:
python-mongoengine/repos/community-staging-any/
python-mongoengine/repos/community-staging-any/PKGBUILD
(from rev 520497, python-mongoengine/trunk/PKGBUILD)
----------+
PKGBUILD | 62 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 62 insertions(+)
Copied: python-mongoengine/repos/community-staging-any/PKGBUILD (from rev 520497, python-mongoengine/trunk/PKGBUILD)
===================================================================
--- community-staging-any/PKGBUILD (rev 0)
+++ community-staging-any/PKGBUILD 2019-10-26 20:23:36 UTC (rev 520498)
@@ -0,0 +1,62 @@
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+# Contributor: Simon Sapin <simon dot sapin at exyr dot org>
+# Contributor: Kyle Keen <keenerd at gmail.com>
+
+pkgbase=python-mongoengine
+pkgname=(python-mongoengine python2-mongoengine)
+pkgver=0.18.2
+pkgrel=2
+pkgdesc="A Python Object-Document-Mapper for working with MongoDB"
+url="https://github.com/MongoEngine/mongoengine"
+license=('MIT')
+arch=('any')
+makedepends=('python-setuptools' 'python2-setuptools' 'python-pymongo' 'python2-pymongo')
+checkdepends=('python-nose' 'python2-nose' 'python-coverage' 'python2-coverage'
+ 'python-blinker' 'python2-blinker' 'python-pillow' 'python2-pillow'
+ 'python-mongomock' 'python2-mongomock')
+source=("$pkgbase-$pkgver.tar.gz::https://github.com/MongoEngine/mongoengine/archive/v$pkgver.tar.gz")
+sha512sums=('36b2c58bf005b3b04abc7c04d30ecb4bcecbd38f6418e95768eb1bbe5084b8c75288b19553808c951e45285434f1d9e0136dc473f3e0d604a19ef9de6809f6a8')
+
+prepare() {
+ sed -i 's/coverage==/coverage>=/' mongoengine-$pkgver/setup.py
+ sed -e 's|mongodb://|mongomock://|g' \
+ -e "s|connect(db='mongoenginetest')|connect(db='mongoenginetest', is_mock=True)|" \
+ -i mongoengine-$pkgver/tests/*.py mongoengine-$pkgver/tests/*/*.py
+ cp -a mongoengine-$pkgver{,-py2}
+}
+
+build() {
+ cd "$srcdir"/mongoengine-$pkgver
+ python setup.py build
+
+ cd "$srcdir"/mongoengine-$pkgver-py2
+ python2 setup.py build
+}
+
+check() {
+ cd "$srcdir"/mongoengine-$pkgver
+ python setup.py nosetests || warning "Tests failed"
+
+ cd "$srcdir"/mongoengine-$pkgver-py2
+ python2 setup.py nosetests || warning "Tests failed"
+}
+
+package_python-mongoengine() {
+ depends=('python-pymongo' 'python-six')
+ optdepends=('python-dateutil: for DateTimeField'
+ 'python-pillow: for ImageField / ImageGridFsProxy')
+
+ cd mongoengine-$pkgver
+ python setup.py install --root="$pkgdir" --optimize=1
+ install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
+}
+
+package_python2-mongoengine() {
+ depends=('python2-pymongo' 'python2-six')
+ optdepends=('python2-dateutil: for DateTimeField'
+ 'python2-pillow: for ImageField / ImageGridFsProxy')
+
+ cd mongoengine-$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