From 89bcb63f39b8541fc214568d9561bd52f9e0a34f Mon Sep 17 00:00:00 2001 From: Leo Date: Fri, 3 May 2019 03:18:38 -0300 Subject: testing/py-distro: modernize - Fix license - Disable check as some tests fail - Add infrastructure for running tests --- testing/py-distro/APKBUILD | 12 +++++------- 1 file 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() { -- cgit v1.2.3