Blame SPECS/python-jsonpatch.spec

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