Skip to content
This repository was archived by the owner on May 20, 2023. It is now read-only.

Commit ab0bcfb

Browse files
committed
upgpkg: python-cpplint 1.6.1-3: Rebuild against Python 3.11.
Remove unneeded dependencies. Remove use of legacy sre_compile: cpplint/cpplint#214 Remove use of pytest-runner (not needed for build). Simplify installation of files using install's -t switch. Remove the use of srcdir. git-svn-id: file:///srv/repos/svn-community/svn@1445958 9fca08f4-af9d-4005-b8df-a31f2cc04f65
1 parent 7e096dc commit ab0bcfb

1 file changed

Lines changed: 27 additions & 12 deletions

File tree

‎python-cpplint/trunk/PKGBUILD‎

Lines changed: 27 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,38 +4,53 @@
44
_pkgname='cpplint'
55
pkgname="python-${_pkgname}"
66
pkgver='1.6.1'
7-
pkgrel=2
7+
pkgrel=3
88
pkgdesc="Command-line tool to check C/C++ files for style issues following Google's C++ style guide."
99
arch=('any')
1010
url='https://github.com/cpplint/cpplint'
1111
license=('custom:BSD3')
1212
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+
)
1623
provides=('cpplint' 'cpplint-py3')
1724
replaces=('cpplint-py3')
1825
conflicts=('cpplint')
1926
source=("${pkgname}-${pkgver}.tar.gz::${url}/archive/${pkgver}.tar.gz")
2027
b2sums=('f3afaba6f8389e8d925e20d94cbcf1451d11b85ca7914b53f966c575a5be7a6b4eb7367f53e549644019ccd1f76eca61415f0c5997842cb5640ab5a7ba00c1de')
2128

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+
2239
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}"
2641
python -m build --wheel --no-isolation
2742
}
2843

2944
check() {
30-
cd "${srcdir}/${_pkgname}-${pkgver}"
31-
PYTHONPATH=build/lib pytest
45+
cd "${_pkgname}-${pkgver}"
46+
PYTHONPATH=build/lib pytest -vv
3247
}
3348

3449
package() {
35-
cd "${srcdir}/${_pkgname}-${pkgver}"
50+
cd "${_pkgname}-${pkgver}"
3651

3752
python -m installer --destdir="${pkgdir}" dist/*.whl
3853

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}/"
4156
}

0 commit comments

Comments
 (0)