Date: Wednesday, February 1, 2023 @ 09:03:35 Author: dvzrv Revision: 1391693
upgpkg: python-piccata 2.0.2-1: Upgrade to 2.0.2. Switch to sdist tarball as it now exists and includes tests. Remove deselection of tests as all work now. Remove tests from global namespace: https://github.com/NordicSemiconductor/piccata/issues/14 Modified: python-piccata/trunk/PKGBUILD ----------+ PKGBUILD | 33 +++++++++++++++------------------ 1 file changed, 15 insertions(+), 18 deletions(-) Modified: PKGBUILD =================================================================== --- PKGBUILD 2023-02-01 08:23:04 UTC (rev 1391692) +++ PKGBUILD 2023-02-01 09:03:35 UTC (rev 1391693) @@ -2,8 +2,7 @@ _name=piccata pkgname=python-piccata -_commit=7396f4e0f181bfe690f8b9de7c8cd41b44856a0b -pkgver=2.0.1 +pkgver=2.0.2 pkgrel=1 pkgdesc="A simple CoAP (RFC7252) toolkit" arch=(any) @@ -10,36 +9,34 @@ url="https://github.com/NordicSemiconductor/piccata" license=(custom) depends=(python) -makedepends=(git python-build python-installer python-setuptools python-wheel) +makedepends=(python-build python-installer python-setuptools python-wheel) checkdepends=(python-pytest) -# NOTE: 2.0.1 is not available as tag and there is no sdist tarball: -# https://github.com/NordicSemiconductor/piccata/issues/11 -# source=(https://files.pythonhosted.org/packages/source/${_name::1}/$_name/$_name-$pkgver.tar.gz) -source=(git+https://github.com/NordicSemiconductor/piccata#commit=$_commit) -sha256sums=('SKIP') +source=(https://files.pythonhosted.org/packages/source/${_name::1}/$_name/$_name-$pkgver.tar.gz) +sha256sums=('7ea6411777bfd63d62e43086269b4f9ecc9072e6321a729ad02018e054063a32') build() { - cd $_name + cd $_name-$pkgver python -m build --wheel --no-isolation } check() { - local _deselected=( - # https://github.com/NordicSemiconductor/piccata/issues/12 - --deselect tests/test_message_option.py::TestUintOption::test_decode - ) - local _site_packages=$(python -c "import site; print(site.getsitepackages()[0])") + local site_packages=$(python -c "import site; print(site.getsitepackages()[0])") - cd $_name + cd $_name-$pkgver # install to temporary location, as importlib is used python -m installer --destdir=test_dir dist/*.whl - export PYTHONPATH="test_dir/$_site_packages:$PYTHONPATH" - pytest -vv "${_deselected[@]}" + export PYTHONPATH="test_dir/$site_packages:$PYTHONPATH" + pytest -vv tests/ } package() { - cd $_name + local site_packages=$(python -c "import site; print(site.getsitepackages()[0])") + + cd $_name-$pkgver python -m installer --destdir="$pkgdir" dist/*.whl + + # remove (globally namespaced) tests: https://github.com/NordicSemiconductor/piccata/issues/14 + rm -frv "$pkgdir/$site_packages/tests/" install -vDm 644 LICENSE -t "$pkgdir/usr/share/licenses/$pkgname/" install -vDm 644 README.md -t "$pkgdir/usr/share/doc/$pkgname/" }
