2014-08-06 10:35:47 +02:00
|
|
|
#
|
2021-05-19 00:07:22 +02:00
|
|
|
# spec file
|
2014-08-06 10:35:47 +02:00
|
|
|
#
|
2024-01-14 16:16:54 +01:00
|
|
|
# Copyright (c) 2024 SUSE LLC
|
2014-08-06 10:35:47 +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 14:13:53 +01:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2014-08-06 10:35:47 +02:00
|
|
|
#
|
|
|
|
|
|
|
|
|
2019-12-16 08:59:53 +01:00
|
|
|
%global flavor @BUILD_FLAVOR@%{nil}
|
|
|
|
%if "%{flavor}" == "test"
|
|
|
|
%define psuffix -test
|
2020-01-05 08:53:28 +01:00
|
|
|
%bcond_without test
|
2019-12-16 08:59:53 +01:00
|
|
|
%else
|
|
|
|
%bcond_with test
|
|
|
|
%endif
|
2023-04-21 16:58:35 +02:00
|
|
|
%{?sle15_python_module_pythons}
|
2019-12-16 08:59:53 +01:00
|
|
|
Name: python-arrow%{?psuffix}
|
2023-11-14 22:05:10 +01:00
|
|
|
Version: 1.3.0
|
2014-08-06 10:35:47 +02:00
|
|
|
Release: 0
|
|
|
|
Summary: Better dates and times for Python
|
|
|
|
License: Apache-2.0
|
2020-07-25 19:37:06 +02:00
|
|
|
URL: https://github.com/arrow-py/arrow
|
2017-07-17 07:00:55 +02:00
|
|
|
Source: https://files.pythonhosted.org/packages/source/a/arrow/arrow-%{version}.tar.gz
|
2024-01-14 16:16:54 +01:00
|
|
|
BuildRequires: %{python_module base >= 3.8}
|
|
|
|
BuildRequires: %{python_module flit-core >= 3.2}
|
2023-11-14 22:05:10 +01:00
|
|
|
BuildRequires: %{python_module pip}
|
2019-12-16 08:59:53 +01:00
|
|
|
BuildRequires: fdupes
|
|
|
|
BuildRequires: python-rpm-macros
|
2020-09-20 08:09:01 +02:00
|
|
|
Requires: python-python-dateutil >= 2.7.0
|
2020-01-05 08:53:28 +01:00
|
|
|
BuildArch: noarch
|
2019-12-16 09:01:47 +01:00
|
|
|
%if %{with test}
|
2019-12-16 08:59:53 +01:00
|
|
|
BuildRequires: %{python_module arrow == %{version}}
|
2019-09-13 14:52:10 +02:00
|
|
|
BuildRequires: %{python_module dateparser}
|
2020-05-16 11:19:21 +02:00
|
|
|
BuildRequires: %{python_module pytest-mock}
|
|
|
|
BuildRequires: %{python_module pytest}
|
2021-11-06 18:35:52 +01:00
|
|
|
BuildRequires: %{python_module pytz >= 2021.1}
|
2017-07-17 07:00:55 +02:00
|
|
|
BuildRequires: %{python_module simplejson}
|
2019-12-16 08:59:53 +01:00
|
|
|
%endif
|
2017-07-17 07:00:55 +02:00
|
|
|
%python_subpackages
|
2014-08-06 10:35:47 +02: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 07:00:55 +02:00
|
|
|
rm -rf arrow.egg-info
|
2024-01-14 16:16:54 +01:00
|
|
|
# typing stubs not required for runtime gh#arrow-py/arrow#1169
|
|
|
|
sed -i '/dependencies = /,/]/ {/types-python-dateutil/d}' pyproject.toml
|
2014-08-06 10:35:47 +02:00
|
|
|
|
|
|
|
%build
|
2023-11-14 22:05:10 +01:00
|
|
|
%pyproject_wheel
|
2014-08-06 10:35:47 +02:00
|
|
|
|
|
|
|
%install
|
2019-12-16 08:59:53 +01:00
|
|
|
%if %{without test}
|
2023-11-14 22:05:10 +01:00
|
|
|
%pyproject_install
|
2019-01-22 09:57:29 +01:00
|
|
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
2019-12-16 08:59:53 +01:00
|
|
|
%endif
|
2014-08-06 10:35:47 +02:00
|
|
|
|
|
|
|
%check
|
2019-12-16 08:59:53 +01:00
|
|
|
%if %{with test}
|
2020-07-13 08:29:43 +02:00
|
|
|
rm tox.ini
|
2020-05-16 11:19:21 +02:00
|
|
|
%pytest
|
2019-12-16 08:59:53 +01:00
|
|
|
%endif
|
2014-08-06 10:35:47 +02:00
|
|
|
|
2019-12-16 08:59:53 +01:00
|
|
|
%if %{without test}
|
2017-07-17 07:00:55 +02:00
|
|
|
%files %{python_files}
|
2018-12-04 18:09:57 +01:00
|
|
|
%license LICENSE
|
2019-09-13 14:52:10 +02:00
|
|
|
%doc README.rst
|
2020-05-16 11:19:21 +02:00
|
|
|
%{python_sitelib}/arrow
|
2023-11-14 22:05:10 +01:00
|
|
|
%{python_sitelib}/arrow-%{version}*-info
|
2019-12-16 08:59:53 +01:00
|
|
|
%endif
|
2014-08-06 10:35:47 +02:00
|
|
|
|
|
|
|
%changelog
|