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

Commit c284aaf

Browse files
yan12125svntogit
authored andcommitted
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: pypa/distutils#133 [1] brianolson/cbor_py#19 git-svn-id: file:///srv/repos/svn-community/svn@1285262 9fca08f4-af9d-4005-b8df-a31f2cc04f65
1 parent 72fdf24 commit c284aaf

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

trunk/PKGBUILD

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,16 @@ license=(Apache)
1212
makedepends=(python-setuptools)
1313
depends=(python)
1414
checkdepends=(python-pytest)
15-
source=("$pkgname-$pkgver.tar.gz"::"https://github.com/brianolson/cbor_py/archive/$_commit.tar.gz")
16-
sha256sums=('d9211361e37363dfbf54fcb21d23e610aa25679609044844305c2ee5b80b78d9')
15+
source=("$pkgname-$pkgver.tar.gz"::"https://github.com/brianolson/cbor_py/archive/$_commit.tar.gz"
16+
"$pkgname-issue6.patch::https://github.com/dol-sen/cbor_py/commit/abec52298fd89ed3f4c05ca4c0467c12df740f8d.patch")
17+
sha256sums=('d9211361e37363dfbf54fcb21d23e610aa25679609044844305c2ee5b80b78d9'
18+
'2f4fcc52fb28790d325355c51a3651ec8c39b85c8e6b415e3ac1394405dd0f2d')
1719

1820
prepare() {
1921
cd cbor_py-$_commit
2022
sed -i 's#logger.warn(#logger.warning(#' cbor/tests/*.py
23+
# Backport a unmerged fix for tests https://github.com/brianolson/cbor_py/pull/19
24+
patch -Np1 -i ../$pkgname-issue6.patch
2125
}
2226

2327
build() {
@@ -27,9 +31,8 @@ build() {
2731

2832
check() {
2933
cd cbor_py-$_commit
30-
pyver=$(python -c "import sys; print('{}.{}'.format(*sys.version_info[:2]))")
31-
# test_sortkeys is broken https://github.com/brianolson/cbor_py/issues/6
32-
PYTHONPATH=build/lib.linux-$CARCH-$pyver pytest -k 'not test_sortkeys'
34+
pyver=$(python -c "import sys; print('{}{}'.format(*sys.version_info[:2]))")
35+
PYTHONPATH=build/lib.linux-$CARCH-cpython-$pyver pytest
3336
}
3437

3538
package() {

0 commit comments

Comments
 (0)