[arch-commits] Commit in python-cbor/trunk (PKGBUILD)
Chih-Hsuan Yen
yan12125 at gemini.archlinux.org
Mon Aug 29 14:38:49 UTC 2022
Date: Monday, August 29, 2022 @ 14:38:49
Author: yan12125
Revision: 1285262
python-cbor: fix building with newer setuptools
Also backports a fix for tests [1]
See: https://wiki.archlinux.org/index.php?title=Python_package_guidelines&type=revision&diff=743435&oldid=742361
See: https://github.com/pypa/distutils/pull/133
[1] https://github.com/brianolson/cbor_py/pull/19
Modified:
python-cbor/trunk/PKGBUILD
----------+
PKGBUILD | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2022-08-29 14:35:29 UTC (rev 1285261)
+++ PKGBUILD 2022-08-29 14:38:49 UTC (rev 1285262)
@@ -12,12 +12,16 @@
makedepends=(python-setuptools)
depends=(python)
checkdepends=(python-pytest)
-source=("$pkgname-$pkgver.tar.gz"::"https://github.com/brianolson/cbor_py/archive/$_commit.tar.gz")
-sha256sums=('d9211361e37363dfbf54fcb21d23e610aa25679609044844305c2ee5b80b78d9')
+source=("$pkgname-$pkgver.tar.gz"::"https://github.com/brianolson/cbor_py/archive/$_commit.tar.gz"
+ "$pkgname-issue6.patch::https://github.com/dol-sen/cbor_py/commit/abec52298fd89ed3f4c05ca4c0467c12df740f8d.patch")
+sha256sums=('d9211361e37363dfbf54fcb21d23e610aa25679609044844305c2ee5b80b78d9'
+ '2f4fcc52fb28790d325355c51a3651ec8c39b85c8e6b415e3ac1394405dd0f2d')
prepare() {
cd cbor_py-$_commit
sed -i 's#logger.warn(#logger.warning(#' cbor/tests/*.py
+ # Backport a unmerged fix for tests https://github.com/brianolson/cbor_py/pull/19
+ patch -Np1 -i ../$pkgname-issue6.patch
}
build() {
@@ -27,9 +31,8 @@
check() {
cd cbor_py-$_commit
- pyver=$(python -c "import sys; print('{}.{}'.format(*sys.version_info[:2]))")
- # test_sortkeys is broken https://github.com/brianolson/cbor_py/issues/6
- PYTHONPATH=build/lib.linux-$CARCH-$pyver pytest -k 'not test_sortkeys'
+ pyver=$(python -c "import sys; print('{}{}'.format(*sys.version_info[:2]))")
+ PYTHONPATH=build/lib.linux-$CARCH-cpython-$pyver pytest
}
package() {
More information about the arch-commits
mailing list