# # spec file for package python-freezegun # # Copyright (c) 2020 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via https://bugs.opensuse.org/ # %{?!python_module:%define python_module() python-%{**} python3-%{**}} %bcond_without python2 Name: python-freezegun Version: 0.3.15 Release: 1.1 Summary: Mock time date for Python License: Apache-2.0 URL: https://github.com/spulec/freezegun Source: https://files.pythonhosted.org/packages/source/f/freezegun/freezegun-%{version}.tar.gz # gh#spulec/freezegun#259 Patch1: denose.patch BuildRequires: %{python_module pytest} BuildRequires: %{python_module python-dateutil > 2.0} BuildRequires: %{python_module setuptools} BuildRequires: %{python_module six} BuildRequires: %{pythons} BuildRequires: fdupes BuildRequires: python-rpm-macros Requires: python Requires: python-python-dateutil > 2.0 Requires: python-six BuildArch: noarch %if %{with python2} BuildRequires: python-mock %endif %python_subpackages %description FreezeGun is a library that allows your python tests to travel through time by mocking the datetime module. %prep %setup -q -n freezegun-%{version} %autopatch -p1 %build %python_build %install %python_install %python_expand %fdupes %{buildroot}%{$python_sitelib} %check %python_exec -munittest discover -v %files %{python_files} %license LICENSE %doc README.rst %{python_sitelib}/* %changelog * Wed Mar 11 2020 Tomáš Chvátal - Fix build without python2 available * Wed Mar 11 2020 Dirk Mueller - update to 0.3.15: * Fix locale timestamp bug. CC #328 * Fix calendar.timegm behavior * Fix for Py3.8 * Reset time.time_ns on stop - drop remove_dependency_on_mock.patch * Thu Nov 14 2019 Matej Cepl - Add dependency on the full python (which is not pulled by setuptools anymore). Use %%{pythons} macro now. * Tue Jul 2 2019 Matej Cepl - Upgrade to 0.3.12: * Refactor classes to functions * Ignore Selenium * Move to pytest * Conditionally patch time.clock (removed in 3.8) * Patch time.time_ns added in Python 3.7 * Wed Feb 6 2019 John Vandenberg - Do not require python2 module for building python3 module * Thu Jan 10 2019 mcepl@suse.com - Update to 0.3.11: * Performance improvements * Fix nesting time.time * Add nanosecond property - Remove nose dependency by adding denose.patch - Remove _u_p37_tests.patch, which is superseeded by new release. * Tue Dec 4 2018 Matej Cepl - Remove superfluous devel dependency for noarch package * Tue Sep 4 2018 Matěj Cepl - Add remove_dependency_on_mock.patch which removes dependency on python-mock for Python 3, where it is not required. * Sun Jul 15 2018 mimi.vx@gmail.com - update to 0.3.10 - add _u_p37_tests.patch * Performance improvements * Coroutine support * Fri Feb 23 2018 tbechtold@suse.com - Drop python-sure BuildRequires. Add python-mock BuildRequires. * Mon May 22 2017 toddrme2178@gmail.com - Implement single-spec version - Fix source URL - update to version 0.3.9 * If no time to be frozen, use current time * Fix uuid1 issues * Add support for python 3.6 - Remove unused freeze_hideDeps.patch * Fri Nov 25 2016 tbechtold@suse.com update to version 0.3.8 * Improved unpatching when importing modules after freeze_time start() * Tidy up tick=True * PEP8-ify code * 0.3.7 * Add manual increment via tick method * Add @zmsmith to authors. * Clean up and speed up start(). * Globally exclude __pycache__ and py[co] from sdist * Catch TypeError when fetching attribute values * Fix bug with time.localtime not being reset. Closes #112. * Fix test to work when current timezone is GMT-14 or GMT+14. * 0.3.8 * 0.3.6 * Updated readme.md with svg badges * Speed up stop() like commit e93c7b4 * Fix assertion in usage example * Add method to change freezed time * Fixed #162 - allow decorating old-style classes. * Add support to PyMySQL * Cleanup code. * do not use hex numbers in readme * Assume the default time to freeze is "now". * Register fake types in PyMySQL conversions * Ignore threading and Queue modules. Closes #129. * Add missing parenthesis * Lock down coverage version since new coverage doesnt support py3.2 * Add test case * Fix or py3 astimezone and not passing tz. Closes #138. * Fixing halfdone work using None parameter for freeze_time(), when using 'with freeze_time() as ...' syntax. * Fixed #101 - ignore warnings when patching imported modules. * Add docs for tick argument. * Set default tz to None * Add note about deafult arguments. Closes #140. * Add license info. Closes #120. * Fri Feb 26 2016 tbechtold@suse.com - Require python-python-dateutil. package was renamed * Fri Sep 4 2015 toddrme2178@gmail.com - Update to 0.3.5 * No upstream changelog - Remove unneeded freeze_hideDeps.patch * Mon Feb 9 2015 p.drouand@gmail.com - Use download Url as source - Use tarball provided by pypi * Sun Feb 1 2015 rjschwei@suse.com - Initial build version 0.2.8 + add freeze_hideDeps.patch