diff --git a/0001-add-setup.py.patch b/0001-add-setup.py.patch new file mode 100644 index 0000000000000000000000000000000000000000..8e777c4c9858d44f4f815dcbf2a337f753b259e5 --- /dev/null +++ b/0001-add-setup.py.patch @@ -0,0 +1,71 @@ +--- c/setup.py 1970-01-01 08:00:00.000000000 +0800 ++++ a/setup.py 2022-11-11 15:30:34.261565196 +0800 +@@ -0,0 +1,68 @@ ++#!/usr/bin/env python ++ ++# Copyright 2015 OpenMarket Ltd ++# Copyright 2018 New Vector Ltd ++# ++# Licensed under the Apache License, Version 2.0 (the "License"); ++# you may not use this file except in compliance with the License. ++# You may obtain a copy of the License at ++# ++# http://www.apache.org/licenses/LICENSE-2.0 ++# ++# Unless required by applicable law or agreed to in writing, software ++# distributed under the License is distributed on an "AS IS" BASIS, ++# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ++# See the License for the specific language governing permissions and ++# limitations under the License. ++ ++from setuptools import setup ++from codecs import open ++import os ++ ++ ++here = os.path.abspath(os.path.dirname(__file__)) ++ ++def read_file(path_segments): ++ """Read a UTF-8 file from the package. Takes a list of strings to join to ++ make the path""" ++ file_path = os.path.join(here, *path_segments) ++ with open(file_path, encoding="utf-8") as f: ++ return f.read() ++ ++def exec_file(path_segments, name): ++ """Extract a constant from a python file by looking for a line defining ++ the constant and executing it.""" ++ result = {} ++ code = read_file(path_segments) ++ lines = [line for line in code.split("\n") if line.startswith(name)] ++ exec("\n".join(lines), result) ++ return result[name] ++ ++ ++setup( ++ name = "canonicaljson", ++ description = "Canonical JSON", ++ long_description = read_file(("README.rst",)), ++ version = exec_file(("src/canonicaljson/__init__.py",), "__version__"), ++ keywords = "json", ++ url = "https://github.com/matrix-org/python-canonicaljson", ++ license = "Apache License, Version 2.0", ++ author = "Matrix.org Team and Contributors", ++ author_email = "packages@matrix.org", ++ license_file = "LICENSE", ++ classifiers = [ ++ "Development Status :: 5 - Production/Stable", ++ "Intended Audience :: Developers", ++ "License :: OSI Approved :: Apache Software License", ++ "Programming Language :: Python :: 2", ++ "Programming Language :: Python :: 3" ++ ], ++ zip_safe = True, ++ python_requires = ">=3.7", ++ package_dir = {"": "src"}, ++ packages = ["canonicaljson",], ++ install_requires = [ ++ "simplejson>=3.14.0", ++ "typing_extensions>=4.0.0; python_version < '3.8'" ++ ] ++) diff --git a/canonicaljson-1.6.2.tar.gz b/canonicaljson-1.6.2.tar.gz deleted file mode 100644 index 26f43e7b5fb9d22cec98ff437bdcbcaa35bc8664..0000000000000000000000000000000000000000 Binary files a/canonicaljson-1.6.2.tar.gz and /dev/null differ diff --git a/canonicaljson-1.6.4.tar.gz b/canonicaljson-1.6.4.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..a80b262e77d09091703ff0dcc5da3f0061ace81a Binary files /dev/null and b/canonicaljson-1.6.4.tar.gz differ diff --git a/python-canonicaljson.spec b/python-canonicaljson.spec index d177b2f272621d67ee8a076b4e0be29cfb9bafda..e6deab10116d54a4f352395fa0ca8ad5b9788638 100644 --- a/python-canonicaljson.spec +++ b/python-canonicaljson.spec @@ -1,11 +1,12 @@ %global _empty_manifest_terminate_build 0 Name: python-canonicaljson -Version: 1.6.2 +Version: 1.6.4 Release: 1 Summary: Canonical JSON -License: Apache 2.0 +License: Apache-2.0 URL: https://github.com/matrix-org/python-canonicaljson -Source0: https://files.pythonhosted.org/packages/d0/5b/e7af6c1841b4861cf297821992fd2a771daa03df66bf419ebd1490284700/canonicaljson-1.6.2.tar.gz +Source0: https://files.pythonhosted.org/packages/b8/07/a4632a48f6ea1cbe09e9f0e905c166eff8c946cd4dee17c4202db76007c5/canonicaljson-1.6.4.tar.gz +Patch0: 0001-add-setup.py.patch BuildArch: noarch Requires: python3-frozendict @@ -16,21 +17,24 @@ Canonical JSON %package -n python3-canonicaljson Summary: Canonical JSON -Provides: python-canonicaljson +Provides: python-canonicaljson = %{version}-%{release} BuildRequires: python3-devel BuildRequires: zlib >= 1.2.11 BuildRequires: python3-setuptools + %description -n python3-canonicaljson Canonical JSON %package help Summary: Development documents and examples for canonicaljson Provides: python3-canonicaljson-doc + %description help Canonical JSON %prep -%autosetup -n canonicaljson-1.6.2 +%autosetup -n canonicaljson-%{version} +%patch0 %build %py3_build @@ -70,6 +74,9 @@ mv %{buildroot}/doclist.lst . %{_docdir}/* %changelog +* Fri Nov 11 2022 wangjunqi - 1.6.4-1 +- Update package to version 1.6.4 + * Tue Aug 2 2022 wenzhiwei - 1.6.2-1 - Update to 1.6.2 @@ -78,3 +85,4 @@ mv %{buildroot}/doclist.lst . * Tue Dec 07 2021 Python_Bot - 1.5.0-1 - Package Init +