mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-07-23 11:15:13 +03:00
testing/py-django-rest-framework: new aport
This commit is contained in:
parent
5329d305dc
commit
6af4b41f15
1 changed files with 56 additions and 0 deletions
56
testing/py-django-rest-framework/APKBUILD
Normal file
56
testing/py-django-rest-framework/APKBUILD
Normal file
|
@ -0,0 +1,56 @@
|
|||
# Contributor: Leonardo Arena <rnalrd@alpinelinux.org>
|
||||
# Maintainer:
|
||||
pkgname=py-django-rest-framework
|
||||
pkgver=3.7.3
|
||||
pkgrel=0
|
||||
pkgdesc="Web APIs for Django"
|
||||
url="https://github.com/encode/django-rest-framework"
|
||||
arch="noarch"
|
||||
license="Custom"
|
||||
depends="py-django"
|
||||
makedepends="python2-dev python3-dev py2-setuptools"
|
||||
checkdepends="pytest py-tz py-core-api py-jinja2 py-uritemplate"
|
||||
subpackages="py2-${pkgname#py-}:_py2 py3-${pkgname#py-}:_py3"
|
||||
options="!check" # fails with "OperationalError: no such table: tests_blog"
|
||||
source="$pkgname-$pkgver.tar.gz::https://github.com/encode/django-rest-framework/archive/$pkgver.tar.gz"
|
||||
builddir="$srcdir"/django-rest-framework-$pkgver
|
||||
|
||||
build() {
|
||||
cd "$builddir"
|
||||
python2 setup.py --quiet build
|
||||
python3 setup.py --quiet build
|
||||
}
|
||||
|
||||
package() {
|
||||
cd "$builddir"
|
||||
mkdir -p "$pkgdir"/usr/bin
|
||||
}
|
||||
|
||||
check() {
|
||||
cd "$builddir"
|
||||
python2 runtests.py
|
||||
python3 runtests.py
|
||||
}
|
||||
|
||||
_py2() {
|
||||
depends="${depends//py-/py2-}"
|
||||
_py python2
|
||||
}
|
||||
|
||||
_py3() {
|
||||
depends="${depends//py-/py3-}"
|
||||
_py python3
|
||||
}
|
||||
|
||||
_py() {
|
||||
local python="$1"
|
||||
local pyver="${1:6:1}"
|
||||
pkgdesc="$pkgdesc (for $python)"
|
||||
depends="$depends $python"
|
||||
install_if="$pkgname=$pkgver-r$pkgrel $python"
|
||||
|
||||
cd "$builddir"
|
||||
$python setup.py --quiet install --prefix=/usr --root="$subpkgdir"
|
||||
}
|
||||
|
||||
sha512sums="a134d4ce8911530c1bffd7c8e5336100186df5fb8e5e06cc30b872c212a3012e259c85b44e7ea3294f3a80c00f8cb358e1d352f7b4fa0c69d7874e8afb05be7b py-django-rest-framework-3.7.3.tar.gz"
|
Loading…
Add table
Add a link
Reference in a new issue