From abc5acc54cfcdc6aa14e2d14059e266fd2b37e1c Mon Sep 17 00:00:00 2001 From: Antoine Martin Date: Wed, 30 Aug 2023 13:49:58 -0400 Subject: [PATCH] backports/py3-whitenoise: move from user --- backports/py3-whitenoise/APKBUILD | 43 +++++++++++++++++++++++++++++++ user/py3-whitenoise/APKBUILD | 33 ------------------------ 2 files changed, 43 insertions(+), 33 deletions(-) create mode 100644 backports/py3-whitenoise/APKBUILD delete mode 100644 user/py3-whitenoise/APKBUILD diff --git a/backports/py3-whitenoise/APKBUILD b/backports/py3-whitenoise/APKBUILD new file mode 100644 index 0000000..3a51759 --- /dev/null +++ b/backports/py3-whitenoise/APKBUILD @@ -0,0 +1,43 @@ +# Contributor: Celeste +# Maintainer: Celeste +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 +" diff --git a/user/py3-whitenoise/APKBUILD b/user/py3-whitenoise/APKBUILD deleted file mode 100644 index 4b4b66a..0000000 --- a/user/py3-whitenoise/APKBUILD +++ /dev/null @@ -1,33 +0,0 @@ -# Maintainer: Antoine Martin (ayakael) -# Contributor: Antoine Martin (ayakael) - -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 -"