!6 update to 3.2.0

Merge pull request !6 from 靳智敏/master
This commit is contained in:
openeuler-ci-bot 2020-07-29 21:10:37 +08:00 committed by Gitee
commit 6edb4d76ce
4 changed files with 18 additions and 95 deletions

View File

@ -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"]},
)

Binary file not shown.

BIN
jsonschema-3.2.0.tar.gz Normal file

Binary file not shown.

View File

@ -1,40 +1,35 @@
%global pypi_name jsonschema %global pypi_name jsonschema
%global with_python3 1
%global _description \ %global _description \
jsonschema is JSON Schema validator currently based on http://tools.ietf.org/html/draft-zyp-json-schema-03 jsonschema is JSON Schema validator currently based on http://tools.ietf.org/html/draft-zyp-json-schema-03
Name: python-%{pypi_name} Name: python-%{pypi_name}
Version: 2.6.0 Version: 3.2.0
Release: 6 Release: 1
Summary: An implementation of JSON Schema validation for Python Summary: An implementation of JSON Schema validation for Python
License: MIT License: MIT
URL: http://pypi.python.org/pypi/jsonschema URL: http://pypi.python.org/pypi/jsonschema
Source0: https://files.pythonhosted.org/packages/source/j/jsonschema/%{pypi_name}-%{version}.tar.gz Source0: https://files.pythonhosted.org/packages/source/j/jsonschema/%{pypi_name}-%{version}.tar.gz
BuildArch: noarch BuildArch: noarch
BuildRequires: python2-devel python2-nose python2-mock python2-repoze-lru BuildRequires: python3-devel python3-setuptools python3-setuptools_scm
%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 # test requirements
%bcond_without tests
%if %{without tests}
BuildRequires: python3dist(attrs)
BuildRequires: python3dist(perf)
BuildRequires: python3dist(pyrsistent)
BuildRequires: python3dist(six)
BuildRequires: python3dist(twisted)
%endif
%description %{_description} %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} %package -n python%{python3_pkgversion}-%{pypi_name}
Summary: An implementation of JSON Schema validation for Python %{python3_version} Summary: An implementation of JSON Schema validation for Python %{python3_version}
%{?python_provide:%python_provide python%{python3_pkgversion}-%{pypi_name}} %{?python_provide:%python_provide python%{python3_pkgversion}-%{pypi_name}}
%description -n python%{python3_pkgversion}-%{pypi_name} %{_description} %description -n python%{python3_pkgversion}-%{pypi_name} %{_description}
%endif
%package_help %package_help
@ -42,42 +37,28 @@ Summary: An implementation of JSON Schema validation for Python %{python3
%autosetup -n %{pypi_name}-%{version} -p1 %autosetup -n %{pypi_name}-%{version} -p1
%build %build
%if 0%{?with_python3}
%py3_build %py3_build
%endif
%py2_build
%install %install
%if 0%{?with_python3}
%py3_install %py3_install
mv %{buildroot}%{_bindir}/jsonschema %{buildroot}%{_bindir}/jsonschema-3
%endif
%py2_install
%if %{without tests}
%check %check
%if 0%{?with_python3} %{__python3} setup.py test --test-suite=jsonschema.tests
%{_bindir}/nosetests-%{python3_version} -v
%endif %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} %files -n python%{python3_pkgversion}-%{pypi_name}
%license COPYING %license COPYING
%{_bindir}/jsonschema-3 %{_bindir}/jsonschema
%{python3_sitelib}/%{pypi_name}/ %{python3_sitelib}/%{pypi_name}/
%{python3_sitelib}/*.egg-info %{python3_sitelib}/*.egg-info
%endif
%files help %files help
%doc README.rst PKG-INFO %doc README.rst PKG-INFO
%changelog %changelog
* Wed Jul 29 2020 jinzhimin<jinzhimin2@huawei.com> - 3.2.0-1
- update to 3.2.0
* Sun Sep 15 2019 openEuler Buildteam <buildteam@openeuler.org> - 2.6.0-6 * Sun Sep 15 2019 openEuler Buildteam <buildteam@openeuler.org> - 2.6.0-6
- Package init - Package init