archrelease: copy trunk to extra-x86_64
[arch-packages.git] / django / trunk / PKGBUILD
blob3817de238b44acd30a9332e5dcf6d6bae00e712b
1 # Maintainer: Angel Velasquez <angvp@archlinux.org>
2 # Maintainer: Dan McGee <dan@archlinux.org>
3 # Contributor: Shahar Weiss <sweiss4@gmx.net>
5 pkgbase=django
6 pkgname=('python-django')
7 pkgver=3.2.9
8 pkgrel=3
9 pkgdesc="A high-level Python Web framework that encourages rapid development and clean design"
10 arch=('any')
11 license=('BSD')
12 url="http://www.djangoproject.com/"
13 checkdepends=('python-pytest' 'python-tblib')
14 makedepends=('python' 'python-setuptools')
15 depends=('python' 'python-pytz' 'python-sqlparse' 'python-asgiref')
16 # TODO: package and add python-pymemcache https://docs.djangoproject.com/en/dev/topics/cache/
17 optdepends=('python-psycopg2: for PostgreSQL backend'
18             'python-argon2_cffi: for Argon2 password hashing support')
19 source=("Django-$pkgver.tar.gz::https://www.djangoproject.com/download/$pkgver/tarball/")
20 sha512sums=('62fb297694a7f5e48465e102dc97e3d1d04b94499bc6d98d37a00d96b438b8c919b6d08055868a1836d62b89ff65ce4fa7dbc9390789dab2eeca0187269b125f')
22 build() {
23   cd "$srcdir/Django-$pkgver"
24   python setup.py build
27 package_python-django() {
28   cd "$srcdir/Django-$pkgver"
30   python setup.py install --root="$pkgdir" --optimize=1
32   ln -s django-admin.py "$pkgdir"/usr/bin/django-admin3.py
33   ln -s django-admin "$pkgdir"/usr/bin/django-admin3
34   install -Dm644 extras/django_bash_completion \
35     "$pkgdir"/usr/share/bash-completion/completions/django-admin.py
36   ln -s django-admin.py \
37     "$pkgdir"/usr/share/bash-completion/completions/django-admin
38   ln -s django-admin.py \
39     "$pkgdir"/usr/share/bash-completion/completions/manage.py
41   install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
44 check() {
45   cd "$srcdir/Django-$pkgver"
46   PYTHONPATH="$PWD" python tests/runtests.py || echo 'tests failed'