From 352ef8c2d827b2b9c78501d21ba15038e4058c50 Mon Sep 17 00:00:00 2001 From: Nathan Owens Date: Mon, 7 Dec 2020 12:52:32 -0600 Subject: [PATCH] python3-wheel: update to 0.36.1. Also add do_check (@ahesford). Co-authored-by: Nathan Owens Co-authored-by: Andrew J. Hesford Closes: #27023 [via git-merge-pr] --- srcpkgs/python3-wheel/template | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) diff --git a/srcpkgs/python3-wheel/template b/srcpkgs/python3-wheel/template index 1f7ff22f46f..171f079870a 100644 --- a/srcpkgs/python3-wheel/template +++ b/srcpkgs/python3-wheel/template @@ -1,11 +1,12 @@ # Template file for 'python3-wheel' pkgname=python3-wheel -version=0.36.0 +version=0.36.1 revision=1 wrksrc="wheel-${version}" build_style=python3-module hostmakedepends="python3-setuptools" depends="python3-setuptools" +checkdepends="python3-pytest python3-devel $depends" short_desc="Built-package format for Python (Python3)" maintainer="Orphaned " license="MIT" @@ -13,12 +14,27 @@ homepage="https://github.com/pypa/wheel" # upstream forgot to include LICENSE.txt in release distfiles="${PYPI_SITE}/w/wheel/wheel-${version}.tar.gz https://raw.githubusercontent.com/pypa/wheel/${version}/LICENSE.txt" -checksum="e17f05e14282d0e666327f800ef43123b40f3dbc13a86193b604f2ebfae0dabc +checksum="aaef9b8c36db72f8bf7f1e54f85f875c4d466819940863ca0b3f3f77f0a1646f cca9e20c6af1fcfbf69408f377769286cbeebcded336100c9b4a3f35fbe635e4" conflicts="python-wheel>=0" skip_extraction="LICENSE.txt" -post_install() { - cp ${XBPS_SRCDISTDIR}/${pkgname}-${version}/LICENSE.txt . - vlicense LICENSE.txt +do_check() { + + vsed -e '/addopts/d' -i setup.cfg + + # Must export PYTHONPATH so subprocesses see the variable + local _pypath="${PYTHONPATH}" + export PYTHONPATH="${PWD}/src:${PYTHONPATH}" + python3 -m pytest --ignore=tests/test_macosx_libfile.py + + if [ -n "${_pypath}" ]; then + export PYTHONPATH="${_pypath}" + else + unset PYTHONPATH + fi +} + +post_install() { + vlicense ${XBPS_SRCDISTDIR}/${pkgname}-${version}/LICENSE.txt LICENSE }