Date: Tuesday, March 8, 2022 @ 09:40:27 Author: kgizdov Revision: 1145451
upgpkg: python-cpplint 1.6.0-1 Modified: python-cpplint/trunk/PKGBUILD ----------+ PKGBUILD | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) Modified: PKGBUILD =================================================================== --- PKGBUILD 2022-03-08 08:44:20 UTC (rev 1145450) +++ PKGBUILD 2022-03-08 09:40:27 UTC (rev 1145451) @@ -3,7 +3,7 @@ # Contributor: Liganic <[email protected]> _pkgname='cpplint' pkgname="python-${_pkgname}" -pkgver='1.5.5' +pkgver='1.6.0' pkgrel=1 pkgdesc="Command-line tool to check C/C++ files for style issues following Google's C++ style guide." arch=('any') @@ -10,28 +10,35 @@ url='https://github.com/cpplint/cpplint' license=('custom:BSD3') depends=('python') -makedepends=('python-setuptools') +makedepends=('python-build' 'python-installer' 'python-pytest-runner' 'python-pip' 'python-wheel') +checkdepends=('python-flake8' 'python-pylint' 'python-importlib-metadata' 'python-tox' 'python-testfixtures') provides=('cpplint' 'cpplint-py3') replaces=('cpplint-py3') conflicts=('cpplint') checkdepends=('python-pytest' 'python-pytest-cov' 'python-pytest-runner') source=("${pkgname}-${pkgver}.tar.gz::${url}/archive/${pkgver}.tar.gz") -sha256sums=('6abc3acd7b0a3d51d8dcaff0a8cb66c772dea73dd45099cba2d0960ec90e8de4') +sha256sums=('ddc50661b62103376675d6e4bcaa85745fa523343c3d93a1f774685005f9afb3') build() { cd "${srcdir}/${_pkgname}-${pkgver}" - python setup.py build + # for some reason upstream insists on pytest-runner==5.2, remove + sed -e 's/pytest-runner==.*/pytest-runner"/' -i setup.py + python -m build --wheel --no-isolation } check() { cd "${srcdir}/${_pkgname}-${pkgver}" - python setup.py test + # bug in pytest prevents testing - https://github.com/pytest-dev/pytest/issues/1888 + # python -m venv --system-site-packages test-env + # test-env/bin/python -m pip install -r test-requirements + # test-env/bin/python -m pytest } package() { cd "${srcdir}/${_pkgname}-${pkgver}" - install -Dm755 "cpplint.py" "${pkgdir}/usr/bin/${_pkgname}" + python -m installer --destdir="${pkgdir}" dist/*.whl + install -Dm644 "README.rst" "${pkgdir}/usr/share/doc/${pkgname}/README.rst" install -Dm644 "LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" }
