[arch-commits] Commit in python-freezegun/repos (2 files)
Evangelos Foutras
foutrelis at archlinux.org
Sat Oct 26 04:11:55 UTC 2019
Date: Saturday, October 26, 2019 @ 04:11:55
Author: foutrelis
Revision: 519933
archrelease: copy trunk to community-staging-any
Added:
python-freezegun/repos/community-staging-any/
python-freezegun/repos/community-staging-any/PKGBUILD
(from rev 519932, python-freezegun/trunk/PKGBUILD)
----------+
PKGBUILD | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 50 insertions(+)
Copied: python-freezegun/repos/community-staging-any/PKGBUILD (from rev 519932, python-freezegun/trunk/PKGBUILD)
===================================================================
--- community-staging-any/PKGBUILD (rev 0)
+++ community-staging-any/PKGBUILD 2019-10-26 04:11:55 UTC (rev 519933)
@@ -0,0 +1,50 @@
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+
+pkgbase=python-freezegun
+pkgname=('python-freezegun' 'python2-freezegun')
+pkgver=0.3.12
+pkgrel=2
+pkgdesc="Let your Python tests travel through time"
+arch=('any')
+license=('Apache')
+url="https://github.com/spulec/freezegun"
+makedepends=('python-setuptools' 'python2-setuptools' 'python-dateutil' 'python2-dateutil')
+checkdepends=('python-pytest' 'python2-pytest' 'python-mock' 'python2-mock'
+ 'python-coverage' 'python2-coverage' 'python-dateutil' 'python2-dateutil')
+source=("$pkgbase-$pkgver.tar.gz::https://github.com/spulec/freezegun/archive/$pkgver.tar.gz")
+sha512sums=('175025bb4a58de253e5c4f896fc7f5c0b18bdb4656d7e6bc54f9fa84f88cbbc527553e36b7cac129b83222737ff81c62f7677f7f9c63cc24bd3cf03f1087497e')
+
+prepare() {
+ cp -a freezegun-$pkgver{,-py2}
+}
+
+build() {
+ cd "$srcdir"/freezegun-$pkgver
+ python setup.py build
+
+ cd "$srcdir"/freezegun-$pkgver-py2
+ python2 setup.py build
+}
+
+check() {
+ cd "$srcdir"/freezegun-$pkgver
+ # https://github.com/spulec/freezegun/issues/250
+ pytest || warning "Tests failed"
+
+ cd "$srcdir"/freezegun-$pkgver-py2
+ pytest2
+}
+
+package_python-freezegun() {
+ depends=('python-dateutil')
+
+ cd freezegun-$pkgver
+ python setup.py install --root="$pkgdir" --optimize=1
+}
+
+package_python2-freezegun() {
+ depends=('python2-dateutil')
+
+ cd freezegun-$pkgver-py2
+ python2 setup.py install --root="$pkgdir" --optimize=1
+}
More information about the arch-commits
mailing list