2013-10-09 21:56:22 +00:00
|
|
|
%global pypi_name jsonpatch
|
2018-03-15 17:25:42 +00:00
|
|
|
|
2017-09-29 15:42:20 +00:00
|
|
|
%if 0%{?fedora} || 0%{?rhel} > 7
|
2018-03-15 17:25:42 +00:00
|
|
|
# Enable python3 build by default
|
|
|
|
%bcond_without python3
|
|
|
|
%else
|
|
|
|
%bcond_with python3
|
|
|
|
%endif
|
|
|
|
|
2019-02-27 05:58:48 +00:00
|
|
|
%if 0%{?fedora} || 0%{?rhel} > 7
|
2018-03-15 17:25:42 +00:00
|
|
|
# Disable python2 build by default
|
|
|
|
%bcond_with python2
|
|
|
|
%else
|
|
|
|
%bcond_without python2
|
2016-09-05 15:53:26 +00:00
|
|
|
%endif
|
2013-10-09 21:56:22 +00:00
|
|
|
|
|
|
|
Name: python-%{pypi_name}
|
2018-02-06 16:35:32 +00:00
|
|
|
Version: 1.21
|
2020-05-23 01:05:27 +00:00
|
|
|
Release: 12%{?dist}
|
2013-10-09 21:56:22 +00:00
|
|
|
Summary: Applying JSON Patches in Python
|
|
|
|
|
|
|
|
License: BSD
|
|
|
|
URL: https://github.com/stefankoegl/%{github_name}
|
2016-09-05 15:53:26 +00:00
|
|
|
Source0: https://pypi.io/packages/source/j/jsonpatch/%{pypi_name}-%{version}.tar.gz
|
2018-02-06 16:35:32 +00:00
|
|
|
# tarball from pypi does not include file tests.js required for a specific test.
|
|
|
|
# upstream issue https://github.com/stefankoegl/python-json-patch/issues/82
|
|
|
|
Patch0: 0001-Skip-unit-test-in-packaging.patch
|
2013-10-09 21:56:22 +00:00
|
|
|
|
|
|
|
BuildArch: noarch
|
2016-09-05 15:53:26 +00:00
|
|
|
|
|
|
|
%description
|
|
|
|
Library to apply JSON Patches according to RFC 6902 - Python 2 build.
|
|
|
|
|
2018-03-15 17:25:42 +00:00
|
|
|
%if %{with python2}
|
2016-09-05 15:53:26 +00:00
|
|
|
%package -n python2-%{pypi_name}
|
|
|
|
Summary: Applying JSON Patches in Python 2
|
|
|
|
|
2013-10-09 21:56:22 +00:00
|
|
|
BuildRequires: python2-devel
|
2018-02-06 16:35:32 +00:00
|
|
|
BuildRequires: python2-setuptools
|
|
|
|
BuildRequires: python2-jsonpointer
|
|
|
|
Requires: python2-jsonpointer
|
2013-10-09 21:56:22 +00:00
|
|
|
|
2016-09-05 15:53:26 +00:00
|
|
|
%{?python_provide:%python_provide python2-%{pypi_name}}
|
|
|
|
|
|
|
|
%description -n python2-%{pypi_name}
|
2014-08-29 09:24:43 +00:00
|
|
|
Library to apply JSON Patches according to RFC 6902 - Python 2 build.
|
2018-03-15 17:25:42 +00:00
|
|
|
%endif # with python2
|
2014-08-29 09:24:43 +00:00
|
|
|
|
2018-03-15 17:25:42 +00:00
|
|
|
%if %{with python3}
|
2014-08-29 09:24:43 +00:00
|
|
|
%package -n python3-%{pypi_name}
|
|
|
|
Summary: Applying JSON Patches in Python 3
|
|
|
|
|
|
|
|
BuildRequires: python3-devel
|
|
|
|
BuildRequires: python3-setuptools
|
|
|
|
BuildRequires: python3-jsonpointer
|
|
|
|
Requires: python3-jsonpointer
|
|
|
|
|
2016-09-05 15:53:26 +00:00
|
|
|
%{?python_provide:%python_provide python3-%{pypi_name}}
|
|
|
|
|
2014-08-29 09:24:43 +00:00
|
|
|
%description -n python3-%{pypi_name}
|
|
|
|
Library to apply JSON Patches according to RFC 6902 - Python 3 build.
|
2018-03-15 17:25:42 +00:00
|
|
|
%endif # with python3
|
2013-10-09 21:56:22 +00:00
|
|
|
|
|
|
|
%prep
|
2016-09-05 15:53:26 +00:00
|
|
|
%setup -qn %{pypi_name}-%{version}
|
2016-12-11 21:08:33 +00:00
|
|
|
%patch0 -p1
|
2014-08-29 09:24:43 +00:00
|
|
|
|
2018-02-06 16:35:32 +00:00
|
|
|
|
2013-10-09 21:56:22 +00:00
|
|
|
%build
|
2018-03-15 17:25:42 +00:00
|
|
|
%if %{with python2}
|
2016-09-05 15:53:26 +00:00
|
|
|
%py2_build
|
2018-03-15 17:25:42 +00:00
|
|
|
%endif # with python2
|
2013-10-09 21:56:22 +00:00
|
|
|
|
2018-03-15 17:25:42 +00:00
|
|
|
%if %{with python3}
|
2018-11-18 21:00:23 +00:00
|
|
|
%py3_build
|
2018-03-15 17:25:42 +00:00
|
|
|
%endif # with python3
|
2014-08-29 09:24:43 +00:00
|
|
|
|
2013-10-09 21:56:22 +00:00
|
|
|
%install
|
2018-03-15 17:25:42 +00:00
|
|
|
%if %{with python2}
|
2016-09-05 15:53:26 +00:00
|
|
|
%py2_install
|
|
|
|
for bin in jsondiff jsonpatch; do
|
|
|
|
mv %{buildroot}%{_bindir}/$bin %{buildroot}%{_bindir}/$bin-%{python2_version}
|
|
|
|
ln -s ./$bin-%{python2_version} %{buildroot}%{_bindir}/$bin-2
|
|
|
|
%if !0%{?with_python3}
|
|
|
|
ln -s ./$bin-%{python2_version} %{buildroot}%{_bindir}/$bin
|
|
|
|
%endif
|
|
|
|
done;
|
2018-03-15 17:25:42 +00:00
|
|
|
%endif # with python2
|
2013-10-09 21:56:22 +00:00
|
|
|
|
2018-03-15 17:25:42 +00:00
|
|
|
%if %{with python3}
|
2018-11-18 21:00:23 +00:00
|
|
|
%py3_install
|
2016-09-05 15:53:26 +00:00
|
|
|
for bin in jsondiff jsonpatch; do
|
|
|
|
mv %{buildroot}%{_bindir}/$bin %{buildroot}%{_bindir}/$bin-%{python3_version}
|
|
|
|
ln -s ./$bin-%{python3_version} %{buildroot}%{_bindir}/$bin-3
|
|
|
|
ln -s ./$bin-%{python3_version} %{buildroot}%{_bindir}/$bin
|
|
|
|
done;
|
2018-03-15 17:25:42 +00:00
|
|
|
%endif # with python3
|
2014-08-29 09:24:43 +00:00
|
|
|
|
2013-10-09 21:56:22 +00:00
|
|
|
%check
|
2018-03-15 17:25:42 +00:00
|
|
|
%if %{with python2}
|
2016-09-05 15:53:26 +00:00
|
|
|
%{__python2} tests.py
|
2018-03-15 17:25:42 +00:00
|
|
|
%endif # with python2
|
2013-10-09 21:56:22 +00:00
|
|
|
|
2018-03-15 17:25:42 +00:00
|
|
|
%if %{with python3}
|
2014-08-29 09:24:43 +00:00
|
|
|
%{__python3} tests.py
|
2018-03-15 17:25:42 +00:00
|
|
|
%endif # with python3
|
2014-08-29 09:24:43 +00:00
|
|
|
|
2018-03-15 17:25:42 +00:00
|
|
|
%if %{with python2}
|
2016-09-05 15:53:26 +00:00
|
|
|
%files -n python2-%{pypi_name}
|
2014-07-31 15:14:44 +00:00
|
|
|
%doc README.md
|
|
|
|
%license COPYING
|
2016-09-05 15:53:26 +00:00
|
|
|
%if !0%{?with_python3}
|
|
|
|
%{_bindir}/jsondiff
|
|
|
|
%{_bindir}/jsonpatch
|
|
|
|
%endif
|
|
|
|
%{_bindir}/jsondiff-2*
|
|
|
|
%{_bindir}/jsonpatch-2*
|
|
|
|
%{python2_sitelib}/%{pypi_name}.py*
|
|
|
|
%{python2_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info
|
2018-03-15 17:25:42 +00:00
|
|
|
%endif # with python2
|
2013-10-09 21:56:22 +00:00
|
|
|
|
2018-03-15 17:25:42 +00:00
|
|
|
%if %{with python3}
|
2014-08-29 09:24:43 +00:00
|
|
|
%files -n python3-%{pypi_name}
|
|
|
|
%doc README.md
|
|
|
|
%license COPYING
|
2016-09-05 15:53:26 +00:00
|
|
|
%{_bindir}/jsondiff
|
|
|
|
%{_bindir}/jsonpatch
|
|
|
|
%{_bindir}/jsondiff-3*
|
|
|
|
%{_bindir}/jsonpatch-3*
|
2014-08-29 09:24:43 +00:00
|
|
|
%{python3_sitelib}/%{pypi_name}.py*
|
|
|
|
%{python3_sitelib}/__pycache__/*
|
2020-07-13 19:04:33 +00:00
|
|
|
%{python3_sitelib}/%{pypi_name}-%{version}-py%{python3_version}.egg-info
|
2018-03-15 17:25:42 +00:00
|
|
|
%endif # with python3
|
2014-08-29 09:24:43 +00:00
|
|
|
|
2013-10-09 21:56:22 +00:00
|
|
|
%changelog
|
2020-05-23 01:05:27 +00:00
|
|
|
* Sat May 23 2020 Miro Hrončok <mhroncok@redhat.com> - 1.21-12
|
|
|
|
- Rebuilt for Python 3.9
|
|
|
|
|
2020-01-30 12:56:30 +00:00
|
|
|
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.21-11
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
|
|
|
|
|
2019-10-03 12:16:24 +00:00
|
|
|
* Thu Oct 03 2019 Miro Hrončok <mhroncok@redhat.com> - 1.21-10
|
|
|
|
- Rebuilt for Python 3.8.0rc1 (#1748018)
|
|
|
|
|
2019-08-15 22:40:53 +00:00
|
|
|
* Thu Aug 15 2019 Miro Hrončok <mhroncok@redhat.com> - 1.21-9
|
|
|
|
- Rebuilt for Python 3.8
|
|
|
|
|
2019-07-26 14:10:51 +00:00
|
|
|
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.21-8
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
|
|
|
|
|
2019-02-27 05:58:48 +00:00
|
|
|
* Wed Feb 27 2019 Yatin Karel <ykarel@redhat.com> - 1.21-7
|
|
|
|
- Disable python2 build in Fedora
|
|
|
|
|
2019-02-02 07:25:36 +00:00
|
|
|
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.21-6
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
|
|
|
|
|
2018-11-18 21:00:23 +00:00
|
|
|
* Sun Nov 18 2018 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 1.21-5
|
|
|
|
- Drop explicit locale setting
|
|
|
|
See https://fedoraproject.org/wiki/Changes/Remove_glibc-langpacks-all_from_buildroot
|
|
|
|
|
2018-07-14 00:42:11 +00:00
|
|
|
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.21-4
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
|
|
|
|
|
2018-06-15 17:28:45 +00:00
|
|
|
* Fri Jun 15 2018 Miro Hrončok <mhroncok@redhat.com> - 1.21-3
|
|
|
|
- Rebuilt for Python 3.7
|
|
|
|
|
2018-03-15 17:25:42 +00:00
|
|
|
* Thu Mar 15 2018 Charalampos Stratakis <cstratak@redhat.com> - 1.21-2
|
|
|
|
- Don't build Python 2 subpackage on EL > 7
|
|
|
|
|
2018-02-06 16:35:32 +00:00
|
|
|
* Tue Feb 6 2018 Alfredo Moralejo <amoralej@redhat.com> - 1.21-1
|
|
|
|
- Update to 1.21
|
|
|
|
|
2017-09-29 15:42:20 +00:00
|
|
|
* Fri Sep 29 2017 Troy Dawson <tdawson@redhat.com> - 1.14-5
|
|
|
|
- Cleanup spec file conditionals
|
|
|
|
|
2017-07-27 10:41:29 +00:00
|
|
|
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.14-4
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
|
|
|
|
|
2017-02-11 09:22:10 +00:00
|
|
|
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.14-3
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
|
|
|
|
|
2016-12-11 20:58:46 +00:00
|
|
|
* Fri Dec 09 2016 Charalampos Stratakis <cstratak@redhat.com> - 1.14-2
|
|
|
|
- Rebuild for Python 3.6
|
2016-12-11 21:08:33 +00:00
|
|
|
- Added upstream patch for fixing python3 tests failures
|
2016-12-11 20:58:46 +00:00
|
|
|
|
2016-09-05 15:53:26 +00:00
|
|
|
* Mon Sep 5 2016 Haïkel Guémar <hguemar@fedoraproject.org> - 1.14-1
|
|
|
|
- Upstream 1.14
|
|
|
|
- Update to latest python packaging guidelines
|
|
|
|
|
2016-07-19 10:10:02 +00:00
|
|
|
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2-9
|
|
|
|
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
|
|
|
|
|
2016-02-04 19:58:24 +00:00
|
|
|
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.2-8
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
|
|
|
|
|
2015-11-10 16:11:23 +00:00
|
|
|
* Tue Nov 10 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2-7
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5
|
|
|
|
|
2015-06-18 19:42:43 +00:00
|
|
|
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2-6
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
|
|
|
|
|
2014-08-29 09:24:43 +00:00
|
|
|
* Fri Aug 29 2014 Bohuslav Kabrda <bkabrda@redhat.com> - 1.2-5
|
|
|
|
- Introduce python3- subpackage.
|
|
|
|
|
2014-07-31 15:14:44 +00:00
|
|
|
* Thu Jul 31 2014 Tom Callaway <spot@fedoraproject.org> - 1.2-4
|
|
|
|
- fix license handling
|
|
|
|
|
2014-06-07 20:59:09 +00:00
|
|
|
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2-3
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
|
|
|
|
|
2013-10-14 22:07:01 +00:00
|
|
|
* Tue Oct 15 2013 Alan Pevec <apevec@gmail.com> - 1.2-2
|
|
|
|
- add runtime dep on jsonpointer
|
|
|
|
|
2013-10-11 22:15:28 +00:00
|
|
|
* Fri Oct 11 2013 Alan Pevec <apevec@gmail.com> - 1.2-1
|
|
|
|
- Update to 1.2
|
|
|
|
|
2013-10-09 21:56:22 +00:00
|
|
|
* Fri Sep 13 2013 Alan Pevec <apevec@gmail.com> - 1.1-2
|
|
|
|
- review feedback: move %%check section, add missing build requirements
|
|
|
|
|
|
|
|
* Mon Jul 01 2013 Alan Pevec <apevec@gmail.com> - 1.1-1
|
|
|
|
- Initial package.
|