Date: Sunday, October 3, 2021 @ 09:13:12 Author: dvzrv Revision: 1027155
upgpkg: python-diff-cover 6.4.1-1: Upgrade to 6.4.1. Install to temporary location to run tests and ignore integration tests. Simplify installation in package() to adhere to python packaging guidelines. Modified: python-diff-cover/trunk/PKGBUILD ----------+ PKGBUILD | 31 ++++++++++++++++++------------- 1 file changed, 18 insertions(+), 13 deletions(-) Modified: PKGBUILD =================================================================== --- PKGBUILD 2021-10-03 08:47:17 UTC (rev 1027154) +++ PKGBUILD 2021-10-03 09:13:12 UTC (rev 1027155) @@ -2,20 +2,21 @@ _name=diff_cover pkgname=python-diff-cover -pkgver=4.1.1 +pkgver=6.4.1 pkgrel=1 pkgdesc="Automatically find diff lines that need test coverage" arch=('any') url="https://github.com/Bachmann1234/diff_cover" license=('Apache') -depends=('python-jinja' 'python-jinja_pluralize' 'python-pluggy' -'python-pygments' 'python-setuptools') -checkdepends=('flake8' 'python-pytest' 'python-mock' 'python-pytest-cov' -'python-pycodestyle' 'python-pyflakes' 'python-pylint' 'python-pydocstyle') +depends=('python-chardet' 'python-jinja' 'python-jinja_pluralize' +'python-pluggy' 'python-pygments') +makedepends=('python-setuptools') +checkdepends=('python-pytest' 'python-pytest-mock' 'python-tomli') +optdepends=('python-tomli: for TOML support') source=("https://files.pythonhosted.org/packages/source/${_name::1}/${_name}/${_name}-${pkgver}.tar.gz"{,.asc}) -sha512sums=('f69aa84b670dbbd548e355e95a7f5d0d0ed067036e810da993074702121e453395b7d376634d0d7cf0ae3d76cc16c45480daf72364aad3ed1d2185e818c3df69' +sha512sums=('ba5848d2c2f206675e13740477fe676f71f372be9fa7fbc9c610176ee9fa079e20b32cfb439e4f2d1f842015bd1c5fa8de4c6f01bcfb457d5220d8b7087712b3' 'SKIP') -b2sums=('e884d9e64d6112784a98945a4108cf52588e270c15072a0329e6324dbefe39e81bc57d50554ebb9b183acbe73161a1b64d67d65e9151fa3dc90a741c14589a63' +b2sums=('7be9a138b338b8c4f2bce60b708e7c2275859dbe019d9d0db71c2052ac76c0af04180b29042c0d8ef77fe2c7899fb3a9db50dedd48c4dd08375109c975207efa' 'SKIP') validpgpkeys=('54CAEABCAC2956D407348256972401BDE60128CB') # Matt Bachmann <matt.bachm...@lola.com> @@ -29,15 +30,19 @@ } check() { + local _site_packages=$(python -c "import site; print(site.getsitepackages()[0])") + local _test_dir='test_dir' + cd "$pkgname-$pkgver" - export PYTHONPATH="build:${PYTHONPATH}" - pytest -v + # install to temporary location, as importlib is used + python setup.py install --optimize=1 --root="${_test_dir}" + PYTHONPATH="${_test_dir}/${_site_packages}:${PYTHONPATH}" \ + # ignore integration and code style checks + pytest -v --ignore 'tests/test_integration.py' --ignore 'tests/test_violations_reporter.py' --ignore 'tests/test_clover_violations_reporter.py' } package() { cd "$pkgname-$pkgver" - python setup.py install --skip-build \ - --optimize=1 \ - --root="${pkgdir}" - install -vDm 644 {CHANGELOG,NOTICE,README.rst} -t "${pkgdir}/usr/share/doc/${pkgname}" + python setup.py install --optimize=1 --root="${pkgdir}" + install -vDm 644 README.rst -t "${pkgdir}/usr/share/doc/${pkgname}" }