diff --git a/avoid-unpackaged-for-jsonschema-2.6.0.patch b/avoid-unpackaged-for-jsonschema-2.6.0.patch deleted file mode 100644 index 0c32181e5c5d867c6e0a0ffb81c747e7665ed5b8..0000000000000000000000000000000000000000 --- a/avoid-unpackaged-for-jsonschema-2.6.0.patch +++ /dev/null @@ -1,58 +0,0 @@ -diff -ru jsonschema-2.6.0.orig/jsonschema/compat.py jsonschema-2.6.0/jsonschema/compat.py ---- jsonschema-2.6.0.orig/jsonschema/compat.py 2015-11-30 13:58:04.000000000 +0100 -+++ jsonschema-2.6.0/jsonschema/compat.py 2017-07-21 12:57:25.768508757 +0200 -@@ -8,6 +8,7 @@ - from collections.abc import MutableMapping, Sequence # noqa - - PY3 = sys.version_info[0] >= 3 -+PY27 = sys.version_info[:2] == (2, 7) - - if PY3: - zip = zip -@@ -32,8 +33,10 @@ - int_types = int, long - iteritems = operator.methodcaller("iteritems") - -- from functools32 import lru_cache -- -+ if PY27: -+ from repoze.lru import lru_cache -+ else: -+ from functools32 import lru_cache - - # On python < 3.3 fragments are not handled properly with unknown schemes - def urlsplit(url): -diff -ru jsonschema-2.6.0.orig/setup.py jsonschema-2.6.0/setup.py ---- jsonschema-2.6.0.orig/setup.py 2016-08-28 04:29:36.000000000 +0200 -+++ jsonschema-2.6.0/setup.py 2017-07-21 13:28:06.503903938 +0200 -@@ -1,6 +1,7 @@ - import os - - from setuptools import setup -+from jsonschema import _version - - - with open(os.path.join(os.path.dirname(__file__), "README.rst")) as readme: -@@ -22,14 +23,14 @@ - - extras_require = { - "format" : ["rfc3987", "strict-rfc3339", "webcolors"], -- ":python_version=='2.7'": ["functools32"], -+ ":python_version=='2.7'": ["repoze.lru"], - } - - setup( - name="jsonschema", -+ version=_version.__version__, - packages=["jsonschema", "jsonschema.tests"], - package_data={"jsonschema": ["schemas/*.json"]}, -- setup_requires=["vcversioner>=2.16.0.0"], - extras_require=extras_require, - author="Julian Berman", - author_email="Julian@GrayVines.com", -@@ -39,5 +40,4 @@ - long_description=long_description, - url="http://github.com/Julian/jsonschema", - entry_points={"console_scripts": ["jsonschema = jsonschema.cli:main"]}, -- vcversioner={"version_module_paths" : ["jsonschema/_version.py"]}, - ) diff --git a/jsonschema-2.6.0.tar.gz b/jsonschema-2.6.0.tar.gz deleted file mode 100644 index 65ee3ae25fb86bb848758bfde0dceafafe7d5a71..0000000000000000000000000000000000000000 Binary files a/jsonschema-2.6.0.tar.gz and /dev/null differ diff --git a/jsonschema-3.0.2.tar.gz b/jsonschema-3.0.2.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..a7db10f5d4b840549a96253766abb84cbe7d6d4b Binary files /dev/null and b/jsonschema-3.0.2.tar.gz differ diff --git a/python-jsonschema.spec b/python-jsonschema.spec index c4af21ea3c05fb8cb492cf23fc6efd5351f2a44f..90ce945534d089d21fccf4d8b10b5f8d5ef4eae9 100644 --- a/python-jsonschema.spec +++ b/python-jsonschema.spec @@ -1,83 +1,77 @@ -%global pypi_name jsonschema -%global with_python3 1 -%global _description \ -jsonschema is JSON Schema validator currently based on http://tools.ietf.org/html/draft-zyp-json-schema-03 - -Name: python-%{pypi_name} -Version: 2.6.0 -Release: 6 +%global _empty_manifest_terminate_build 0 +Name: python-jsonschema +Version: 3.0.2 +Release: 1 Summary: An implementation of JSON Schema validation for Python License: MIT -URL: http://pypi.python.org/pypi/jsonschema -Source0: https://files.pythonhosted.org/packages/source/j/jsonschema/%{pypi_name}-%{version}.tar.gz +URL: https://github.com/Julian/jsonschema +Source0: https://files.pythonhosted.org/packages/92/d2/8768983d6e4bb1478ea08e7bc186304f47b99c22bfd711caa8e9becb0361/jsonschema-3.0.2.tar.gz BuildArch: noarch +%description +jsonschema is JSON Schema validator currently based on http://tools.ietf.org/html/draft-zyp-json-schema-03 -BuildRequires: python2-devel python2-nose python2-mock python2-repoze-lru -%if 0%{?with_python3} -BuildRequires: python%{python3_pkgversion}-devel python%{python3_pkgversion}-nose python%{python3_pkgversion}-mock -%endif - -Patch0: avoid-unpackaged-for-jsonschema-2.6.0.patch - -%description %{_description} - -%package -n python2-%{pypi_name} -Summary: An implementation of JSON Schema validation for Python 2 -Requires: python2-repoze-lru -%{?python_provide:%python_provide python2-%{pypi_name}} - -%description -n python2-%{pypi_name} %{_description} - -%if 0%{?with_python3} -%package -n python%{python3_pkgversion}-%{pypi_name} -Summary: An implementation of JSON Schema validation for Python %{python3_version} -%{?python_provide:%python_provide python%{python3_pkgversion}-%{pypi_name}} - -%description -n python%{python3_pkgversion}-%{pypi_name} %{_description} -%endif +%package -n python3-jsonschema +Summary: An implementation of JSON Schema validation for Python +Provides: python-jsonschema +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-pbr +BuildRequires: python3-pip +BuildRequires: python3-wheel +BuildRequires: python3-mock +%description -n python3-jsonschema +jsonschema is JSON Schema validator currently based on http://tools.ietf.org/html/draft-zyp-json-schema-03 -%package_help +%package help +Summary: An implementation of JSON Schema validation for Python +Provides: python3-jsonschema-doc +%description help +jsonschema is JSON Schema validator currently based on http://tools.ietf.org/html/draft-zyp-json-schema-03 %prep -%autosetup -n %{pypi_name}-%{version} -p1 +%autosetup -n jsonschema-%{version} %build -%if 0%{?with_python3} %py3_build -%endif -%py2_build - %install -%if 0%{?with_python3} %py3_install -mv %{buildroot}%{_bindir}/jsonschema %{buildroot}%{_bindir}/jsonschema-3 -%endif -%py2_install -%check -%if 0%{?with_python3} -%{_bindir}/nosetests-%{python3_version} -v -%endif -%{_bindir}/nosetests-%{python2_version} -v - -%files -n python2-%{pypi_name} -%license COPYING -%{_bindir}/jsonschema -%{python2_sitelib}/%{pypi_name}/ -%{python2_sitelib}/*.egg-info - -%if 0%{?with_python3} -%files -n python%{python3_pkgversion}-%{pypi_name} -%license COPYING -%{_bindir}/jsonschema-3 -%{python3_sitelib}/%{pypi_name}/ -%{python3_sitelib}/*.egg-info -%endif - -%files help -%doc README.rst PKG-INFO +install -d -m755 %{buildroot}/%{_pkgdocdir} +if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi +if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi +if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi +if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi +pushd %{buildroot} +if [ -d usr/lib ]; then + find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/lib64 ]; then + find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/bin ]; then + find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/sbin ]; then + find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst +fi +touch doclist.lst +if [ -d usr/share/man ]; then + find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst +fi +popd +mv %{buildroot}/filelist.lst . +mv %{buildroot}/doclist.lst . + +%files -n python3-jsonschema -f filelist.lst +%dir %{python3_sitelib}/* + +%files help -f doclist.lst +%{_docdir}/* %changelog +* Wed Feb 09 2022 OpenStack_SIG - 3.0.2-1 +- Remove the support of python2 and upgrade the version to 3.0.2 + * Sun Sep 15 2019 openEuler Buildteam - 2.6.0-6 - Package init