[arch-commits] Commit in python-django-rest-framework/repos (2 files)

Felix Yan felixonmars at archlinux.org
Tue Nov 10 05:07:58 UTC 2020


    Date: Tuesday, November 10, 2020 @ 05:07:58
  Author: felixonmars
Revision: 749312

archrelease: copy trunk to community-staging-any

Added:
  python-django-rest-framework/repos/community-staging-any/
  python-django-rest-framework/repos/community-staging-any/PKGBUILD
    (from rev 749311, python-django-rest-framework/trunk/PKGBUILD)

----------+
 PKGBUILD |   57 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 57 insertions(+)

Copied: python-django-rest-framework/repos/community-staging-any/PKGBUILD (from rev 749311, python-django-rest-framework/trunk/PKGBUILD)
===================================================================
--- community-staging-any/PKGBUILD	                        (rev 0)
+++ community-staging-any/PKGBUILD	2020-11-10 05:07:58 UTC (rev 749312)
@@ -0,0 +1,57 @@
+# Maintainer: David Runge <dvzrv at archlinux.org>
+
+# weird name on pypi, because reasons
+# _name=djangorestframework
+_name=django-rest-framework
+pkgname=python-django-rest-framework
+pkgver=3.12.2
+pkgrel=2
+pkgdesc="A powerful and flexible toolkit for building Web APIs."
+arch=('any')
+url="https://www.django-rest-framework.org/"
+license=('BSD')
+depends=('python-django')
+makedepends=('python-setuptools')
+checkdepends=('python-pytest' 'python-pytest-django')
+# bootstrap without python-django-filter, as it has a checkdepends on
+# python-django-rest-framework
+optdepends=('python-django-filter: for dynamic queryset filters'
+            'python-django-guardian: for a per-object permission model'
+            'python-markdown: for markdown support'
+            'python-psycopg2: for PostgreSQL support'
+            'python-pygments: for syntax highlighting'
+            'python-yaml: for YAML support')
+# tests not in pypi sdist:
+# https://github.com/encode/django-rest-framework/issues/7141
+# source=("https://files.pythonhosted.org/packages/source/${_name::1}/${_name}/${_name}-${pkgver}.tar.gz")
+source=("${pkgname}-${pkgver}.tar.gz::https://github.com/encode/${_name}/archive/${pkgver}.tar.gz")
+sha512sums=('7c3e712897562eff14ddfa4ded6627d6b4263001e0c9a4047b92da43c0fd86e8ac9d09bb54bb87ce0d4e7743553c4733a60b18327f7e4d481cb9898593731467')
+b2sums=('77d0b3bad38c7829387de752d913eb758935615213d8f8ada9422ecf25142383c1b11a1c95d5fc9f4cf7634e494119ddcb236c810e85429fa8cd4ecd1ef88132')
+
+prepare() {
+  mv -v "${_name}-${pkgver}" "$pkgname-$pkgver"
+  cd "$pkgname-$pkgver"
+  # we do not use coverage during testing
+  sed -e '/addopts/d' -i setup.cfg
+}
+
+build() {
+  cd "$pkgname-$pkgver"
+  python setup.py build
+}
+
+check() {
+  cd "$pkgname-$pkgver"
+  export PYTHONPATH="${PWD}/build:${PYTHONPATH}"
+  pytest -v
+}
+
+package() {
+  cd "$pkgname-$pkgver"
+  export PYTHONHASHSEED=0
+  python setup.py install --skip-build \
+    --optimize=1 \
+    --root="${pkgdir}"
+  install -vDm 644 README.md -t "${pkgdir}/usr/share/doc/${pkgname}"
+  install -vDm 644 LICENSE.md -t "${pkgdir}/usr/share/licenses/${pkgname}"
+}



More information about the arch-commits mailing list