From e62be757e53515f87c113b95b81538ca0e29579b Mon Sep 17 00:00:00 2001 From: Fabio Valentini Date: Jan 21 2019 14:48:11 +0000 Subject: [PATCH 1/2] update to version 3.0.0a5, move python2 subpackage of version 2.6.0 out --- diff --git a/.gitignore b/.gitignore index 68054e5..91e45ce 100644 --- a/.gitignore +++ b/.gitignore @@ -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 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 0c32181..0000000 --- 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/python-jsonschema.spec b/python-jsonschema.spec index 4890954..6a4dabd 100644 --- a/python-jsonschema.spec +++ b/python-jsonschema.spec @@ -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). -Name: python-%{pypi_name} -Version: 2.6.0 -Release: 6%{?dist} -Summary: An implementation of JSON Schema validation for Python + - 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} +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 - -# avoid functools32, vcversioner -Patch0: avoid-unpackaged-for-jsonschema-2.6.0.patch - -%description -jsonschema is JSON Schema validator currently based on -http://tools.ietf.org/html/draft-zyp-json-schema-03 - -%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 -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}} - -%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 +BuildRequires: python3-devel + +BuildRequires: python3dist(setuptools) +BuildRequires: python3dist(setuptools-scm) + +# test requirements +BuildRequires: python3-pyrsistent +BuildRequires: python3dist(attrs) +BuildRequires: python3dist(perf) +BuildRequires: python3dist(six) +BuildRequires: python3dist(twisted) + +%description %{common_description} + + +%package -n python3-%{pypi_name} +Summary: %{summary} + +%{?python_provide:%python_provide python3-%{pypi_name}} + +%description -n python3-%{pypi_name} %{common_description} + %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 - 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 - 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 - 2.4.0-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild - * Tue Oct 13 2015 Robert Kuska - 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 - 0.2-1 - Initial package. + diff --git a/sources b/sources index 66db0ed..847600e 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (jsonschema-2.6.0.tar.gz) = 03f916abd023b32fbe60f91718d6f2f94d8834bd1bd8ec85ab02f591a145161275c2cde25b037c4d2e94703b870159feb776d3556f011e4c394d2e20ab897b0b +SHA512 (jsonschema-3.0.0a5.tar.gz) = f49ae198b59a9b544f7994cb51452c9d1ecc2e64d10d94ef3a9cdd41b6f2ec9bb4e3ae31a60ebb19c2650ac660ff288b12e35a2786cd8fb57a8310f0b0664064 From 9cc61da5328c722704e82669266f311d6b2fa03d Mon Sep 17 00:00:00 2001 From: Fabio Valentini Date: Jan 22 2019 10:26:00 +0000 Subject: [PATCH 2/2] update to version 3.0.0b1 --- diff --git a/.gitignore b/.gitignore index 91e45ce..7922794 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,6 @@ +/results_* +/*.src.rpm + /jsonschema-0.2.tar.gz /jsonschema-1.3.0.tar.gz /jsonschema-2.0.0.tar.gz @@ -6,3 +9,4 @@ /jsonschema-2.5.1.tar.gz /jsonschema-2.6.0.tar.gz /jsonschema-3.0.0a5.tar.gz +/jsonschema-3.0.0b1.tar.gz diff --git a/python-jsonschema.spec b/python-jsonschema.spec index 6a4dabd..fe8d11d 100644 --- a/python-jsonschema.spec +++ b/python-jsonschema.spec @@ -1,5 +1,5 @@ %global pypi_name jsonschema -%global pypi_version 3.0.0a5 +%global pypi_version 3.0.0b1 %global common_description %{expand: jsonschema is an implementation of JSON Schema for Python (supporting @@ -14,7 +14,7 @@ jsonschema is an implementation of JSON Schema for Python (supporting Name: python-%{pypi_name} Summary: Implementation of JSON Schema validation for Python -Version: 3.0.0~a5 +Version: 3.0.0~b1 Release: 1%{?dist} License: MIT @@ -76,6 +76,9 @@ PYTHONPATH=$(pwd) trial-3 %{pypi_name} %changelog +* Tue Jan 22 2019 Fabio Valentini - 3.0.0~b1-1 +- Update to version 3.0.0b1. + * Sat Jan 19 2019 Fabio Valentini - 3.0.0~a5-1 - Update to version 3.0.0a5. - Moved python2 sub-package to separate source package. diff --git a/sources b/sources index 847600e..c6f11b0 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (jsonschema-3.0.0a5.tar.gz) = f49ae198b59a9b544f7994cb51452c9d1ecc2e64d10d94ef3a9cdd41b6f2ec9bb4e3ae31a60ebb19c2650ac660ff288b12e35a2786cd8fb57a8310f0b0664064 +SHA512 (jsonschema-3.0.0b1.tar.gz) = 732c975f5ebc908d9567b740bb6bcf8bdecfa56419d01a77acb515044aee5be014a9d5a40c52812c26c8225ac3f5f18f4867dfaa046aa2d11de05f972fa4747f