2014-08-06 08:35:47 +00:00
|
|
|
#
|
2021-05-18 22:07:22 +00:00
|
|
|
# spec file
|
2014-08-06 08:35:47 +00:00
|
|
|
#
|
2024-01-14 15:16:54 +00:00
|
|
|
# Copyright (c) 2024 SUSE LLC
|
2014-08-06 08:35:47 +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 13:13:53 +00:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2014-08-06 08:35:47 +00:00
|
|
|
#
|
|
|
|
|
|
|
|
|
2019-12-16 07:59:53 +00:00
|
|
|
%global flavor @BUILD_FLAVOR@%{nil}
|
|
|
|
%if "%{flavor}" == "test"
|
|
|
|
%define psuffix -test
|
2020-01-05 07:53:28 +00:00
|
|
|
%bcond_without test
|
2019-12-16 07:59:53 +00:00
|
|
|
%else
|
|
|
|
%bcond_with test
|
|
|
|
%endif
|
2023-04-21 14:58:35 +00:00
|
|
|
%{?sle15_python_module_pythons}
|
2019-12-16 07:59:53 +00:00
|
|
|
Name: python-arrow%{?psuffix}
|
2023-11-14 21:05:10 +00:00
|
|
|
Version: 1.3.0
|
2014-08-06 08:35:47 +00:00
|
|
|
Release: 0
|
|
|
|
Summary: Better dates and times for Python
|
|
|
|
License: Apache-2.0
|
2020-07-25 17:37:06 +00:00
|
|
|
URL: https://github.com/arrow-py/arrow
|
2017-07-17 05:00:55 +00:00
|
|
|
Source: https://files.pythonhosted.org/packages/source/a/arrow/arrow-%{version}.tar.gz
|
2024-01-14 15:16:54 +00:00
|
|
|
BuildRequires: %{python_module base >= 3.8}
|
|
|
|
BuildRequires: %{python_module flit-core >= 3.2}
|
2023-11-14 21:05:10 +00:00
|
|
|
BuildRequires: %{python_module pip}
|
2019-12-16 07:59:53 +00:00
|
|
|
BuildRequires: fdupes
|
|
|
|
BuildRequires: python-rpm-macros
|
2020-09-20 06:09:01 +00:00
|
|
|
Requires: python-python-dateutil >= 2.7.0
|
2020-01-05 07:53:28 +00:00
|
|
|
BuildArch: noarch
|
2019-12-16 08:01:47 +00:00
|
|
|
%if %{with test}
|
2019-12-16 07:59:53 +00:00
|
|
|
BuildRequires: %{python_module arrow == %{version}}
|
2019-09-13 12:52:10 +00:00
|
|
|
BuildRequires: %{python_module dateparser}
|
2020-05-16 09:19:21 +00:00
|
|
|
BuildRequires: %{python_module pytest-mock}
|
|
|
|
BuildRequires: %{python_module pytest}
|
2021-11-06 17:35:52 +00:00
|
|
|
BuildRequires: %{python_module pytz >= 2021.1}
|
2017-07-17 05:00:55 +00:00
|
|
|
BuildRequires: %{python_module simplejson}
|
2019-12-16 07:59:53 +00:00
|
|
|
%endif
|
2017-07-17 05:00:55 +00:00
|
|
|
%python_subpackages
|
2014-08-06 08:35:47 +00:00
|
|
|
|
|
|
|
%description
|
|
|
|
Arrow is a Python library that offers a sensible, human-friendly
|
|
|
|
approach to creating, manipulating, formatting and converting dates,
|
|
|
|
times, and timestamps. It implements and updates the datetime type,
|
|
|
|
plugging gaps in functionality, and provides an intelligent module
|
|
|
|
API that supports many common creation scenarios. Simply put, it
|
|
|
|
helps you work with dates and times with fewer imports and a lot
|
|
|
|
less code.
|
|
|
|
|
|
|
|
Arrow is heavily inspired by moment.js and requests.
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q -n arrow-%{version}
|
2017-07-17 05:00:55 +00:00
|
|
|
rm -rf arrow.egg-info
|
2024-01-14 15:16:54 +00:00
|
|
|
# typing stubs not required for runtime gh#arrow-py/arrow#1169
|
|
|
|
sed -i '/dependencies = /,/]/ {/types-python-dateutil/d}' pyproject.toml
|
2014-08-06 08:35:47 +00:00
|
|
|
|
|
|
|
%build
|
2023-11-14 21:05:10 +00:00
|
|
|
%pyproject_wheel
|
2014-08-06 08:35:47 +00:00
|
|
|
|
|
|
|
%install
|
2019-12-16 07:59:53 +00:00
|
|
|
%if %{without test}
|
2023-11-14 21:05:10 +00:00
|
|
|
%pyproject_install
|
2019-01-22 08:57:29 +00:00
|
|
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
2019-12-16 07:59:53 +00:00
|
|
|
%endif
|
2014-08-06 08:35:47 +00:00
|
|
|
|
|
|
|
%check
|
2019-12-16 07:59:53 +00:00
|
|
|
%if %{with test}
|
2020-07-13 06:29:43 +00:00
|
|
|
rm tox.ini
|
2020-05-16 09:19:21 +00:00
|
|
|
%pytest
|
2019-12-16 07:59:53 +00:00
|
|
|
%endif
|
2014-08-06 08:35:47 +00:00
|
|
|
|
2019-12-16 07:59:53 +00:00
|
|
|
%if %{without test}
|
2017-07-17 05:00:55 +00:00
|
|
|
%files %{python_files}
|
2018-12-04 17:09:57 +00:00
|
|
|
%license LICENSE
|
2019-09-13 12:52:10 +00:00
|
|
|
%doc README.rst
|
2020-05-16 09:19:21 +00:00
|
|
|
%{python_sitelib}/arrow
|
2023-11-14 21:05:10 +00:00
|
|
|
%{python_sitelib}/arrow-%{version}*-info
|
2019-12-16 07:59:53 +00:00
|
|
|
%endif
|
2014-08-06 08:35:47 +00:00
|
|
|
|
|
|
|
%changelog
|