mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2026-04-13 09:42:32 +02:00
Replace usage of deprecated `codecs.open` function to fix deprecation warnings emitted in tests, leading to test failure. ``` AssertionError: Failed check in /tmp/tmp_kcwi3hr/./samples/chromium-sample comparing to ./samples/chromium-sample/simple.def for command: /builds/alpine/aports/testing/cpplint/src/cpplint-2.0.2/.testenv/bin/python3 /builds/alpine/aports/testing/cpplint/src/cpplint-2.0.2/cpplint.py --repository /tmp/tmp_kcwi3hr : --- first +++ second @@ -1,3 +1,5 @@ +'/builds/alpine/aports/testing/cpplint/src/cpplint-2.0.2/cpplint.py:7553: DeprecationWarning: codecs.open()is deprecated. Use open() instead.\n' +' with codecs.open(filename, "r", "utf8", "replace") as target_file:\n' [...] cpplint_clitest.py:167: AssertionError ``` Ref: https://gitlab.alpinelinux.org/alpine/aports/-/issues/18025
45 lines
1.2 KiB
Plaintext
45 lines
1.2 KiB
Plaintext
# Contributor: Patrycja Rosa <alpine@ptrcnull.me>
|
|
# Maintainer: Patrycja Rosa <alpine@ptrcnull.me>
|
|
pkgname=cpplint
|
|
pkgver=2.0.2
|
|
pkgrel=1
|
|
pkgdesc="Static code checker for C++"
|
|
url="https://github.com/cpplint/cpplint"
|
|
arch="noarch"
|
|
license="BSD-3-Clause"
|
|
makedepends="py3-setuptools py3-gpep517 py3-wheel"
|
|
checkdepends="
|
|
py3-parameterized
|
|
py3-pytest
|
|
py3-pytest-cov
|
|
py3-pytest-runner
|
|
py3-pytest-timeout
|
|
py3-testfixtures
|
|
"
|
|
subpackages="$pkgname-pyc"
|
|
source="https://github.com/cpplint/cpplint/archive/$pkgver/cpplint-$pkgver.tar.gz
|
|
replace-codecs-open.patch
|
|
"
|
|
|
|
build() {
|
|
gpep517 build-wheel \
|
|
--wheel-dir .dist \
|
|
--output-fd 3 3>&1 >&2
|
|
}
|
|
|
|
check() {
|
|
python3 -m venv --clear --without-pip --system-site-packages .testenv
|
|
gpep517 install-wheel --destdir .testenv --prefix '' .dist/*.whl
|
|
.testenv/bin/python3 -m pytest
|
|
}
|
|
|
|
package() {
|
|
gpep517 install-wheel --destdir "$pkgdir" \
|
|
.dist/*.whl
|
|
}
|
|
|
|
sha512sums="
|
|
afb98f4c0da4a694d5fb1005862ed0d3c6f676da8893b461f2c6f99edc7decacb375569a4f3b07b9e533ec3775c3c9fbff1e72b228d302c826e3a7f6725d13b5 cpplint-2.0.2.tar.gz
|
|
50ac00c36e88ae35e0f38182f136d041ef147505cf5bffdcf221043a647f8f4799ca4005130f85defbb719031cea26cdc3d2aecbefa7e823e7d5018d2cea0e68 replace-codecs-open.patch
|
|
"
|