forked from pool/python-canonicaljson
- Update to 1.1.4:
* Fix error when encoding non-BMP characters on UCS-2 python builds (fixes issue #12). - Use same syntax for test multibuild like in other pkgs OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-canonicaljson?expand=0&rev=10
This commit is contained in:
committed by
Git OBS Bridge
parent
7bee7d375c
commit
650eab8924
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:b252582d0d8908a545c6b33f7509c13338c1033ad049b3e917bf730395224dc0
|
||||
size 10112
|
||||
@@ -1,3 +1,10 @@
|
||||
-------------------------------------------------------------------
|
||||
Thu Feb 28 09:34:15 UTC 2019 - Tomáš Chvátal <tchvatal@suse.com>
|
||||
|
||||
- Update to 1.1.4:
|
||||
* Fix error when encoding non-BMP characters on UCS-2 python builds (fixes issue #12).
|
||||
- Use same syntax for test multibuild like in other pkgs
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Apr 23 13:57:00 UTC 2018 - jengelh@inai.de
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package python
|
||||
# spec file for package python-canonicaljson
|
||||
#
|
||||
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||
# 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
|
||||
@@ -12,94 +12,77 @@
|
||||
# license that conforms to the Open Source Definition (Version 1.9)
|
||||
# published by the Open Source Initiative.
|
||||
|
||||
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
||||
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
||||
#
|
||||
|
||||
|
||||
# Define just "test" as a package in _multibuild file to distinguish test
|
||||
# instructions here
|
||||
%if "@BUILD_FLAVOR@" == ""
|
||||
%define _test 0
|
||||
%define name_ext %nil
|
||||
%global flavor @BUILD_FLAVOR@%{nil}
|
||||
%if "%{flavor}" == "test"
|
||||
%define psuffix -test
|
||||
%bcond_without test
|
||||
%else
|
||||
%define _test 1
|
||||
%define name_ext -test
|
||||
%define psuffix %{nil}
|
||||
%bcond_with test
|
||||
%endif
|
||||
|
||||
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
||||
%define github_user matrix-org
|
||||
%define short_name canonicaljson
|
||||
%define pkg_name python-%{short_name}
|
||||
Name: %{pkg_name}%{?name_ext}
|
||||
Version: 1.1.3
|
||||
Name: python-%{short_name}%{psuffix}
|
||||
Version: 1.1.4
|
||||
Release: 0
|
||||
Summary: Canonical JSON for Python
|
||||
License: Apache-2.0
|
||||
Group: Development/Languages/Python
|
||||
Url: https://github.com/%{github_user}/%{pkg_name}
|
||||
Source: https://github.com/%{github_user}/%{pkg_name}/archive/v%{version}/%{pkg_name}-%{version}.tar.gz
|
||||
BuildRequires: python-rpm-macros
|
||||
%if 0%{?_test}
|
||||
BuildRequires: python-%{short_name}
|
||||
%else
|
||||
BuildRequires: %{python_module base}
|
||||
BuildRequires: %{python_module frozendict}
|
||||
URL: https://github.com/matrix-org/python-canonicaljson
|
||||
Source: https://github.com/matrix-org/python-canonicaljson/archive/v%{version}.tar.gz
|
||||
BuildRequires: %{python_module frozendict >= 1.0}
|
||||
BuildRequires: %{python_module setuptools}
|
||||
BuildRequires: %{python_module simplejson}
|
||||
BuildRequires: fdupes
|
||||
Requires: python-frozendict
|
||||
BuildRequires: python-rpm-macros
|
||||
Requires: python-frozendict >= 1.0
|
||||
Requires: python-simplejson
|
||||
Requires: python-six
|
||||
%endif
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
BuildArch: noarch
|
||||
|
||||
%if 0%{?_test}
|
||||
%else
|
||||
%python_subpackages
|
||||
%if %{with test}
|
||||
BuildRequires: %{python_module %{short_name}}
|
||||
%endif
|
||||
%python_subpackages
|
||||
|
||||
%description
|
||||
This is a Python module which encodes objects and arrays into JSON as per
|
||||
RFC 7159.
|
||||
RFC 7159.
|
||||
|
||||
* Sorts object keys so that it yields the same result each time.
|
||||
* Has no insignificant whitespace to make the output as small as possible.
|
||||
* Escapes only the characters that must be escaped, U+0000 to U+0019 /
|
||||
U+0022 / U+0056, to keep the output as small as possible.
|
||||
* Escapes only the characters that must be escaped, U+0000 to U+0019 /
|
||||
U+0022 / U+0056, to keep the output as small as possible.
|
||||
* Uses the shortest escape sequence for each escaped character.
|
||||
* Encodes the JSON as UTF-8.
|
||||
* Can encode frozendict immutable dictionaries.
|
||||
|
||||
%prep
|
||||
%if 0%{?_test}
|
||||
# workaround to prevent post/install failing assuming this file for whatever
|
||||
# reason
|
||||
touch %{_sourcedir}/%{short_name}
|
||||
%else
|
||||
%setup -q -n %{pkg_name}-%{version}
|
||||
%endif
|
||||
%setup -q -n python-canonicaljson-%{version}
|
||||
|
||||
%build
|
||||
%if 0%{?_test}
|
||||
python -c "import %{short_name}"
|
||||
%else
|
||||
%python_build
|
||||
%endif
|
||||
|
||||
%install
|
||||
%if 0%{?_test}
|
||||
# disable debug packages in package test to prevent error about missing files
|
||||
%define debug_package %{nil}
|
||||
%else
|
||||
%if !%{with test}
|
||||
%python_install
|
||||
%fdupes %{buildroot}%{_prefix}
|
||||
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
||||
%endif
|
||||
|
||||
%check
|
||||
%if %{with test}
|
||||
%python_exec -m unittest discover
|
||||
%endif
|
||||
|
||||
%if !%{with test}
|
||||
%files %{python_files}
|
||||
%defattr(-,root,root,-)
|
||||
%doc README.rst LICENSE
|
||||
%license LICENSE
|
||||
%doc README.rst
|
||||
%{python_sitelib}/*
|
||||
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
|
||||
3
v1.1.4.tar.gz
Normal file
3
v1.1.4.tar.gz
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:d6cf71127ac5771be402476d5a12b80665bdc0c063d0222f8dfe7f9e9d30fba4
|
||||
size 1326484
|
||||
Reference in New Issue
Block a user