aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLeo <thinkabit.ukim@gmail.com>2019-05-03 03:18:38 -0300
committerLeo <thinkabit.ukim@gmail.com>2019-06-07 07:02:07 -0300
commit89bcb63f39b8541fc214568d9561bd52f9e0a34f (patch)
tree21d1f9c3c4b55f9cfc1e2793e402caaac8a709d7
parent5e848054d90375320b3a46abdcedfffda85d0180 (diff)
downloadaports-89bcb63f39b8541fc214568d9561bd52f9e0a34f.tar.bz2
aports-89bcb63f39b8541fc214568d9561bd52f9e0a34f.tar.xz
testing/py-distro: modernize
- Fix license - Disable check as some tests fail - Add infrastructure for running tests
-rw-r--r--testing/py-distro/APKBUILD12
1 files changed, 5 insertions, 7 deletions
diff --git a/testing/py-distro/APKBUILD b/testing/py-distro/APKBUILD
index 87440a75eb..fc725faf85 100644
--- a/testing/py-distro/APKBUILD
+++ b/testing/py-distro/APKBUILD
@@ -5,25 +5,23 @@ _pkgname=distro
pkgver=1.4.0
pkgrel=1
pkgdesc="A Linux OS platform information API"
+options="!check" # Some tests fail
url="https://github.com/nir0s/distro"
arch="noarch"
-license="MIT"
-makedepends="python2-dev py-setuptools python3-dev"
-options="!check" # tox is not available
-#checkdepends="py3-tox"
+license="Apache-2.0"
+makedepends="py-setuptools py3-setuptools"
+checkdepends="py3-pytest py3-pytest-cov"
subpackages="py3-$_pkgname:_py3 py2-$_pkgname:_py2"
source="https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz"
builddir="$srcdir"/$_pkgname-$pkgver
build() {
- cd "$builddir"
python2 setup.py build
python3 setup.py build
}
check() {
- cd "$builddir"
- tox
+ python3 -m pytest
}
package() {