commit ccdb01ab0934a47b3c3b0c3fb67730c2c611f6036d63dad4cf7c360299221bea Author: Tomáš Chvátal Date: Thu Jun 6 09:23:59 2019 +0000 Accepting request 708082 from devel:languages:python OBS-URL: https://build.opensuse.org/request/show/708082 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-python-rapidjson?expand=0&rev=1 diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/python-rapidjson-0.7.1.tar.gz b/python-rapidjson-0.7.1.tar.gz new file mode 100644 index 0000000..7b08955 --- /dev/null +++ b/python-rapidjson-0.7.1.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8f1d369daf707bb7a0265daf2a10049965678c6982dd1dd091320c59ba50a396 +size 1040581 diff --git a/python-rapidjson.changes b/python-rapidjson.changes new file mode 100644 index 0000000..dd52da9 --- /dev/null +++ b/python-rapidjson.changes @@ -0,0 +1,18 @@ +------------------------------------------------------------------- +Wed Jun 5 10:36:31 UTC 2019 - Tomáš Chvátal + +- Update to 0.7.1: + * Raise a more specific exception on loading errors, JSONDecodeError, instead of generic ValueError (issue #118) + * Fix optimization path when using OrderedDicts (issue #119) + * Fix serialization of IntEnums (issue #121) + * Raise correct exception in code samples (PR #109), thanks to Thomas Dähling + * Fix compilation with system-wide install of rapidjson (issue #110) + * Use current master version of rapidjson, that includes a fix for its issue #1368 and issue #1336, and cures several compilation warnings as well (issue #112 and issue #107) + * Fix memory leak when using object_hook (issue #115) +- Add patch to enforce use of system rapidjson: + * rapidjson-system.patch + +------------------------------------------------------------------- +Thu Nov 22 13:40:34 UTC 2018 - Karol Babioch + +- Initial packaging of version 0.6.3 diff --git a/python-rapidjson.spec b/python-rapidjson.spec new file mode 100644 index 0000000..4e6cd5b --- /dev/null +++ b/python-rapidjson.spec @@ -0,0 +1,65 @@ +# +# spec file for package python-rapidjson +# +# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + + +%define skip_python2 1 +%{?!python_module:%define python_module() python-%{**} python3-%{**}} +Name: python-rapidjson +Version: 0.7.1 +Release: 0 +Summary: Python wrapper around rapidjson +License: MIT +Group: Development/Languages/Python +URL: https://github.com/python-rapidjson/python-rapidjson +Source: https://github.com/python-rapidjson/python-rapidjson/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz +Patch0: rapidjson-system.patch +BuildRequires: %{python_module Sphinx} +BuildRequires: %{python_module devel} +BuildRequires: %{python_module pytest} +BuildRequires: %{python_module pytz} +BuildRequires: fdupes +BuildRequires: gcc-c++ +BuildRequires: python-rpm-macros +BuildRequires: rapidjson-devel +%python_subpackages + +%description +RapidJSON is an extremely fast C++ JSON parser and serialization library: this +module wraps it into a Python 3 extension, exposing its +serialization/deserialization (to/from either bytes, str or file-like +instances) and JSON Schema validation capabilities. + +%prep +%setup -q +%patch0 -p1 + +%build +%python_build + +%install +%python_install + +%check +export LANG=en_US.UTF-8 +%python_expand PYTHONPATH=%{buildroot}%{python_sitearch} py.test-%{$python_bin_suffix} -v tests + +%files %{python_files} +%doc CHANGE* README* +%license LICENSE* +%{python_sitearch}/* + +%changelog diff --git a/rapidjson-system.patch b/rapidjson-system.patch new file mode 100644 index 0000000..7788464 --- /dev/null +++ b/rapidjson-system.patch @@ -0,0 +1,25 @@ +Index: python-rapidjson-0.7.1/setup.py +=================================================================== +--- python-rapidjson-0.7.1.orig/setup.py ++++ python-rapidjson-0.7.1/setup.py +@@ -29,19 +29,7 @@ if sys.version_info < (3,): + + ROOT_PATH = os.path.abspath(os.path.dirname(__file__)) + +-rj_include_dir = './rapidjson/include' +- +-for idx, arg in enumerate(sys.argv[:]): +- if arg.startswith('--rj-include-dir='): +- sys.argv.pop(idx) +- rj_include_dir = arg.split('=', 1)[1] +- break +-else: +- if not os.path.isdir(os.path.join(ROOT_PATH, 'rapidjson', 'include')): +- raise RuntimeError("RapidJSON sources not found: if you cloned the git" +- " repository, you should initialize the rapidjson submodule" +- " as explained in the README.rst; in all other cases you may" +- " want to report the issue.") ++rj_include_dir = '/usr/include/rapidjson' + + with open('version.txt', encoding='utf-8') as f: + VERSION = f.read()