[arch-commits] Commit in python-rapidjson/repos (3 files)
Date: Saturday, December 26, 2020 @ 11:36:33 Author: felixonmars Revision: 793008 archrelease: copy trunk to community-testing-x86_64 Added: python-rapidjson/repos/community-testing-x86_64/ python-rapidjson/repos/community-testing-x86_64/PKGBUILD (from rev 793007, python-rapidjson/trunk/PKGBUILD) python-rapidjson/repos/community-testing-x86_64/python-3.8.patch (from rev 793007, python-rapidjson/trunk/python-3.8.patch) --+ PKGBUILD | 38 ++ python-3.8.patch | 35 +++ 2 files changed, 73 insertions(+) Copied: python-rapidjson/repos/community-testing-x86_64/PKGBUILD (from rev 793007, python-rapidjson/trunk/PKGBUILD) === --- community-testing-x86_64/PKGBUILD (rev 0) +++ community-testing-x86_64/PKGBUILD 2020-12-26 11:36:33 UTC (rev 793008) @@ -0,0 +1,38 @@ +# Maintainer: Felix Yan + +pkgname=python-rapidjson +pkgver=1.0 +pkgrel=1 +pkgdesc="Python wrapper around rapidjson" +arch=('x86_64') +url="https://pypi.python.org/pypi/python-rapidjson"; +license=('MIT') +depends=('python') +makedepends=('python-setuptools' 'rapidjson') +checkdepends=('python-pytest-runner' 'python-pytest-benchmark' 'python-pytz') +source=("https://pypi.io/packages/source/p/python-rapidjson/python-rapidjson-$pkgver.tar.gz";) +sha512sums=('574970afb9292bdc3a12129225d238549e49b29d17c1cf1d199389251986ad90d2c4f5a7db32b563e1aae8327bce4a720cfa47be7c3e330cd9cae08d1494fd0e') + +prepare() { + #rm -r python-rapidjson-$pkgver/rapidjson + #sed -i 's/if not os.path.isdir/if os.path.isdir/' python-rapidjson-$pkgver/setup.py + # Shared rapidjson fails tests. + + cp -a python-rapidjson-$pkgver{,-py2} +} + +build() { + cd python-rapidjson-$pkgver + python setup.py build # --rj-include-dir=/usr/include +} + +check() { + cd python-rapidjson-$pkgver + python setup.py pytest --addopts '--ignore benchmarks/' +} + +package() { + cd python-rapidjson-$pkgver + python setup.py install -O1 --root="$pkgdir" + install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE" +} Copied: python-rapidjson/repos/community-testing-x86_64/python-3.8.patch (from rev 793007, python-rapidjson/trunk/python-3.8.patch) === --- community-testing-x86_64/python-3.8.patch (rev 0) +++ community-testing-x86_64/python-3.8.patch 2020-12-26 11:36:33 UTC (rev 793008) @@ -0,0 +1,35 @@ +From aa16ff9daec2153f47c3c6977bde31df221bb097 Mon Sep 17 00:00:00 2001 +From: Lele Gaifax +Date: Sat, 2 Nov 2019 14:31:16 +0100 +Subject: [PATCH] Use repr() instead of str() to obtain string representation + of PyLong instances + +In Python 3.8 they removed several __str__() implementations (see commit +https://github.com/python/cpython/commit/96aeaec64738b730c719562125070a52ed570210), so +under that version calling str() on an IntEnum instance gives something like +"", not the literal integer value as before, so the right thing, that +seems to work also on Python 3.7, is to use repr() instead. + +This fixes issue #125. +--- + rapidjson.cpp | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/rapidjson.cpp b/rapidjson.cpp +index e649e52..32f527b 100644 +--- a/rapidjson.cpp b/rapidjson.cpp +@@ -2267,11 +2267,11 @@ dumps_internal( + writer->Uint64(ui); + } + } else { +-// Mimic stdlib json: subclasses of int may override __str__, but we still ++// Mimic stdlib json: subclasses of int may override __repr__, but we still + // want to encode them as integers in JSON; one example within the standard + // library is IntEnum + +-PyObject* intStrObj = PyLong_Type.tp_str(object); ++PyObject* intStrObj = PyLong_Type.tp_repr(object); + if (intStrObj == NULL) + return false; +
[arch-commits] Commit in python-rapidjson/repos (3 files)
Date: Friday, November 15, 2019 @ 05:46:50 Author: felixonmars Revision: 528795 archrelease: copy trunk to community-testing-x86_64 Added: python-rapidjson/repos/community-testing-x86_64/ python-rapidjson/repos/community-testing-x86_64/PKGBUILD (from rev 528794, python-rapidjson/trunk/PKGBUILD) python-rapidjson/repos/community-testing-x86_64/python-3.8.patch (from rev 528794, python-rapidjson/trunk/python-3.8.patch) --+ PKGBUILD | 38 ++ python-3.8.patch | 35 +++ 2 files changed, 73 insertions(+) Copied: python-rapidjson/repos/community-testing-x86_64/PKGBUILD (from rev 528794, python-rapidjson/trunk/PKGBUILD) === --- community-testing-x86_64/PKGBUILD (rev 0) +++ community-testing-x86_64/PKGBUILD 2019-11-15 05:46:50 UTC (rev 528795) @@ -0,0 +1,38 @@ +# Maintainer: Felix Yan + +pkgname=python-rapidjson +pkgver=0.9.1 +pkgrel=1 +pkgdesc="Python wrapper around rapidjson" +arch=('x86_64') +url="https://pypi.python.org/pypi/python-rapidjson"; +license=('MIT') +depends=('python') +makedepends=('python-setuptools' 'rapidjson') +checkdepends=('python-pytest-runner' 'python-pytest-benchmark' 'python-pytz') +source=("https://pypi.io/packages/source/p/python-rapidjson/python-rapidjson-$pkgver.tar.gz";) +sha512sums=('0feb085c7cd4a8c0476b67f5ce671ccbe4605c3b08ca364eba64b84b9e8d4a2bbd9f481295023286cba63af0ecbfe69e33581df65a38577ec214672644028aa2') + +prepare() { + #rm -r python-rapidjson-$pkgver/rapidjson + #sed -i 's/if not os.path.isdir/if os.path.isdir/' python-rapidjson-$pkgver/setup.py + # Shared rapidjson fails tests. + + cp -a python-rapidjson-$pkgver{,-py2} +} + +build() { + cd python-rapidjson-$pkgver + python setup.py build # --rj-include-dir=/usr/include +} + +check() { + cd python-rapidjson-$pkgver + python setup.py pytest --addopts '--ignore benchmarks/' +} + +package() { + cd python-rapidjson-$pkgver + python setup.py install -O1 --root="$pkgdir" + install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE" +} Copied: python-rapidjson/repos/community-testing-x86_64/python-3.8.patch (from rev 528794, python-rapidjson/trunk/python-3.8.patch) === --- community-testing-x86_64/python-3.8.patch (rev 0) +++ community-testing-x86_64/python-3.8.patch 2019-11-15 05:46:50 UTC (rev 528795) @@ -0,0 +1,35 @@ +From aa16ff9daec2153f47c3c6977bde31df221bb097 Mon Sep 17 00:00:00 2001 +From: Lele Gaifax +Date: Sat, 2 Nov 2019 14:31:16 +0100 +Subject: [PATCH] Use repr() instead of str() to obtain string representation + of PyLong instances + +In Python 3.8 they removed several __str__() implementations (see commit +https://github.com/python/cpython/commit/96aeaec64738b730c719562125070a52ed570210), so +under that version calling str() on an IntEnum instance gives something like +"", not the literal integer value as before, so the right thing, that +seems to work also on Python 3.7, is to use repr() instead. + +This fixes issue #125. +--- + rapidjson.cpp | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/rapidjson.cpp b/rapidjson.cpp +index e649e52..32f527b 100644 +--- a/rapidjson.cpp b/rapidjson.cpp +@@ -2267,11 +2267,11 @@ dumps_internal( + writer->Uint64(ui); + } + } else { +-// Mimic stdlib json: subclasses of int may override __str__, but we still ++// Mimic stdlib json: subclasses of int may override __repr__, but we still + // want to encode them as integers in JSON; one example within the standard + // library is IntEnum + +-PyObject* intStrObj = PyLong_Type.tp_str(object); ++PyObject* intStrObj = PyLong_Type.tp_repr(object); + if (intStrObj == NULL) + return false; +
[arch-commits] Commit in python-rapidjson/repos (3 files)
Date: Wednesday, November 6, 2019 @ 16:21:07 Author: felixonmars Revision: 524408 archrelease: copy trunk to community-staging-x86_64 Added: python-rapidjson/repos/community-staging-x86_64/ python-rapidjson/repos/community-staging-x86_64/PKGBUILD (from rev 524407, python-rapidjson/trunk/PKGBUILD) python-rapidjson/repos/community-staging-x86_64/python-3.8.patch (from rev 524407, python-rapidjson/trunk/python-3.8.patch) --+ PKGBUILD | 41 + python-3.8.patch | 35 +++ 2 files changed, 76 insertions(+) Copied: python-rapidjson/repos/community-staging-x86_64/PKGBUILD (from rev 524407, python-rapidjson/trunk/PKGBUILD) === --- community-staging-x86_64/PKGBUILD (rev 0) +++ community-staging-x86_64/PKGBUILD 2019-11-06 16:21:07 UTC (rev 524408) @@ -0,0 +1,41 @@ +# Maintainer: Felix Yan + +pkgname=python-rapidjson +pkgver=0.8.0 +pkgrel=2 +pkgdesc="Python wrapper around rapidjson" +arch=('x86_64') +url="https://pypi.python.org/pypi/python-rapidjson"; +license=('MIT') +depends=('python') +makedepends=('python-setuptools' 'rapidjson') +checkdepends=('python-pytest-runner' 'python-pytest-benchmark' 'python-pytz') +source=("https://pypi.io/packages/source/p/python-rapidjson/python-rapidjson-$pkgver.tar.gz"; +python-3.8.patch) +sha512sums=('7d843cfe46a269c88a8f4c05ad6b3dc86d60fa3ceb24ac39639d95bbc8ed2bdba18f0467dd222c39416e48054b2ad70ae2b8219eb441a5571b872f28ba4872d7' + '39850c03e7b87d3c081e4af9ff7b0bb7d06791c818acb97828341564407737bcaa935f3e42c042d5d3cfc65e827965540416bd1735de1a652a0c4b5ee8f39930') + +prepare() { + #rm -r python-rapidjson-$pkgver/rapidjson + #sed -i 's/if not os.path.isdir/if os.path.isdir/' python-rapidjson-$pkgver/setup.py + # Shared rapidjson fails tests. + + patch -Np1 -d python-rapidjson-$pkgver +Date: Sat, 2 Nov 2019 14:31:16 +0100 +Subject: [PATCH] Use repr() instead of str() to obtain string representation + of PyLong instances + +In Python 3.8 they removed several __str__() implementations (see commit +https://github.com/python/cpython/commit/96aeaec64738b730c719562125070a52ed570210), so +under that version calling str() on an IntEnum instance gives something like +"", not the literal integer value as before, so the right thing, that +seems to work also on Python 3.7, is to use repr() instead. + +This fixes issue #125. +--- + rapidjson.cpp | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/rapidjson.cpp b/rapidjson.cpp +index e649e52..32f527b 100644 +--- a/rapidjson.cpp b/rapidjson.cpp +@@ -2267,11 +2267,11 @@ dumps_internal( + writer->Uint64(ui); + } + } else { +-// Mimic stdlib json: subclasses of int may override __str__, but we still ++// Mimic stdlib json: subclasses of int may override __repr__, but we still + // want to encode them as integers in JSON; one example within the standard + // library is IntEnum + +-PyObject* intStrObj = PyLong_Type.tp_str(object); ++PyObject* intStrObj = PyLong_Type.tp_repr(object); + if (intStrObj == NULL) + return false; +