# # spec file for package python-tempora # # Copyright (c) 2023 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/ # %define skip_python2 1 %define skip_python36 1 %define skip_python38 1 %define skip_python39 1 %define skip_python311 1 %define skip_python2 1 %if 0%{?suse_version} > 1500 %bcond_with libalternatives %else %bcond_with libalternatives %endif %{?sle15_python_module_pythons} Name: python-tempora Version: 5.2.2 Release: 1.2 Summary: Objects and routines pertaining to date and time (tempora) License: MIT URL: https://github.com/jaraco/tempora Source: https://files.pythonhosted.org/packages/source/t/tempora/tempora-%{version}.tar.gz BuildRequires: %{python_module base >= 3.7} BuildRequires: %{python_module freezegun} BuildRequires: %{python_module jaraco.functools >= 1.20} BuildRequires: %{python_module pip} BuildRequires: %{python_module pytest > 4.6} BuildRequires: %{python_module pytest-freezegun} BuildRequires: %{python_module pytz} BuildRequires: %{python_module setuptools >= 56} BuildRequires: %{python_module setuptools_scm >= 3.4.1} BuildRequires: %{python_module toml} BuildRequires: %{python_module wheel} BuildRequires: fdupes BuildRequires: python-rpm-macros >= 20210929 Requires: python-jaraco.functools >= 1.20 Requires: python-pytz BuildArch: noarch %if %{with libalternatives} BuildRequires: alts Requires: alts %else Requires(post): update-alternatives Requires(postun):update-alternatives %endif %python_subpackages %description Objects and routines pertaining to date and time (tempora) Modules include: * tempora (top level package module) contains miscellaneous utilities and constants. * timing contains routines for measuring and profiling. * schedule contains an event scheduler. %prep %setup -q -n tempora-%{version} sed -i '/--mypy/d' pytest.ini %build %pyproject_wheel %install %pyproject_install %python_clone -a %{buildroot}%{_bindir}/calc-prorate %python_expand %fdupes %{buildroot}%{$python_sitelib} %check sed -i -e 's:--black::' -e 's:--cov::' -e 's/--flake8//g' pytest.ini # https://github.com/jaraco/tempora/issues/22 donttest="tempora.parse_timedelta" %pytest -k "not $donttest" %pre # If libalternatives is used: Removing old update-alternatives entries. %python_libalternatives_reset_alternative calc-prorate %post %python_install_alternative calc-prorate %postun %python_uninstall_alternative calc-prorate %files %{python_files} %license LICENSE %doc CHANGES.rst README.rst docs/*rst %python_alternative %{_bindir}/calc-prorate %{python_sitelib}/tempora %{python_sitelib}/tempora-%{version}.dist-info %changelog * Thu May 4 2023 Dirk Müller - update to 5.2.2: * Fixed bug in tests that would fail when a leap year was about a year away. * Fri Apr 21 2023 Dirk Müller - add sle15_python_module_pythons (jsc#PED-68) * Thu Apr 13 2023 Matej Cepl - Make calling of %%{sle15modernpython} optional. * Wed Mar 1 2023 Daniel Garcia - Disable broken tests gh#jaraco/tempora#22 - Update to 5.2.1: * #21: Restored dependency on jaraco.functools, still used in timing module. * Wed Jan 4 2023 Dirk Müller - update to 5.2.0: * Packaging refresh. * Mon Dec 5 2022 Yogalakshmi Arunachalam - Update to version 5.1.0 * Introduced infer_datetime and added some type hints. * Sat Sep 17 2022 Arun Persaud - specfile: * change to pyproject.toml build - update to version 5.0.2: * Refreshed project. * Enrolled with Tidelift. * Thu Feb 3 2022 Arun Persaud - update to version 5.0.1: * Refreshed project. * Sat Jan 29 2022 Arun Persaud - specfile: * update copyright year - update to version 5.0.0: * Removed deprecated divide_* functions and Parser class. * Require Python 3.7 or later. * #19: Fixed error reporting in parse_timedelta. - changes from version 4.1.2: * #18: Docs now build without warnings. * Tue Oct 5 2021 Stefan Schubert - Added BuildRequires: alts * Thu Sep 30 2021 Stefan Schubert - Use libalternatives instead of update-alternatives. * Wed Sep 1 2021 John Paul Adrian Glaubitz - Update to version 4.1.1 * Fixed issue where digits were picked up in the unit when adjacent to the last unit. - from version 4.1.0 * Added support for more formats in ``parse_timedelta``. * #17: ``parse_timedelta`` now supports formats emitted by ``timeit``, including honoring nanoseconds at the microsecond resolution. - from version 4.0.2 * Refreshed package metadata. - Update BuildRequires from setup.py * Sun Nov 15 2020 Arun Persaud - specfile: * be more specific in %%files section - update to version 4.0.1: * Refreshed package metadata. * Fri Jul 24 2020 Marketa Calabkova - update to 4.0.0 * Removed ``strptime`` function in favor of `datetime.datetime.strptime`. If passing a ``tzinfo`` parameter, instead invoke `.replace(tzinfo=...)` on the result. * Deprecated ``divide_timedelta`` and ``divide_timedelta_float`` now that Python supports this functionality natively. * Deprecated ``Parser`` class. The 'dateutil.parser' provides more sophistication. * Tue Apr 14 2020 Matej Cepl - Don't use %%python3_only command, but properly use alternatives. * Thu Mar 26 2020 pgajdos@suse.com - version update to 3.0.0 * #10: strftime now reverts to the stdlib behavior for %%u. * Sat Mar 14 2020 Tomáš Chvátal - Drop py2 only dependency * Wed Mar 11 2020 pgajdos@suse.com - version update to 2.1.0 v2.1.0 ====== - #9: Fixed error when date object is passed to ``strftime``. - #11: ``strftime`` now honors upstream expectation of rendering date values on time objects and vice versa. - #10: ``strftime`` now honors ``%%µ`` for rendering just the "microseconds" as ``%%u`` supported previously. In a future, backward-incompatible release, the ``%%u`` behavior will revert to the behavior as found in stdlib. v2.0.0 ====== * Require Python 3.6 or later. * Removed DatetimeConstructor. * Mon Feb 24 2020 Tomáš Chvátal - Fix fdupes call - Do not pull in flake8 * Thu Apr 18 2019 Marketa Calabkova - update to 1.14.1 * Fix failing doctest in parse_timedelta - Launch tests and removing some unneeded dependencies * Wed Mar 20 2019 John Vandenberg - Add missing %%license - Re-activate test suite - Remove bcond python2 - Add missing build dependency jaraco.functools >= 1.20 - Remove inappropriate build dependency pytest-flake8 * Mon Mar 18 2019 Dirk Mueller - fix last version update missing new runtime requires * Thu Mar 14 2019 Matej Cepl - Upgrade all the way to 1.14: - Package refresh, including use of declarative config in the package metadata. - Enhancements to BackoffDelay: Added .reset method and Made iterable to retrieve delay values. - Added UTC module (Python 3 only), inspired by the utc project. - Scheduler now honors daylight savings times in the PeriodicCommands. - Added timing.BackoffDelay, suitable for implementing exponential backoff delays, such as those between retries. - Added support for months, years to parse_timedelta. - Introducing timing.Timer, featuring a expired method for detecting when a certain duration has been exceeded. - Stopwatch now behaves reliably during timezone changes and (presumably) daylight savings time changes. - Update project skeleton. - Run the SPEC file through spec-cleaner - Switched off test suite run temporarily. gh#jaraco/tempora#6 * Tue Dec 4 2018 Matej Cepl - Remove superfluous devel dependency for noarch package * Thu Jan 11 2018 tchvatal@suse.com - Fix building with python3 only available * Fri Mar 31 2017 jmatejek@suse.com - update for singlespec - update to 1.6.1 * adopt irc.schedule as tempora.schedule * adopt jaraco.timing as tempora.timing * Tue Aug 2 2016 sor.alexei@meowr.ru - Switch to Python2. * Thu Jun 9 2016 toddrme2178@gmail.com - Remove unneeded python3-Sphinx dependency. * Sun May 8 2016 arun@gmx.de - specfile: * updated source url to files.pythonhosted.org * Tue Dec 29 2015 arun@gmx.de - specfile: * updated url (moved to github) * *.txt -> *.rst in %%doc * changed from zip to tar-ball - update to version 1.4: * moved to Github. * Improved test support on Python 2. * Sat Apr 25 2015 arun@gmx.de - specfile: * added python3-setuptools_scm * removed python3-hgtools - update to version 1.3: * Added divide_timedelta from "svg.charts". * Added date_range from "svg.charts". * Sun Feb 22 2015 arun@gmx.de - update to version 1.2: * Only require sphinx and pytest-runner when necessary. * Mon Feb 16 2015 arun@gmx.de - update to version 1.1: * Add license info (retroactively applied to all commits). * Sat Feb 14 2015 arun@gmx.de - initial version