Date: Thursday, April 13, 2023 @ 22:25:12
  Author: dvzrv
Revision: 1445959

archrelease: copy trunk to community-staging-any

Added:
  python-cpplint/repos/community-staging-any/
  python-cpplint/repos/community-staging-any/PKGBUILD
    (from rev 1445958, python-cpplint/trunk/PKGBUILD)

----------+
 PKGBUILD |   56 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 56 insertions(+)

Copied: python-cpplint/repos/community-staging-any/PKGBUILD (from rev 1445958, 
python-cpplint/trunk/PKGBUILD)
===================================================================
--- community-staging-any/PKGBUILD                              (rev 0)
+++ community-staging-any/PKGBUILD      2023-04-13 22:25:12 UTC (rev 1445959)
@@ -0,0 +1,56 @@
+# Maintainer: Konstantin Gizdov <arch at kge dot pw>
+# Contributor: Jason Papakostas <[email protected]>
+# Contributor: Liganic <[email protected]>
+_pkgname='cpplint'
+pkgname="python-${_pkgname}"
+pkgver='1.6.1'
+pkgrel=3
+pkgdesc="Command-line tool to check C/C++ files for style issues following 
Google's C++ style guide."
+arch=('any')
+url='https://github.com/cpplint/cpplint'
+license=('custom:BSD3')
+depends=('python')
+makedepends=(
+  'python-build'
+  'python-installer'
+  'python-setuptools'
+  'python-wheel'
+)
+checkdepends=(
+  'python-testfixtures'
+  'python-pytest'
+)
+provides=('cpplint' 'cpplint-py3')
+replaces=('cpplint-py3')
+conflicts=('cpplint')
+source=("${pkgname}-${pkgver}.tar.gz::${url}/archive/${pkgver}.tar.gz")
+b2sums=('f3afaba6f8389e8d925e20d94cbcf1451d11b85ca7914b53f966c575a5be7a6b4eb7367f53e549644019ccd1f76eca61415f0c5997842cb5640ab5a7ba00c1de')
+
+prepare() {
+  cd "${_pkgname}-${pkgver}"
+  # drop leagcy sre_compile: https://github.com/cpplint/cpplint/pull/214
+  sed -e '/import sre_compile/d; s/sre_compile/re/g' -i cpplint.py
+  # we are not interested in coverage
+  sed '/addopts/d' -i setup.cfg
+  # pytest-runner is not needed to build
+  sed -e '/pytest-runner/d' -i setup.py
+}
+
+build() {
+  cd "${_pkgname}-${pkgver}"
+  python -m build --wheel --no-isolation
+}
+
+check() {
+  cd "${_pkgname}-${pkgver}"
+  PYTHONPATH=build/lib pytest -vv
+}
+
+package() {
+  cd "${_pkgname}-${pkgver}"
+
+  python -m installer --destdir="${pkgdir}" dist/*.whl
+
+  install -Dm644 "README.rst" -t "${pkgdir}/usr/share/doc/${pkgname}/"
+  install -Dm644 "LICENSE" -t "${pkgdir}/usr/share/licenses/${pkgname}/"
+}

Reply via email to