|
4 | 4 | _pkgname='cpplint' |
5 | 5 | pkgname="python-${_pkgname}" |
6 | 6 | pkgver='1.6.1' |
7 | | -pkgrel=2 |
| 7 | +pkgrel=3 |
8 | 8 | pkgdesc="Command-line tool to check C/C++ files for style issues following Google's C++ style guide." |
9 | 9 | arch=('any') |
10 | 10 | url='https://github.com/cpplint/cpplint' |
11 | 11 | license=('custom:BSD3') |
12 | 12 | depends=('python') |
13 | | -makedepends=('python-build' 'python-installer' 'python-pytest-runner' 'python-wheel') |
14 | | -checkdepends=('python-pytest-flake8' 'python-pylint' 'python-importlib-metadata' 'python-tox' 'python-testfixtures' |
15 | | - 'python-pytest' 'python-pytest-cov') |
| 13 | +makedepends=( |
| 14 | + 'python-build' |
| 15 | + 'python-installer' |
| 16 | + 'python-setuptools' |
| 17 | + 'python-wheel' |
| 18 | +) |
| 19 | +checkdepends=( |
| 20 | + 'python-testfixtures' |
| 21 | + 'python-pytest' |
| 22 | +) |
16 | 23 | provides=('cpplint' 'cpplint-py3') |
17 | 24 | replaces=('cpplint-py3') |
18 | 25 | conflicts=('cpplint') |
19 | 26 | source=("${pkgname}-${pkgver}.tar.gz::${url}/archive/${pkgver}.tar.gz") |
20 | 27 | b2sums=('f3afaba6f8389e8d925e20d94cbcf1451d11b85ca7914b53f966c575a5be7a6b4eb7367f53e549644019ccd1f76eca61415f0c5997842cb5640ab5a7ba00c1de') |
21 | 28 |
|
| 29 | +prepare() { |
| 30 | + cd "${_pkgname}-${pkgver}" |
| 31 | + # drop leagcy sre_compile: https://github.com/cpplint/cpplint/pull/214 |
| 32 | + sed -e '/import sre_compile/d; s/sre_compile/re/g' -i cpplint.py |
| 33 | + # we are not interested in coverage |
| 34 | + sed '/addopts/d' -i setup.cfg |
| 35 | + # pytest-runner is not needed to build |
| 36 | + sed -e '/pytest-runner/d' -i setup.py |
| 37 | +} |
| 38 | + |
22 | 39 | build() { |
23 | | - cd "${srcdir}/${_pkgname}-${pkgver}" |
24 | | - # for some reason upstream insists on pytest-runner==5.2, remove |
25 | | - sed -e 's/pytest-runner==.*/pytest-runner"/' -i setup.py |
| 40 | + cd "${_pkgname}-${pkgver}" |
26 | 41 | python -m build --wheel --no-isolation |
27 | 42 | } |
28 | 43 |
|
29 | 44 | check() { |
30 | | - cd "${srcdir}/${_pkgname}-${pkgver}" |
31 | | - PYTHONPATH=build/lib pytest |
| 45 | + cd "${_pkgname}-${pkgver}" |
| 46 | + PYTHONPATH=build/lib pytest -vv |
32 | 47 | } |
33 | 48 |
|
34 | 49 | package() { |
35 | | - cd "${srcdir}/${_pkgname}-${pkgver}" |
| 50 | + cd "${_pkgname}-${pkgver}" |
36 | 51 |
|
37 | 52 | python -m installer --destdir="${pkgdir}" dist/*.whl |
38 | 53 |
|
39 | | - install -Dm644 "README.rst" "${pkgdir}/usr/share/doc/${pkgname}/README.rst" |
40 | | - install -Dm644 "LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" |
| 54 | + install -Dm644 "README.rst" -t "${pkgdir}/usr/share/doc/${pkgname}/" |
| 55 | + install -Dm644 "LICENSE" -t "${pkgdir}/usr/share/licenses/${pkgname}/" |
41 | 56 | } |
0 commit comments