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