backports/py3-whitenoise: move from user

This commit is contained in:
Antoine Martin 2023-08-30 13:49:58 -04:00
parent 463176a8b4
commit abc5acc54c
2 changed files with 43 additions and 33 deletions

View file

@ -0,0 +1,43 @@
# Contributor: Celeste <cielesti@protonmail.com>
# Maintainer: Celeste <cielesti@protonmail.com>
pkgname=py3-whitenoise
pkgver=6.5.0
pkgrel=0
pkgdesc="Radically simplified static file serving for Python web apps"
url="https://whitenoise.readthedocs.io/"
arch="noarch"
license="MIT"
depends="py3-brotli"
makedepends="
py3-gpep517
py3-setuptools
py3-wheel
"
checkdepends="
py3-django
py3-pytest
py3-requests"
subpackages="$pkgname-pyc"
source="https://github.com/evansd/whitenoise/archive/$pkgver/py3-whitenoise-$pkgver.tar.gz"
builddir="$srcdir/whitenoise-$pkgver"
build() {
gpep517 build-wheel \
--wheel-dir .dist \
--output-fd 3 3>&1 >&2
}
check() {
python3 -m venv --clear --without-pip --system-site-packages .testenv
.testenv/bin/python3 -m installer .dist/*.whl
.testenv/bin/python3 -m pytest
}
package() {
python3 -m installer -d "$pkgdir" \
.dist/*.whl
}
sha512sums="
2fefff9e89e05905ebacc73234a52c1c22f6c4202b354dec11177dd784f45ac6a954061659f5c3344d41a373e3fc8b911830df8a3e51326ec8a2a80d45268315 py3-whitenoise-6.5.0.tar.gz
"

View file

@ -1,33 +0,0 @@
# Maintainer: Antoine Martin (ayakael) <dev@ayakael.net>
# Contributor: Antoine Martin (ayakael) <dev@ayakael.net>
pkgname=py3-whitenoise
_pyname="whitenoise"
pkgver=6.4.0
pkgrel=0
arch="noarch"
pkgdesc="Radically simplified static file serving for WSGI applications"
url="https://pypi.python.org/project/$_pyname"
license="MIT"
depends="python3"
options="!check" # Failing tests
makedepends="py3-installer py3-build py3-setuptools py3-wheel"
checkdepends="py3-pytest py3-django py3-requests py3-brotli"
source="$pkgname-$pkgver.tar.gz::https://pypi.io/packages/source/${_pyname:0:1}/$_pyname/$_pyname-$pkgver.tar.gz"
builddir="$srcdir"/$_pyname-$pkgver
build() {
python -m build -nw
}
check() {
DJANGO_SETTINGS_MODULE=tests.django_settings PYTHONPATH="$PWD"/src pytest
}
package() {
python -m installer --destdir="$pkgdir" dist/*.whl
}
sha512sums="
99605759c9731453f209b3bf9d0f9de6ea767d83070053a36dc45d434420c116e32ecbf2b50734ce2a0374279c36d9cf2390c6b84f2abbeafaae57ef746b5cab py3-whitenoise-6.4.0.tar.gz
"