Date: Thursday, July 12, 2018 @ 20:35:54 Author: felixonmars Revision: 358192
archrelease: copy trunk to community-staging-any Added: python-whitenoise/repos/community-staging-any/ python-whitenoise/repos/community-staging-any/PKGBUILD (from rev 358191, python-whitenoise/trunk/PKGBUILD) ----------+ PKGBUILD | 56 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) Copied: python-whitenoise/repos/community-staging-any/PKGBUILD (from rev 358191, python-whitenoise/trunk/PKGBUILD) =================================================================== --- community-staging-any/PKGBUILD (rev 0) +++ community-staging-any/PKGBUILD 2018-07-12 20:35:54 UTC (rev 358192) @@ -0,0 +1,56 @@ +# $Id$ +# Maintainer: Felix Yan <felixonm...@archlinux.org> + +pkgbase=python-whitenoise +pkgname=('python-whitenoise' 'python2-whitenoise') +pkgver=3.3.1 +pkgrel=2 +pkgdesc='Radically simplified static file serving for WSGI applications' +arch=('any') +license=('MIT') +url='http://whitenoise.evans.io' +makedepends=('python-setuptools' 'python2-setuptools') +checkdepends=('python-pytest-runner' 'python2-pytest-runner' 'python-django' 'python2-django' + 'python-requests' 'python2-requests' 'python-brotli' 'python2-brotli') +source=("$pkgbase-$pkgver.tar.gz::https://github.com/evansd/whitenoise/archive/v$pkgver.tar.gz") +sha512sums=('26a053d9235da45dea0ab567e5152f6a345e3d4bf10d1b8149b629b3bfaeaab42cc82fd8c41667e4b5f2c8c1cc73ddb9b5b58c22c84696f7b090088184b2d29b') + +prepare() { + cp -a whitenoise-$pkgver{,-py2} +} + +build() { + cd "$srcdir"/whitenoise-$pkgver + python setup.py build + + cd "$srcdir"/whitenoise-$pkgver-py2 + python2 setup.py build +} + +check() { + export DJANGO_SETTINGS_MODULE=tests.django_settings + + cd "$srcdir"/whitenoise-$pkgver + python setup.py pytest + + cd "$srcdir"/whitenoise-$pkgver-py2 + python2 setup.py pytest +} + +package_python-whitenoise() { + depends=('python') + + cd whitenoise-$pkgver + python setup.py install --root="$pkgdir" --optimize=1 + install -D -m644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE +} + +package_python2-whitenoise() { + depends=('python2') + + cd whitenoise-$pkgver-py2 + python2 setup.py install --root="$pkgdir" --optimize=1 + install -D -m644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE +} + +# vim:set ts=2 sw=2 et: