Subpackage python2-freezegun has been removed

epel9
Miro Hrončok 5 years ago
parent 1771215cb3
commit fd557f78e4

@ -1,23 +1,9 @@
%if 0%{?fedora} || 0%{?rhel} > 7
# Enable python3 build by default
%bcond_without python3
%else
%bcond_with python3
%endif
%if 0%{?rhel} > 7
# Disable python2 build by default
%bcond_with python2
%else
%bcond_without python2
%endif
%global modname freezegun %global modname freezegun
%global sum Let your Python tests travel through time %global sum Let your Python tests travel through time
Name: python-freezegun Name: python-freezegun
Version: 0.3.12 Version: 0.3.12
Release: 3%{?dist} Release: 4%{?dist}
Summary: %{sum} Summary: %{sum}
License: ASL 2.0 License: ASL 2.0
@ -30,30 +16,7 @@ BuildArch: noarch
freezegun is a library that allows your python tests to travel through time by freezegun is a library that allows your python tests to travel through time by
mocking the datetime module. mocking the datetime module.
%if %{with python2}
%package -n python2-freezegun
Summary: %{sum}
BuildRequires: python2-devel
BuildRequires: python2-setuptools
BuildRequires: python2-six
BuildRequires: python2-dateutil
BuildRequires: python2-sure
BuildRequires: python2-pytest
BuildRequires: python2-coverage
BuildRequires: python2-mock
%{?python_provide:%python_provide python2-freezegun}
Requires: python2-six
Requires: python2-dateutil
%description -n python2-freezegun
freezegun is a library that allows your python tests to travel through time by
mocking the datetime module. This is the Python 2 library.
%endif # with python2
%if %{with python3}
%package -n python3-freezegun %package -n python3-freezegun
Summary: %{sum} Summary: %{sum}
@ -74,69 +37,36 @@ Requires: python3-dateutil
%description -n python3-freezegun %description -n python3-freezegun
freezegun is a library that allows your python tests to travel through time by freezegun is a library that allows your python tests to travel through time by
mocking the datetime module. This is the Python 3 library. mocking the datetime module. This is the Python 3 library.
%endif # with python3
%prep %prep
%autosetup -p1 -n %{modname}-%{version} %autosetup -p1 -n %{modname}-%{version}
# Remove bundled egg-info in case it exists # Remove bundled egg-info in case it exists
rm -rf %{modname}.egg-info rm -rf %{modname}.egg-info
%if %{with python3}
rm -rf %{py3dir}
cp -a . %{py3dir}
%endif # with python3
%build %build
%if %{with python2}
%py2_build
%endif # with python2
%if %{with python3}
pushd %{py3dir}
%py3_build %py3_build
popd
%endif # with python3
%install %install
%if %{with python3}
pushd %{py3dir}
%py3_install %py3_install
popd
%endif # with python3
%if %{with python2}
%py2_install
# Remove py3 only async module
rm -f $RPM_BUILD_ROOT/%{python2_sitelib}/%{modname}/_async.py
%endif # with python2
%check %check
%if %{with python3}
pushd %{py3dir}
# Ignore test_uuid1_future and test_uuid1_past for now as they fail with Python 3.8 # Ignore test_uuid1_future and test_uuid1_past for now as they fail with Python 3.8
# Reported upstream: https://github.com/spulec/freezegun/issues/293 # Reported upstream: https://github.com/spulec/freezegun/issues/293
pytest-3 --deselect tests/test_uuid.py::test_uuid1_future --deselect tests/test_uuid.py::test_uuid1_past pytest-3 --deselect tests/test_uuid.py::test_uuid1_future --deselect tests/test_uuid.py::test_uuid1_past
popd
%endif # with python3
%if %{with python2}
pytest-2
%endif # with python2
%if %{with python2}
%files -n python2-freezegun
%doc README.rst LICENSE
%{python2_sitelib}/%{modname}/
%{python2_sitelib}/%{modname}-%{version}*
%endif # with python2
%if %{with python3}
%files -n python3-freezegun %files -n python3-freezegun
%doc README.rst LICENSE %doc README.rst LICENSE
%{python3_sitelib}/%{modname}/ %{python3_sitelib}/%{modname}/
%{python3_sitelib}/%{modname}-%{version}-* %{python3_sitelib}/%{modname}-%{version}-*
%endif # with python3
%changelog %changelog
* Sat Sep 21 2019 Miro Hrončok <mhroncok@redhat.com> - 0.3.12-4
- Subpackage python2-freezegun has been removed
See https://fedoraproject.org/wiki/Changes/Mass_Python_2_Package_Removal
* Thu Aug 15 2019 Richard Shaw <hobbes1069@gmail.com> - 0.3.12-3 * Thu Aug 15 2019 Richard Shaw <hobbes1069@gmail.com> - 0.3.12-3
- Rebuild with Python 3.8. - Rebuild with Python 3.8.

Loading…
Cancel
Save