Compare commits
19 Commits
Author | SHA1 | Date |
---|---|---|
MSVSphere Packaging Team | 2b5ccf4659 | 1 year ago |
MSVSphere Packaging Team | aeefff3fc4 | 1 year ago |
Sergey Cherevko | 56d7e1ec02 | 2 years ago |
Tomáš Hrnčiar | 2bfae94ef5 | 3 years ago |
Fedora Release Engineering | a6d14de4a1 | 4 years ago |
Miro Hrončok | b51fffdf93 | 4 years ago |
Miro Hrončok | da8be3f62b | 4 years ago |
Python Maint | 933e982bc0 | 4 years ago |
Stephen Gallagher | 3192c99f3a | 4 years ago |
Fedora Release Engineering | 42246689ed | 4 years ago |
Kevin Fenzi | 0ac8ac55ad | 4 years ago |
Joel Capitao | 0fcddec2f3 | 4 years ago |
yatinkarel | 677a0160af | 4 years ago |
Fedora Release Engineering | 4b62b6ee4e | 5 years ago |
Miro Hrončok | fc24a9eb0f | 5 years ago |
Fedora Release Engineering | c1c87c7b79 | 5 years ago |
Miro Hrončok | fd557f78e4 | 5 years ago |
Richard Shaw | 1771215cb3 | 6 years ago |
Fedora Release Engineering | bd6dbaa9b3 | 6 years ago |
@ -1,7 +1 @@
|
|||||||
/freezegun-0.1.12.tar.gz
|
SOURCES/freezegun-1.1.0.tar.gz
|
||||||
/freezegun-0.3.2.tar.gz
|
|
||||||
/freezegun-0.3.6.tar.gz
|
|
||||||
/freezegun-0.3.8.tar.gz
|
|
||||||
/freezegun-0.3.10.tar.gz
|
|
||||||
/freezegun-0.3.11.tar.gz
|
|
||||||
/freezegun-0.3.12.tar.gz
|
|
||||||
|
@ -0,0 +1 @@
|
|||||||
|
18529e0d19f6789c76f13a9eddc25e0eb04d053b SOURCES/freezegun-1.1.0.tar.gz
|
@ -0,0 +1,26 @@
|
|||||||
|
From e63874ce75a74a1159390914045fe8e7955b24c4 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Karthikeyan Singaravelan <tir.karthi@gmail.com>
|
||||||
|
Date: Fri, 7 May 2021 15:51:33 +0000
|
||||||
|
Subject: [PATCH] Fix decorate_class for Python 3.10 where staticmethod is
|
||||||
|
callable.
|
||||||
|
|
||||||
|
---
|
||||||
|
freezegun/api.py | 5 ++++-
|
||||||
|
1 file changed, 4 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/freezegun/api.py b/freezegun/api.py
|
||||||
|
index cab9ebe..55a80c7 100644
|
||||||
|
--- a/freezegun/api.py
|
||||||
|
+++ b/freezegun/api.py
|
||||||
|
@@ -598,7 +598,10 @@ def tearDownClass(cls):
|
||||||
|
continue
|
||||||
|
seen.add(attr)
|
||||||
|
|
||||||
|
- if not callable(attr_value) or inspect.isclass(attr_value):
|
||||||
|
+ # staticmethods are callable from Python 3.10 . Hence skip them from decoration
|
||||||
|
+ if (not callable(attr_value)
|
||||||
|
+ or inspect.isclass(attr_value)
|
||||||
|
+ or isinstance(attr_value, staticmethod)):
|
||||||
|
continue
|
||||||
|
|
||||||
|
try:
|
@ -1,154 +1,119 @@
|
|||||||
%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 with_tests 0
|
|
||||||
|
|
||||||
%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: 1.1.0
|
||||||
Release: 1%{?dist}.1
|
Release: 1%{?dist}
|
||||||
Summary: %{sum}
|
Summary: %{sum}
|
||||||
|
|
||||||
License: ASL 2.0
|
License: ASL 2.0
|
||||||
URL: https://pypi.io/project/freezegun
|
URL: https://pypi.io/project/freezegun
|
||||||
Source0: https://pypi.io/packages/source/f/%{modname}/%{modname}-%{version}.tar.gz
|
Source0: https://pypi.io/packages/source/f/%{modname}/%{modname}-%{version}.tar.gz
|
||||||
|
|
||||||
|
# Fix decorate_class for Python 3.10 where staticmethod is callable
|
||||||
|
Patch1: https://github.com/spulec/freezegun/pull/397.patch
|
||||||
|
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
|
|
||||||
%description
|
%description
|
||||||
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-coverage
|
|
||||||
BuildRequires: python2-mock
|
|
||||||
%if 0%{?with_tests}
|
|
||||||
BuildRequires: python2-pytest
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%{?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}
|
||||||
|
|
||||||
BuildRequires: python3-devel
|
BuildRequires: python3-devel
|
||||||
BuildRequires: python3-setuptools
|
BuildRequires: python3-setuptools
|
||||||
BuildRequires: python3-six
|
BuildRequires: python3-six
|
||||||
BuildRequires: python3-dateutil
|
BuildRequires: python3-dateutil >= 2.7
|
||||||
BuildRequires: python3-sure
|
|
||||||
BuildRequires: python3.6dist(coverage)
|
|
||||||
BuildRequires: python3-mock
|
|
||||||
|
|
||||||
%if 0%{?with_tests}
|
|
||||||
BuildRequires: python3-pytest
|
BuildRequires: python3-pytest
|
||||||
%endif
|
|
||||||
|
|
||||||
%{?python_provide:%python_provide python3-freezegun}
|
%{?python_provide:%python_provide python3-freezegun}
|
||||||
|
|
||||||
Requires: python3-six
|
Requires: python3-six
|
||||||
Requires: python3-dateutil
|
Requires: python3-dateutil >= 2.7
|
||||||
|
|
||||||
%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
|
|
||||||
|
|
||||||
%if 0%{?with_tests}
|
|
||||||
%check
|
%check
|
||||||
%if %{with python3}
|
# Ignore two tests that are broken when run on systems in certain timezones.
|
||||||
pushd %{py3dir}
|
# Reported upstream: https://github.com/spulec/freezegun/issues/348
|
||||||
# Ignore test_uuid1_future and test_uuid1_past for now as they fail with Python 3.8
|
pytest-3 --deselect tests/test_datetimes.py::TestUnitTestMethodDecorator::test_method_decorator_works_on_unittest_kwarg_frozen_time \
|
||||||
# Reported upstream: https://github.com/spulec/freezegun/issues/293
|
--deselect tests/test_datetimes.py::TestUnitTestMethodDecorator::test_method_decorator_works_on_unittest_kwarg_hello
|
||||||
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
|
|
||||||
%endif # with_tests
|
|
||||||
|
|
||||||
|
|
||||||
%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
|
||||||
* Thu Jul 25 2019 Stephen Smoogen <smooge@fedoraproject.org> - 0.3.12-1.1
|
* Thu Apr 27 2023 Sergey Cherevko <s.cherevko@msvsphere.ru> - 1.1.0-1
|
||||||
- Python-tests is now required for %check but is not in EPEL. Turning off for initial buildset.
|
- Rebuilt for MSVSphere 9.1
|
||||||
|
|
||||||
|
* Wed Sep 15 2021 Tomáš Hrnčiar <thrnciar@redhat.com> - 1.1.0-1
|
||||||
|
- Update to 1.1.0
|
||||||
|
|
||||||
|
* Tue Jul 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.0-7
|
||||||
|
- Second attempt - Rebuilt for
|
||||||
|
https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
|
||||||
|
|
||||||
|
* Mon Jun 21 2021 Miro Hrončok <mhroncok@redhat.com> - 1.0.0-6
|
||||||
|
- Remove unused build dependency on python-sure
|
||||||
|
|
||||||
|
* Wed Jun 02 2021 Python Maint <python-maint@redhat.com> - 1.0.0-5
|
||||||
|
- Rebuilt for Python 3.10
|
||||||
|
|
||||||
|
* Fri Feb 19 2021 Stephen Gallagher <sgallagh@redhat.com> - 1.0.0-4
|
||||||
|
- Skip tests that are buggy on certain architectures
|
||||||
|
- Restore the UUID tests, as the bug was fixed some time ago
|
||||||
|
|
||||||
|
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.0-3
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
|
||||||
|
|
||||||
|
* Tue Nov 24 2020 Kevin Fenzi <kevin@scrye.com> - 1.0.0-2
|
||||||
|
- Drop build deps on python-mock and python-coverage.
|
||||||
|
|
||||||
|
* Thu Nov 19 2020 Joel Capitao <jcapitao@redhat.com> - 1.0.0-1
|
||||||
|
- Update to 1.0.0
|
||||||
|
|
||||||
|
* Tue Sep 08 2020 Yatin Karel <ykarel@redhat.com> - 0.3.15-1
|
||||||
|
- Update to 0.3.15
|
||||||
|
|
||||||
|
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.12-7
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
||||||
|
|
||||||
|
* Fri May 22 2020 Miro Hrončok <mhroncok@redhat.com> - 0.3.12-6
|
||||||
|
- Rebuilt for Python 3.9
|
||||||
|
|
||||||
|
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.12-5
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
|
||||||
|
|
||||||
|
* 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
|
||||||
|
- Rebuild with Python 3.8.
|
||||||
|
|
||||||
|
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.12-2
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
|
||||||
|
|
||||||
* Wed Jun 05 2019 Charalampos Stratakis <cstratak@redhat.com> - 0.3.12-1
|
* Wed Jun 05 2019 Charalampos Stratakis <cstratak@redhat.com> - 0.3.12-1
|
||||||
- Update to 0.3.12
|
- Update to 0.3.12
|
Loading…
Reference in new issue