aboutsummaryrefslogtreecommitdiffstats
path: root/testing/py-openapi-codec
diff options
context:
space:
mode:
authorLeonardo Arena <rnalrd@alpinelinux.org>2017-12-19 15:22:33 +0000
committerLeonardo Arena <rnalrd@alpinelinux.org>2017-12-29 20:27:21 +0000
commitf627e9baf9133a513640430062532c750dd22af4 (patch)
tree445e02a99817e39e384deac8e8e6c21deb03d7da /testing/py-openapi-codec
parent6af4b41f15cb568111ae243fc6420ecd373d5bbb (diff)
downloadaports-f627e9baf9133a513640430062532c750dd22af4.tar.bz2
aports-f627e9baf9133a513640430062532c750dd22af4.tar.xz
testing/py-openapi-codec: new aport
Diffstat (limited to 'testing/py-openapi-codec')
-rw-r--r--testing/py-openapi-codec/APKBUILD58
-rw-r--r--testing/py-openapi-codec/disable-flake8-tests-that-requires-pyflake15.patch9
2 files changed, 67 insertions, 0 deletions
diff --git a/testing/py-openapi-codec/APKBUILD b/testing/py-openapi-codec/APKBUILD
new file mode 100644
index 0000000000..f64e7e4244
--- /dev/null
+++ b/testing/py-openapi-codec/APKBUILD
@@ -0,0 +1,58 @@
+# Contributor: Leonardo Arena <rnalrd@alpinelinux.org>
+# Maintainer:
+pkgname=py-openapi-codec
+pkgver=1.3.2
+pkgrel=0
+pkgdesc="OpenAPI codec for Core API"
+url="https://github.com/core-api/python-openapi-codec"
+arch="noarch"
+license="Custom"
+depends="py-core-api"
+makedepends="python3-dev python2-dev py2-setuptools"
+checkdepends="py-coverage pytest py-core-api py-jinja2 py-pycodestyle py-pyflakes"
+subpackages="py3-${pkgname#py-}:_py3"
+source="$pkgname-$pkgver.tar.gz::https://github.com/core-api/python-openapi-codec/archive/$pkgver.tar.gz
+ disable-flake8-tests-that-requires-pyflake15.patch
+ "
+builddir="$srcdir"/python-openapi-codec-$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-/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="566c82643bd6ad3e9bc444ceb9a518cb8bdddc9239f43e8bcce69d3b425a9d62b5d56d56cbe685fb0d054c1c3e33a19b010d5f8b4469d1c98fd092742b17bb22 py-openapi-codec-1.3.2.tar.gz
+6807f1d48f17bcec58642037e262246b818fb0e5d522606c46fbe343fd2c7d5388a40d29e6d361ad34d92611a1eb24e29cc78377472bd608503a71c8e8017363 disable-flake8-tests-that-requires-pyflake15.patch"
diff --git a/testing/py-openapi-codec/disable-flake8-tests-that-requires-pyflake15.patch b/testing/py-openapi-codec/disable-flake8-tests-that-requires-pyflake15.patch
new file mode 100644
index 0000000000..b2cee84904
--- /dev/null
+++ b/testing/py-openapi-codec/disable-flake8-tests-that-requires-pyflake15.patch
@@ -0,0 +1,9 @@
+--- a/runtests
++++ b/runtests
+@@ -85,5 +85,5 @@
+ cov.start()
+ exit_on_failure(pytest.main(pytest_args))
+ cov.stop()
+- exit_on_failure(flake8_main(FLAKE8_ARGS))
++ # exit_on_failure(flake8_main(FLAKE8_ARGS))
+ report_coverage(cov)