| |
@@ -1,22 +1,8 @@
|
| |
%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}
|
| |
Version: 1.21
|
| |
- Release: 17%{?dist}
|
| |
+ Release: 18%{?dist}
|
| |
Summary: Applying JSON Patches in Python
|
| |
|
| |
License: BSD
|
| |
@@ -31,22 +17,6 @@
|
| |
%description
|
| |
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}
|
| |
Summary: Applying JSON Patches in Python 3
|
| |
|
| |
@@ -59,7 +29,6 @@
|
| |
|
| |
%description -n python3-%{pypi_name}
|
| |
Library to apply JSON Patches according to RFC 6902 - Python 3 build.
|
| |
- %endif # with python3
|
| |
|
| |
%prep
|
| |
%setup -qn %{pypi_name}-%{version}
|
| |
@@ -67,72 +36,33 @@
|
| |
|
| |
|
| |
%build
|
| |
- %if %{with python2}
|
| |
- %py2_build
|
| |
- %endif # with python2
|
| |
-
|
| |
- %if %{with python3}
|
| |
%py3_build
|
| |
- %endif # with python3
|
| |
|
| |
%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
|
| |
- 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;
|
| |
- %endif # with python3
|
| |
+ # remove jsondiff binary conflicting with python-jsondiff
|
| |
+ # https://bugzilla.redhat.com/show_bug.cgi?id=2029805
|
| |
+ rm %{buildroot}%{_bindir}/jsondiff
|
| |
+ mv %{buildroot}%{_bindir}/jsonpatch %{buildroot}%{_bindir}/jsonpatch-%{python3_version}
|
| |
+ ln -s ./jsonpatch-%{python3_version} %{buildroot}%{_bindir}/jsonpatch-3
|
| |
+ ln -s ./jsonpatch-%{python3_version} %{buildroot}%{_bindir}/jsonpatch
|
| |
|
| |
%check
|
| |
- %if %{with python2}
|
| |
- %{__python2} tests.py
|
| |
- %endif # with python2
|
| |
-
|
| |
- %if %{with python3}
|
| |
%{__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}
|
| |
%doc README.md
|
| |
%license COPYING
|
| |
- %{_bindir}/jsondiff
|
| |
%{_bindir}/jsonpatch
|
| |
- %{_bindir}/jsondiff-3*
|
| |
%{_bindir}/jsonpatch-3*
|
| |
%{python3_sitelib}/%{pypi_name}.py*
|
| |
%{python3_sitelib}/__pycache__/*
|
| |
%{python3_sitelib}/%{pypi_name}-%{version}-py%{python3_version}.egg-info
|
| |
- %endif # with python3
|
| |
|
| |
%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
|
| |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
|
| |
|
| |