Mail archive
alpine-aports

[alpine-aports] [PATCH 5/7] community/py-sqlalchemy: update to 1.3.0

From: Drew DeVault <sir_at_cmpwn.com>
Date: Wed, 6 Mar 2019 14:01:26 -0700

Also cleans up and modernizes the APKBUILD
---
 community/py-sqlalchemy/APKBUILD | 45 +++++++++++++++++++++-----------
 1 file changed, 30 insertions(+), 15 deletions(-)
diff --git a/community/py-sqlalchemy/APKBUILD b/community/py-sqlalchemy/APKBUILD
index 7679ed0a26..9ae9c77dcb 100644
--- a/community/py-sqlalchemy/APKBUILD
+++ b/community/py-sqlalchemy/APKBUILD
_at_@ -1,46 +1,61 @@
 # Contributor: William Pitcock <nenolod_at_dereferenced.org>
+# Contributor: Drew DeVault <sir_at_cmpwn.com>
 # Maintainer: William Pitcock <nenolod_at_dereferenced.org>
 pkgname=py-sqlalchemy
 _pkgname=SQLAlchemy
-pkgver=1.2.14
+pkgver=1.3.0
 pkgrel=0
 pkgdesc="An object relational mapper for Python"
 url="https://pypi.python.org/pypi/SQLAlchemy"
 arch="all"
 license="MIT"
-depends=""
 makedepends="python2-dev py-setuptools python3-dev"
+checkdepends="pytest py-mock"
 subpackages="py3-${pkgname#py-}:_py3 py2-${pkgname#py-}:_py2"
 source="https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz"
 builddir="$srcdir/$_pkgname-$pkgver"
 
-build() {
+prepare() {
 	cd "$builddir"
-	python2 setup.py build || return 1
-	python3 setup.py build || return 1
+	sed -i setup.py -e 's/ *"pytest-xdist",//g'
+	cp -r "$builddir" "$builddir"-py3
 }
 
-package() {
-	mkdir -p "$pkgdir"
+build() {
+	cd "$builddir"
+	python2 setup.py build
+	cd "$builddir"-py3
+	python3 setup.py build
 }
 
-_py() {
-	local python="$1"
-	pkgdesc="$pkgdesc ${python:6:1}"
-	depends="$depends $python"
-	install_if="$pkgname=$pkgver-r$pkgrel $python"
-
+check() {
 	cd "$builddir"
-	$python setup.py install --prefix=/usr --root="$subpkgdir"
+	pytest-2
+	cd "$builddir"-py3
+	pytest-3
+}
+
+package() {
+	mkdir -p "$pkgdir"
 }
 
 _py2() {
+	cd "$builddir"
 	replaces="$pkgname"
 	_py python2
 }
 
 _py3() {
+	cd "$builddir"
 	_py python3
 }
 
-sha512sums="f6b89029180bc6f3e35bc17a1d80c111f6ce05f2f799bbdfee00c961e83aa2f95cbb363c85a5f97c18d5ff0aa1408c164621474cd6ddf8e63dd88da35de69539  SQLAlchemy-1.2.14.tar.gz"
+_py() {
+	local python="$1"
+	pkgdesc="$pkgdesc ${python:6:1}"
+	depends="$depends $python"
+	install_if="$pkgname=$pkgver-r$pkgrel $python"
+	$python setup.py install --prefix=/usr --root="$subpkgdir"
+}
+
+sha512sums="031c912dc8830bab70ebb48b253d47ef949818a9a49f9b8d38a2daed21dd27b295182641158578c4a1bfe4bf065968824430b4f4bf949ffdacb12bb99dae9119  SQLAlchemy-1.3.0.tar.gz"
-- 
2.21.0
---
Unsubscribe:  alpine-aports+unsubscribe_at_lists.alpinelinux.org
Help:         alpine-aports+help_at_lists.alpinelinux.org
---
Received on Wed Mar 06 2019 - 14:01:26 UTC