mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-07-25 12:15:32 +03:00
testing/py-flask-sqlalchemy: enable python3 support
This commit is contained in:
parent
3b6af96067
commit
0c9f0037d5
1 changed files with 28 additions and 17 deletions
|
@ -2,37 +2,48 @@
|
|||
# Maintainer: William Pitcock <nenolod@dereferenced.org>
|
||||
pkgname=py-flask-sqlalchemy
|
||||
pkgver=2.1
|
||||
pkgrel=0
|
||||
pkgrel=1
|
||||
pkgdesc="SQLAlchemy integration for Flask"
|
||||
url="http://flask.pocoo.org/"
|
||||
arch="noarch"
|
||||
license="MIT"
|
||||
depends="python2 py-flask py-sqlalchemy"
|
||||
depends="py-flask py-sqlalchemy"
|
||||
depends_dev=""
|
||||
makedepends="python2-dev py-setuptools"
|
||||
makedepends="python2-dev python3-dev py-setuptools"
|
||||
install=""
|
||||
subpackages=""
|
||||
subpackages="py2-flask-sqlalchemy:py2 py3-flask-sqlalchemy:py3"
|
||||
source="https://files.pythonhosted.org/packages/source/F/Flask-SQLAlchemy/Flask-SQLAlchemy-$pkgver.tar.gz"
|
||||
|
||||
_builddir="$srcdir"/Flask-SQLAlchemy-$pkgver
|
||||
prepare() {
|
||||
local i
|
||||
cd "$_builddir"
|
||||
for i in $source; do
|
||||
case $i in
|
||||
*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
|
||||
esac
|
||||
done
|
||||
}
|
||||
builddir="$srcdir"/Flask-SQLAlchemy-$pkgver
|
||||
|
||||
build() {
|
||||
cd "$_builddir"
|
||||
python2 setup.py build || return 1
|
||||
python2 setup.py build
|
||||
python3 setup.py build
|
||||
}
|
||||
|
||||
package() {
|
||||
cd "$_builddir"
|
||||
python2 setup.py install --prefix=/usr --root="$pkgdir" || return 1
|
||||
mkdir -p "$pkgdir"
|
||||
}
|
||||
|
||||
_py() {
|
||||
local python="$1"
|
||||
pkgdesc="$pkgdesc ${python#python}"
|
||||
depends="$depends $python"
|
||||
install_if="$pkgname=$pkgver-r$pkgrel $python"
|
||||
|
||||
cd "$builddir"
|
||||
$python setup.py install --prefix=/usr --root="$subpkgdir"
|
||||
}
|
||||
|
||||
py2() {
|
||||
cd "$builddir"
|
||||
_py python2
|
||||
}
|
||||
|
||||
py3() {
|
||||
cd "$builddir"
|
||||
_py python3
|
||||
}
|
||||
|
||||
md5sums="dc15fe08b07b434d3d2c4063b4674b72 Flask-SQLAlchemy-2.1.tar.gz"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue