mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-07-23 19:25:25 +03:00
testing/py3-core-api: switch to py3
This commit is contained in:
parent
6c1ac9b988
commit
0a0f181cc6
2 changed files with 23 additions and 38 deletions
|
@ -1,58 +1,32 @@
|
|||
# Contributor: Leonardo Arena <rnalrd@alpinelinux.org>
|
||||
# Maintainer:
|
||||
pkgname=py-core-api
|
||||
pkgname=py3-core-api
|
||||
_pkgname=python-client
|
||||
pkgver=2.3.3
|
||||
pkgrel=4
|
||||
pkgrel=5
|
||||
pkgdesc="Python client library for Core API"
|
||||
url="https://github.com/core-api/python-client"
|
||||
arch="noarch"
|
||||
license="BSD-2-Clause"
|
||||
depends="py-coreschema py-itypes py-requests py-uritemplate"
|
||||
makedepends="python2-dev python3-dev py2-setuptools"
|
||||
#checkdepends="py-flake8 py-coverage pytest py-jinja2 py-pycodestyle
|
||||
# py-pyflakes py-enum34"
|
||||
options="!check" #currently requires pyflakes-1.5.0
|
||||
subpackages="py2-${pkgname#py-}:_py2 py3-${pkgname#py-}:_py3"
|
||||
source="$pkgname-$pkgver.tar.gz::https://github.com/core-api/python-client/archive/$pkgver.tar.gz"
|
||||
depends="py3-coreschema py3-itypes py3-requests py3-uritemplate"
|
||||
makedepends="py3-setuptools"
|
||||
checkdepends="py3-coverage py3-pytest py3-core-api"
|
||||
source="$pkgname-$pkgver.tar.gz::https://github.com/core-api/python-client/archive/$pkgver.tar.gz
|
||||
no-flake8.patch
|
||||
"
|
||||
builddir="$srcdir"/$_pkgname-$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
|
||||
python3 runtests
|
||||
}
|
||||
|
||||
_py2() {
|
||||
depends="${depends//py-/py3-}"
|
||||
_py python2
|
||||
package() {
|
||||
python3 setup.py --quiet install --prefix=/usr --root="$pkgdir"
|
||||
}
|
||||
|
||||
_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="aeae3ace84c0ce61552236b83db28e47492f5ac17a0e216e1a8eeddaf67270b94127f7a40f8a37cc5051abe097555adfd690a7e6c8801524ca77c916bd451ab8 py-core-api-2.3.3.tar.gz"
|
||||
sha512sums="aeae3ace84c0ce61552236b83db28e47492f5ac17a0e216e1a8eeddaf67270b94127f7a40f8a37cc5051abe097555adfd690a7e6c8801524ca77c916bd451ab8 py3-core-api-2.3.3.tar.gz
|
||||
46f6ec6ef970094d41cb9d61c7225c19ea37b19bcba6287c7c8f26a1b11da5bd34a60cd6582436f0450cc5c8f616d499dd2ceb8fa2d6e6042c39715e68343310 no-flake8.patch"
|
||||
|
|
11
testing/py3-core-api/no-flake8.patch
Normal file
11
testing/py3-core-api/no-flake8.patch
Normal file
|
@ -0,0 +1,11 @@
|
|||
diff --git a/runtests b/runtests
|
||||
index 8b260d9..dba9456 100755
|
||||
--- a/runtests
|
||||
+++ b/runtests
|
||||
@@ -86,5 +86,4 @@ if __name__ == "__main__":
|
||||
cov.start()
|
||||
exit_on_failure(pytest.main(pytest_args))
|
||||
cov.stop()
|
||||
- exit_on_failure(flake8_main(FLAKE8_ARGS))
|
||||
report_coverage(cov)
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue