From 4aec78a3b8e8ee3b5766fa6ba39a4eb07a173a74 Mon Sep 17 00:00:00 2001 From: Antoine Martin Date: Mon, 10 Jun 2024 10:14:54 -0400 Subject: [PATCH] user/py3-django-rest-framework: fix to version 3.14.0 --- user/py3-django-rest-framework/APKBUILD | 59 +++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 user/py3-django-rest-framework/APKBUILD diff --git a/user/py3-django-rest-framework/APKBUILD b/user/py3-django-rest-framework/APKBUILD new file mode 100644 index 0000000..4a82cb3 --- /dev/null +++ b/user/py3-django-rest-framework/APKBUILD @@ -0,0 +1,59 @@ +# Contributor: Leonardo Arena +# Contributor: Justin Berthault +# Maintainer: Antoine Martin (ayakael) +pkgname=py3-django-rest-framework +_pkgname=django-rest-framework +pkgver=3.14.0 +pkgrel=0 +pkgdesc="Web APIs for Django" +url="https://github.com/encode/django-rest-framework" +arch="noarch" +license="Custom" +depends=" + py3-django + py3-tz +" +makedepends=" + py3-setuptools + py3-gpep517 + py3-wheel +" +checkdepends=" + py3-pytest-django + py3-pytest-cov + py3-core-api + py3-jinja2 + py3-uritemplate + py3-django-guardian + py3-psycopg2 + py3-markdown + py3-yaml + py3-inflection +" +subpackages="$pkgname-pyc" +source="$pkgname-$pkgver.tar.gz::https://github.com/encode/$_pkgname/archive/$pkgver.tar.gz" +options="!check" # Failing tests +builddir="$srcdir"/$_pkgname-$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 "$builddir"/.dist/*.whl + # test_urlpatterns: AssertionError: assert [] is not [] + # test_markdown: rather hard to decipher assertion error + .testenv/bin/python3 -m pytest -v -k 'not test_urlpatterns and not test_markdown' +} + +package() { + python3 -m installer -d "$pkgdir" \ + .dist/*.whl +} + +sha512sums=" +c1012c656b427e0318b2056e2f984ddc75a5b4e85f375c76fba165ad06e285848eee1bc6dc76c097daec57d780efb2551110199d62ce636a03951aec13ab4013 py3-django-rest-framework-3.14.0.tar.gz +"