* update python-commentjson to 0.9.0-8

This commit is contained in:
Alexander Baldeck 2024-12-05 07:18:48 +01:00
parent 157990cab8
commit 9016779a6c
4 changed files with 56 additions and 3 deletions

View File

@ -0,0 +1,22 @@
pkgbase = python-commentjson
pkgdesc = Add Python and JavaScript style comments in your JSON files
pkgver = 0.9.0
pkgrel = 8
url = https://github.com/vaidik/commentjson
arch = any
license = MIT
checkdepends = python-tests
checkdepends = python-six
makedepends = python-build
makedepends = python-installer
makedepends = python-setuptools
makedepends = python-wheel
depends = python-lark-parser
source = python-commentjson-0.9.0.tar.gz::https://github.com/vaidik/commentjson/archive/v0.9.0.tar.gz
source = python-commentjson-rename-lark.patch::https://github.com/vaidik/commentjson/pull/52.patch
source = python3-12-test-infinity-skip.patch
sha512sums = cd3d28adecbc445ed3faed7847c65a23829f408cf8aa3fa85544a0f0cf9fa5544b8aff560725cf51921f249123daf9ce9953069e99ca64a312bb4bff652512fe
sha512sums = c00bce5471e912c7a2e0a4db2e96329dd4720b5f6813957bd5e0298ec5fe42ea362fcf0047b7a41e17aeab802bf36ef14e1b30826d87646c104f5f39002356ef
sha512sums = ff442f4bf916703a4231607d8b79f16d71e8b03665deb9431f438edce12075eb1cc784413bdfd23e580e149c8f150cbe8ea137b3b1e6d046d83204e29264c470
pkgname = python-commentjson

View File

@ -0,0 +1,4 @@
[python-commentjson]
source = "git"
git = "https://github.com/vaidik/commentjson.git"
prefix = "v"

View File

@ -3,7 +3,7 @@
pkgname=python-commentjson
pkgver=0.9.0
pkgrel=7
pkgrel=8
pkgdesc="Add Python and JavaScript style comments in your JSON files"
url="https://github.com/vaidik/commentjson"
license=('MIT')
@ -12,13 +12,16 @@ depends=('python-lark-parser')
makedepends=('python-build' 'python-installer' 'python-setuptools' 'python-wheel')
checkdepends=('python-tests' 'python-six')
source=("$pkgname-$pkgver.tar.gz::https://github.com/vaidik/commentjson/archive/v$pkgver.tar.gz"
$pkgname-rename-lark.patch::https://github.com/vaidik/commentjson/pull/52.patch)
$pkgname-rename-lark.patch::https://github.com/vaidik/commentjson/pull/52.patch
python3-12-test-infinity-skip.patch)
sha512sums=('cd3d28adecbc445ed3faed7847c65a23829f408cf8aa3fa85544a0f0cf9fa5544b8aff560725cf51921f249123daf9ce9953069e99ca64a312bb4bff652512fe'
'c00bce5471e912c7a2e0a4db2e96329dd4720b5f6813957bd5e0298ec5fe42ea362fcf0047b7a41e17aeab802bf36ef14e1b30826d87646c104f5f39002356ef')
'c00bce5471e912c7a2e0a4db2e96329dd4720b5f6813957bd5e0298ec5fe42ea362fcf0047b7a41e17aeab802bf36ef14e1b30826d87646c104f5f39002356ef'
'ff442f4bf916703a4231607d8b79f16d71e8b03665deb9431f438edce12075eb1cc784413bdfd23e580e149c8f150cbe8ea137b3b1e6d046d83204e29264c470')
prepare() {
cd commentjson-$pkgver
patch -p1 -i ../$pkgname-rename-lark.patch
patch -p1 -i ../python3-12-test-infinity-skip.patch
}
build() {

View File

@ -0,0 +1,24 @@
From 04ad293f800039c0221ff010236e589a4ba7079d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
Date: Sun, 23 Jun 2024 14:54:42 +0200
Subject: [PATCH] Update test skips for Python 3.12+
Python 3.12 moves testing for `Infinity` and other constants
into `test_json/test_decode.py::test_parse_constant`.
---
commentjson/tests/test_json/test_decode.py | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/commentjson/tests/test_json/test_decode.py b/commentjson/tests/test_json/test_decode.py
index 6971c44..8f5e904 100644
--- a/commentjson/tests/test_json/test_decode.py
+++ b/commentjson/tests/test_json/test_decode.py
@@ -69,3 +69,8 @@ def test_string_with_utf8_bom(self):
'test case is not supported by commentjson.'))
def test_negative_index(self):
pass
+
+ @unittest.skipIf(version >= (3, 12),
+ 'Infinity as a value is not supported yet')
+ def test_parse_constant(self):
+ pass