# # spec file for package python-freezegun # # Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. # # 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 http://bugs.opensuse.org/ # %bcond_without tests %{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-freezegun Version: 0.3.9 Release: 2.1 Url: https://github.com/spulec/freezegun Summary: Mock time date for Python License: Apache-2.0 Group: Development/Languages/Python Source: https://files.pythonhosted.org/packages/source/f/freezegun/freezegun-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: %{python_module devel} BuildRequires: %{python_module python-dateutil > 2.0} BuildRequires: %{python_module setuptools} BuildRequires: %{python_module six} BuildRequires: fdupes BuildRequires: python-rpm-macros %if %{with tests} BuildRequires: %{python_module mock} BuildRequires: %{python_module nose} %endif Requires: python-python-dateutil > 2.0 Requires: python-six BuildArch: noarch %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} %build %python_build %install %python_install %python_expand %fdupes %{buildroot}%{$python_sitelib} %if %{with tests} %check %python_expand nosetests-%{$python_bin_suffix} %endif %files %{python_files} %defattr(-,root,root,-) %doc LICENSE README.rst %{python_sitelib}/* %changelog * 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