Drop conflicting jsondiff binary rhbz#2029805
This commit is contained in:
parent
6a4f73cb55
commit
d6735e6893
@ -1,22 +1,8 @@
|
|||||||
%global pypi_name jsonpatch
|
%global pypi_name jsonpatch
|
||||||
|
|
||||||
%if 0%{?fedora} || 0%{?rhel} > 7
|
|
||||||
# Enable python3 build by default
|
|
||||||
%bcond_without python3
|
|
||||||
%else
|
|
||||||
%bcond_with python3
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%if 0%{?fedora} || 0%{?rhel} > 7
|
|
||||||
# Disable python2 build by default
|
|
||||||
%bcond_with python2
|
|
||||||
%else
|
|
||||||
%bcond_without python2
|
|
||||||
%endif
|
|
||||||
|
|
||||||
Name: python-%{pypi_name}
|
Name: python-%{pypi_name}
|
||||||
Version: 1.21
|
Version: 1.21
|
||||||
Release: 17%{?dist}
|
Release: 18%{?dist}
|
||||||
Summary: Applying JSON Patches in Python
|
Summary: Applying JSON Patches in Python
|
||||||
|
|
||||||
License: BSD
|
License: BSD
|
||||||
@ -31,22 +17,6 @@ BuildArch: noarch
|
|||||||
%description
|
%description
|
||||||
Library to apply JSON Patches according to RFC 6902 - Python 2 build.
|
Library to apply JSON Patches according to RFC 6902 - Python 2 build.
|
||||||
|
|
||||||
%if %{with python2}
|
|
||||||
%package -n python2-%{pypi_name}
|
|
||||||
Summary: Applying JSON Patches in Python 2
|
|
||||||
|
|
||||||
BuildRequires: python2-devel
|
|
||||||
BuildRequires: python2-setuptools
|
|
||||||
BuildRequires: python2-jsonpointer
|
|
||||||
Requires: python2-jsonpointer
|
|
||||||
|
|
||||||
%{?python_provide:%python_provide python2-%{pypi_name}}
|
|
||||||
|
|
||||||
%description -n python2-%{pypi_name}
|
|
||||||
Library to apply JSON Patches according to RFC 6902 - Python 2 build.
|
|
||||||
%endif # with python2
|
|
||||||
|
|
||||||
%if %{with python3}
|
|
||||||
%package -n python3-%{pypi_name}
|
%package -n python3-%{pypi_name}
|
||||||
Summary: Applying JSON Patches in Python 3
|
Summary: Applying JSON Patches in Python 3
|
||||||
|
|
||||||
@ -59,7 +29,6 @@ Requires: python3-jsonpointer
|
|||||||
|
|
||||||
%description -n python3-%{pypi_name}
|
%description -n python3-%{pypi_name}
|
||||||
Library to apply JSON Patches according to RFC 6902 - Python 3 build.
|
Library to apply JSON Patches according to RFC 6902 - Python 3 build.
|
||||||
%endif # with python3
|
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -qn %{pypi_name}-%{version}
|
%setup -qn %{pypi_name}-%{version}
|
||||||
@ -67,72 +36,33 @@ Library to apply JSON Patches according to RFC 6902 - Python 3 build.
|
|||||||
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%if %{with python2}
|
|
||||||
%py2_build
|
|
||||||
%endif # with python2
|
|
||||||
|
|
||||||
%if %{with python3}
|
|
||||||
%py3_build
|
%py3_build
|
||||||
%endif # with python3
|
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%if %{with python2}
|
|
||||||
%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;
|
|
||||||
%endif # with python2
|
|
||||||
|
|
||||||
%if %{with python3}
|
|
||||||
%py3_install
|
%py3_install
|
||||||
for bin in jsondiff jsonpatch; do
|
# remove jsondiff binary conflicting with python-jsondiff
|
||||||
mv %{buildroot}%{_bindir}/$bin %{buildroot}%{_bindir}/$bin-%{python3_version}
|
# https://bugzilla.redhat.com/show_bug.cgi?id=2029805
|
||||||
ln -s ./$bin-%{python3_version} %{buildroot}%{_bindir}/$bin-3
|
rm %{buildroot}%{_bindir}/jsondiff
|
||||||
ln -s ./$bin-%{python3_version} %{buildroot}%{_bindir}/$bin
|
mv %{buildroot}%{_bindir}/jsonpatch %{buildroot}%{_bindir}/jsonpatch-%{python3_version}
|
||||||
done;
|
ln -s ./jsonpatch-%{python3_version} %{buildroot}%{_bindir}/jsonpatch-3
|
||||||
%endif # with python3
|
ln -s ./jsonpatch-%{python3_version} %{buildroot}%{_bindir}/jsonpatch
|
||||||
|
|
||||||
%check
|
%check
|
||||||
%if %{with python2}
|
|
||||||
%{__python2} tests.py
|
|
||||||
%endif # with python2
|
|
||||||
|
|
||||||
%if %{with python3}
|
|
||||||
%{__python3} tests.py
|
%{__python3} tests.py
|
||||||
%endif # with python3
|
|
||||||
|
|
||||||
%if %{with python2}
|
|
||||||
%files -n python2-%{pypi_name}
|
|
||||||
%doc README.md
|
|
||||||
%license COPYING
|
|
||||||
%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
|
|
||||||
%endif # with python2
|
|
||||||
|
|
||||||
%if %{with python3}
|
|
||||||
%files -n python3-%{pypi_name}
|
%files -n python3-%{pypi_name}
|
||||||
%doc README.md
|
%doc README.md
|
||||||
%license COPYING
|
%license COPYING
|
||||||
%{_bindir}/jsondiff
|
|
||||||
%{_bindir}/jsonpatch
|
%{_bindir}/jsonpatch
|
||||||
%{_bindir}/jsondiff-3*
|
|
||||||
%{_bindir}/jsonpatch-3*
|
%{_bindir}/jsonpatch-3*
|
||||||
%{python3_sitelib}/%{pypi_name}.py*
|
%{python3_sitelib}/%{pypi_name}.py*
|
||||||
%{python3_sitelib}/__pycache__/*
|
%{python3_sitelib}/__pycache__/*
|
||||||
%{python3_sitelib}/%{pypi_name}-%{version}-py%{python3_version}.egg-info
|
%{python3_sitelib}/%{pypi_name}-%{version}-py%{python3_version}.egg-info
|
||||||
%endif # with python3
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Dec 7 2021 Alan Pevec <apevec AT redhat.com> - 1.21-18
|
||||||
|
- Drop conflicting jsondiff binary rhbz#2029805
|
||||||
|
|
||||||
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.21-17
|
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.21-17
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user