%if 0%{?fedora} %bcond_without python3 %else %bcond_with python3 %endif %if 0%{?fedora} >= 30 %bcond_with python2 %else %bcond_without python2 %endif Name: python-deepdiff Version: 4.3.1 Release: 2%{?dist} Summary: Deep Difference and search of any Python object/data License: MIT URL: https://github.com/seperman/deepdiff/ Source0: https://github.com/seperman/deepdiff/archive/%{version}/%{name}-%{version}.tar.gz BuildArch: noarch %if %{with python2} BuildRequires: python2-devel BuildRequires: python2-ordered-set BuildRequires: python2-pytest BuildRequires: python2dist(jsonpickle) BuildRequires: python2dist(mock) BuildRequires: python2dist(setuptools) # For docs BuildRequires: python2dist(sphinx) # For tests BuildRequires: python2dist(numpy) %endif %if %{with python3} BuildRequires: python3-devel BuildRequires: python3-ordered-set BuildRequires: python3-pytest BuildRequires: python3dist(jsonpickle) BuildRequires: python3dist(mock) BuildRequires: python3dist(setuptools) # For docs BuildRequires: python3dist(sphinx) # For tests BuildRequires: python3dist(numpy) %endif %description Deep Difference of dictionaries, iterables, strings and other objects. It will recursively look for all the changes. %if %{with python2} %package -n python2-deepdiff Summary: Python 2 package of %{name} Requires: python2-jsonpickle %description -n python2-deepdiff Deep Difference of dictionaries, iterables, strings and other objects. It will recursively look for all the changes. This is the Python 2 package. %endif # with python2 %if %{with python3} %package -n python3-deepdiff Summary: Python 3 package of %{name} Requires: python3-jsonpickle %description -n python3-deepdiff Deep Difference of dictionaries, iterables, strings and other objects. It will recursively look for all the changes. This is the Python 3 package. %endif # with python3 %prep %autosetup -n deepdiff-%{version} find deepdiff/ -name \*.py -exec sed -i '/#!\/usr\/bin\/env /d' {} \; %build %if %{with python2} %{py2_build} %endif %if %{with python3} %{py3_build} %endif # with python3 # Build docs make -C docs html # remove the sphinx-build leftovers rm -rf docs/_build/html/.{doctrees,buildinfo} %install # Must do the python3 install first because the scripts in /usr/bin are # overwritten with every setup.py install (and we want the python2 version # to be the default for now). %if %{with python3} %{py3_install} %endif # with python3 %if %{with python2} %{py2_install} %endif # with python2 %check %if %{with python3} %{__python3} setup.py test %endif %if %{with python2} %{__python2} setup.py test %endif %if %{with python2} %files -n python2-deepdiff %license LICENSE %doc AUTHORS README.md docs/_build/html %{python2_sitelib}/deepdiff/ %{python2_sitelib}/deepdiff-%{version}-py*.egg-info %endif %if %{with python3} %files -n python3-deepdiff %license LICENSE %doc AUTHORS README.md docs/_build/html %{python3_sitelib}/deepdiff/ %{python3_sitelib}/deepdiff-%{version}-py*.egg-info %endif # with python3 %changelog * Tue May 26 2020 Miro Hrončok - 4.3.1-2 - Rebuilt for Python 3.9 * Fri Mar 13 2020 Susi Lehtola - 4.3.1-1 - Update to 4.3.1. * Thu Jan 30 2020 Fedora Release Engineering - 4.0.7-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild * Thu Oct 03 2019 Miro Hrončok - 4.0.7-3 - Rebuilt for Python 3.8.0rc1 (#1748018) * Mon Aug 19 2019 Miro Hrončok - 4.0.7-2 - Rebuilt for Python 3.8 * Wed Jul 24 2019 Susi Lehtola - 4.0.7-1 - Update to 4.0.7. * Wed May 15 2019 Susi Lehtola - 4.0.6-1 - Update to 4.0.6. * Sat Feb 02 2019 Fedora Release Engineering - 3.3.0-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild * Mon Sep 24 2018 Susi Lehtola - 3.3.0-3 - Further review fixes. * Mon Sep 24 2018 Susi Lehtola - 3.3.0-2 - Review fixes. * Sat Sep 22 2018 Susi Lehtola - 3.3.0-1 - First release.