2016-08-07 12:16:58 +00:00
|
|
|
#
|
|
|
|
# spec file for package python-tempora
|
|
|
|
#
|
2025-03-30 08:12:15 +00:00
|
|
|
# Copyright (c) 2025 SUSE LLC
|
2016-08-07 12:16:58 +00:00
|
|
|
#
|
|
|
|
# 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.
|
|
|
|
|
2018-12-04 14:08:31 +00:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2016-08-07 12:16:58 +00:00
|
|
|
#
|
|
|
|
|
|
|
|
|
2021-10-03 17:23:54 +00:00
|
|
|
%if 0%{?suse_version} > 1500
|
|
|
|
%bcond_without libalternatives
|
|
|
|
%else
|
|
|
|
%bcond_with libalternatives
|
|
|
|
%endif
|
2023-07-19 11:10:30 +00:00
|
|
|
%{?sle15_python_module_pythons}
|
2016-08-07 12:16:58 +00:00
|
|
|
Name: python-tempora
|
2025-07-14 09:31:38 +00:00
|
|
|
Version: 5.8.1
|
2016-08-07 12:16:58 +00:00
|
|
|
Release: 0
|
|
|
|
Summary: Objects and routines pertaining to date and time (tempora)
|
|
|
|
License: MIT
|
2019-03-14 18:35:49 +00:00
|
|
|
URL: https://github.com/jaraco/tempora
|
2016-08-07 12:16:58 +00:00
|
|
|
Source: https://files.pythonhosted.org/packages/source/t/tempora/tempora-%{version}.tar.gz
|
2025-07-14 09:31:38 +00:00
|
|
|
BuildRequires: %{python_module base >= 3.9}
|
2019-04-18 22:51:06 +00:00
|
|
|
BuildRequires: %{python_module freezegun}
|
2019-03-20 07:56:37 +00:00
|
|
|
BuildRequires: %{python_module jaraco.functools >= 1.20}
|
2022-09-19 07:44:05 +00:00
|
|
|
BuildRequires: %{python_module pip}
|
2021-09-01 18:54:23 +00:00
|
|
|
BuildRequires: %{python_module pytest > 4.6}
|
2020-03-11 12:49:48 +00:00
|
|
|
BuildRequires: %{python_module pytest-freezegun}
|
2025-07-14 09:31:38 +00:00
|
|
|
BuildRequires: %{python_module setuptools >= 77}
|
2020-07-24 14:06:57 +00:00
|
|
|
BuildRequires: %{python_module setuptools_scm >= 3.4.1}
|
|
|
|
BuildRequires: %{python_module toml}
|
2024-07-02 15:22:04 +00:00
|
|
|
BuildRequires: %{python_module tzdata}
|
2022-09-19 07:44:05 +00:00
|
|
|
BuildRequires: %{python_module wheel}
|
2016-08-07 12:16:58 +00:00
|
|
|
BuildRequires: fdupes
|
2021-10-03 17:23:54 +00:00
|
|
|
BuildRequires: python-rpm-macros >= 20210929
|
2019-03-18 09:32:24 +00:00
|
|
|
Requires: python-jaraco.functools >= 1.20
|
2024-11-20 15:25:37 +00:00
|
|
|
Requires: python-python-dateutil
|
2024-07-02 15:22:04 +00:00
|
|
|
Requires: python-tzdata
|
2022-01-31 20:29:11 +00:00
|
|
|
BuildArch: noarch
|
2023-07-19 11:10:30 +00:00
|
|
|
|
2021-10-03 17:23:54 +00:00
|
|
|
%if %{with libalternatives}
|
2021-10-05 13:48:04 +00:00
|
|
|
BuildRequires: alts
|
2022-01-31 20:29:11 +00:00
|
|
|
Requires: alts
|
2021-10-03 17:23:54 +00:00
|
|
|
%else
|
2020-11-16 21:09:06 +00:00
|
|
|
Requires(post): update-alternatives
|
2024-03-16 14:40:18 +00:00
|
|
|
Requires(postun): update-alternatives
|
2021-10-03 17:23:54 +00:00
|
|
|
%endif
|
2017-04-06 15:53:06 +00:00
|
|
|
%python_subpackages
|
2016-08-07 12:16:58 +00:00
|
|
|
|
|
|
|
%description
|
|
|
|
Objects and routines pertaining to date and time (tempora)
|
|
|
|
|
2017-04-06 15:53:06 +00:00
|
|
|
Modules include:
|
|
|
|
* tempora (top level package module) contains miscellaneous utilities and constants.
|
|
|
|
* timing contains routines for measuring and profiling.
|
|
|
|
* schedule contains an event scheduler.
|
|
|
|
|
2016-08-07 12:16:58 +00:00
|
|
|
%prep
|
|
|
|
%setup -q -n tempora-%{version}
|
2020-07-24 14:06:57 +00:00
|
|
|
sed -i '/--mypy/d' pytest.ini
|
2016-08-07 12:16:58 +00:00
|
|
|
|
|
|
|
%build
|
2022-09-19 07:44:05 +00:00
|
|
|
%pyproject_wheel
|
2016-08-07 12:16:58 +00:00
|
|
|
|
|
|
|
%install
|
2022-09-19 07:44:05 +00:00
|
|
|
%pyproject_install
|
2021-09-19 17:22:37 +00:00
|
|
|
%python_clone -a %{buildroot}%{_bindir}/calc-prorate
|
2020-02-24 11:03:04 +00:00
|
|
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
2016-08-07 12:16:58 +00:00
|
|
|
|
2017-04-06 15:53:06 +00:00
|
|
|
%check
|
2020-03-26 11:26:50 +00:00
|
|
|
sed -i -e 's:--black::' -e 's:--cov::' -e 's/--flake8//g' pytest.ini
|
2023-03-01 09:05:22 +00:00
|
|
|
# https://github.com/jaraco/tempora/issues/22
|
|
|
|
donttest="tempora.parse_timedelta"
|
|
|
|
%pytest -k "not $donttest"
|
2017-04-06 15:53:06 +00:00
|
|
|
|
2021-10-03 17:23:54 +00:00
|
|
|
%pre
|
|
|
|
# If libalternatives is used: Removing old update-alternatives entries.
|
|
|
|
%python_libalternatives_reset_alternative calc-prorate
|
|
|
|
|
2020-04-14 09:13:04 +00:00
|
|
|
%post
|
|
|
|
%python_install_alternative calc-prorate
|
|
|
|
|
|
|
|
%postun
|
|
|
|
%python_uninstall_alternative calc-prorate
|
|
|
|
|
2017-04-06 15:53:06 +00:00
|
|
|
%files %{python_files}
|
2019-03-20 07:56:37 +00:00
|
|
|
%license LICENSE
|
2023-07-13 09:48:55 +00:00
|
|
|
%doc NEWS.rst README.rst docs/*rst
|
2020-04-14 09:13:04 +00:00
|
|
|
%python_alternative %{_bindir}/calc-prorate
|
2020-11-16 21:09:06 +00:00
|
|
|
%{python_sitelib}/tempora
|
2022-09-19 07:44:05 +00:00
|
|
|
%{python_sitelib}/tempora-%{version}.dist-info
|
2016-08-07 12:16:58 +00:00
|
|
|
|
|
|
|
%changelog
|