update to version 3.0.0a5, move python2 subpackage of version 2.6.0 out

This commit is contained in:
Fabio Valentini 2019-01-20 15:01:46 +01:00
parent 0596d4b878
commit e62be757e5
No known key found for this signature in database
GPG Key ID: 5AC5F572E5D410AF
4 changed files with 53 additions and 130 deletions

1
.gitignore vendored
View File

@ -5,3 +5,4 @@
/jsonschema-2.4.0.tar.gz
/jsonschema-2.5.1.tar.gz
/jsonschema-2.6.0.tar.gz
/jsonschema-3.0.0a5.tar.gz

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

View File

@ -1,105 +1,85 @@
# Created by pyp2rpm-0.4.2
%global pypi_name jsonschema
%global pypi_version 3.0.0a5
%global with_python3 1
%global common_description %{expand:
jsonschema is an implementation of JSON Schema for Python (supporting
2.7+, including Python 3).
- Full support for Draft 7, Draft 6, Draft 4 and Draft 3
- Lazy validation that can iteratively report all validation errors.
- Small and extensible
- Programmatic querying of which properties or items failed validation.}
%{?python_enable_dependency_generator}
Name: python-%{pypi_name}
Version: 2.6.0
Release: 6%{?dist}
Summary: An implementation of JSON Schema validation for Python
Summary: Implementation of JSON Schema validation for Python
Version: 3.0.0~a5
Release: 1%{?dist}
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: %{pypi_source %{pypi_name} %{pypi_version}}
BuildArch: noarch
%if %{?rhel}%{!?rhel:0} == 6
BuildRequires: python-unittest2
BuildRequires: python-argparse
%endif
BuildRequires: python2-devel
BuildRequires: python2-nose
BuildRequires: python2-mock
# Avoid unpackaged deps:
#BuildRequires: python-vcversioner
#BuildRequires: python2-functools32
# Alternative for functools32.lru_cache
BuildRequires: python2-repoze-lru
%if 0%{?with_python3}
BuildRequires: python%{python3_pkgversion}-devel
BuildRequires: python%{python3_pkgversion}-nose
BuildRequires: python%{python3_pkgversion}-mock
%endif
BuildRequires: python3-devel
# avoid functools32, vcversioner
Patch0: avoid-unpackaged-for-jsonschema-2.6.0.patch
BuildRequires: python3dist(setuptools)
BuildRequires: python3dist(setuptools-scm)
%description
jsonschema is JSON Schema validator currently based on
http://tools.ietf.org/html/draft-zyp-json-schema-03
# test requirements
BuildRequires: python3-pyrsistent
BuildRequires: python3dist(attrs)
BuildRequires: python3dist(perf)
BuildRequires: python3dist(six)
BuildRequires: python3dist(twisted)
%package -n python2-%{pypi_name}
Summary: An implementation of JSON Schema validation for Python 2
#Requires: python2-functools32
Requires: python2-repoze-lru
%{?python_provide:%python_provide python2-%{pypi_name}}
%description %{common_description}
%description -n python2-%{pypi_name}
jsonschema is JSON Schema validator currently based on
http://tools.ietf.org/html/draft-zyp-json-schema-03
%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}}
%package -n python3-%{pypi_name}
Summary: %{summary}
%{?python_provide:%python_provide python3-%{pypi_name}}
%description -n python3-%{pypi_name} %{common_description}
%description -n python%{python3_pkgversion}-%{pypi_name}
jsonschema is JSON Schema validator currently based on
http://tools.ietf.org/html/draft-zyp-json-schema-03
%endif
%prep
%setup -q -n %{pypi_name}-%{version}
%patch0 -p1
%autosetup -n %{pypi_name}-%{pypi_version}
# Remove bundled egg-info
rm -rf %{pypi_name}.egg-info
%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
PYTHONPATH=$(pwd) trial-3 %{pypi_name}
%files -n python2-%{pypi_name}
%license COPYING
%files -n python3-%{pypi_name}
%license COPYING json/LICENSE
%doc README.rst
%{_bindir}/jsonschema
%{python2_sitelib}/%{pypi_name}/
%{python2_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info
%if 0%{?with_python3}
%files -n python%{python3_pkgversion}-%{pypi_name}
%license COPYING
%doc README.rst
%{_bindir}/jsonschema-3
%{python3_sitelib}/%{pypi_name}/
%{python3_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info
%endif
%{python3_sitelib}/%{pypi_name}-%{pypi_version}-py?.?.egg-info/
%changelog
* Sat Jan 19 2019 Fabio Valentini <decathorpe@gmail.com> - 3.0.0~a5-1
- Update to version 3.0.0a5.
- Moved python2 sub-package to separate source package.
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.6.0-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
@ -141,7 +121,6 @@ mv %{buildroot}%{_bindir}/jsonschema %{buildroot}%{_bindir}/jsonschema-3
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 2.4.0-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
* Tue Oct 13 2015 Robert Kuska <rkuska@redhat.com> - 2.4.0-3
- Rebuilt for Python3.5 rebuild
@ -184,3 +163,4 @@ mv %{buildroot}%{_bindir}/jsonschema %{buildroot}%{_bindir}/jsonschema-3
* Wed May 23 2012 Pádraig Brady <P@draigBrady.com> - 0.2-1
- Initial package.

View File

@ -1 +1 @@
SHA512 (jsonschema-2.6.0.tar.gz) = 03f916abd023b32fbe60f91718d6f2f94d8834bd1bd8ec85ab02f591a145161275c2cde25b037c4d2e94703b870159feb776d3556f011e4c394d2e20ab897b0b
SHA512 (jsonschema-3.0.0a5.tar.gz) = f49ae198b59a9b544f7994cb51452c9d1ecc2e64d10d94ef3a9cdd41b6f2ec9bb4e3ae31a60ebb19c2650ac660ff288b12e35a2786cd8fb57a8310f0b0664064