diff options
author | prspkt <prspkt@protonmail.com> | 2019-08-19 00:38:14 +0300 |
---|---|---|
committer | prspkt <prspkt@protonmail.com> | 2019-08-19 00:46:08 +0300 |
commit | ed65890150dc07644f7dfd4c6a5c3f19fabf0f3b (patch) | |
tree | 48eec81c747a69bb2e96e07db1c3ecad619459b6 | |
parent | e6a1fc9118ccf2653e8186d8a9341a0a031c6944 (diff) | |
download | aports-ed65890150dc07644f7dfd4c6a5c3f19fabf0f3b.tar.bz2 aports-ed65890150dc07644f7dfd4c6a5c3f19fabf0f3b.tar.xz |
testing/py-tabulate: drop python2
* Fix tests.
* Add py3-setuptools, py3-wcwidth runtime dependencies.
Signed-off-by: prspkt <prspkt@protonmail.com>
-rw-r--r-- | testing/py-tabulate/APKBUILD | 54 | ||||
-rw-r--r-- | testing/py3-tabulate/APKBUILD | 35 |
2 files changed, 35 insertions, 54 deletions
diff --git a/testing/py-tabulate/APKBUILD b/testing/py-tabulate/APKBUILD deleted file mode 100644 index 09972e4b0c..0000000000 --- a/testing/py-tabulate/APKBUILD +++ /dev/null @@ -1,54 +0,0 @@ -# Maintainer: Andy Postnikov <apostnikov@gmail.com> -pkgname=py-tabulate -pkgver=0.8.3 -pkgrel=1 -pkgdesc="Pretty-print tabular data" -url="https://bitbucket.org/astanin/python-tabulate" -arch="noarch" -license="MIT" -makedepends="python2-dev python3-dev" -checkdepends="pytest py-nose" -subpackages="py2-${pkgname#py-}:_py2 py3-${pkgname#py-}:_py3" -source="https://files.pythonhosted.org/packages/source/t/tabulate/tabulate-$pkgver.tar.gz" -builddir="$srcdir/${pkgname#py-}-$pkgver" - -build() { - cd "$builddir" - python2 setup.py build - python3 setup.py build -} - -check() { - cd "$builddir" - python2 setup.py check - python3 setup.py check - python2 setup.py test - python3 setup.py test -} - -package() { - cd "$builddir" - mkdir -p "$pkgdir" -} - -_py2() { - depends="${depends//py-/py2-}" - _py python2 -} - -_py3() { - depends="${depends//py-/py3-}" - _py python3 -} - -_py() { - local python="$1" - pkgdesc="$pkgdesc (for $python)" - depends="$depends $python" - install_if="$pkgname=$pkgver-r$pkgrel $python" - - cd "$builddir" - $python setup.py install --prefix=/usr --root="$subpkgdir" -} - -sha512sums="7f0205a4d80ed0b426a45622a3b8ec0a9b77cf6d67c1207db7fbc20a12e83a15748e63d5f8e5e65fa348b6265fd0cac93be4d04f9c1c182476b93507e1131cbf tabulate-0.8.3.tar.gz" diff --git a/testing/py3-tabulate/APKBUILD b/testing/py3-tabulate/APKBUILD new file mode 100644 index 0000000000..eade8f401c --- /dev/null +++ b/testing/py3-tabulate/APKBUILD @@ -0,0 +1,35 @@ +# Maintainer: Andy Postnikov <apostnikov@gmail.com> +pkgname=py3-tabulate +pkgver=0.8.3 +pkgrel=2 +pkgdesc="Pretty-print tabular data" +url="https://bitbucket.org/astanin/python-tabulate" +arch="noarch" +license="MIT" +depends="py3-setuptools py3-wcwidth" +checkdepends="py3-nose" +source="https://files.pythonhosted.org/packages/source/t/tabulate/tabulate-$pkgver.tar.gz" +builddir="$srcdir/tabulate-$pkgver" + +replaces=py-tabulate # Backwards compatibility +provides=py-tabulate=$pkgver-r$pkgrel # Backwards compatibility + +prepare() { + default_prepare + # fix interpreter invocation + sed -i 's/"python"/"python3"/g' test/test_cli.py +} + +build() { + python3 setup.py build +} + +check() { + PYTHONPATH="$builddir"/build/lib python3 setup.py test +} + +package() { + python3 setup.py install --prefix=/usr --root="$pkgdir" +} + +sha512sums="7f0205a4d80ed0b426a45622a3b8ec0a9b77cf6d67c1207db7fbc20a12e83a15748e63d5f8e5e65fa348b6265fd0cac93be4d04f9c1c182476b93507e1131cbf tabulate-0.8.3.tar.gz" |