SHA256
1
0
forked from pool/python-arrow
python-arrow/python-arrow.spec
Ondřej Súkup 9ebf1190db Accepting request 1126469 from home:mimi_vx:branches:devel:languages:python
- update to 1.3.0
 * [ADDED] Added official support for Python 3.11 and 3.12.
 * [ADDED] Added dependency on types-python-dateutil to improve Arrow mypy compatibility. PR #1102
 * [FIX] Updates to Italian, Romansh, Hungarian, Finish and Arabic locales.
 * [FIX] Handling parsing of UTC prefix in timezone strings.
 * [CHANGED] Update documentation to improve readability.
 * [CHANGED] Dropped support for Python 3.6 and 3.7, which are end-of-life.
 * [INTERNAL Migrate from setup.py/Twine to pyproject.toml/Flit for packaging and distribution.

OBS-URL: https://build.opensuse.org/request/show/1126469
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-arrow?expand=0&rev=63
2023-11-14 21:05:10 +00:00

91 lines
2.6 KiB
RPMSpec

#
# spec file
#
# 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/
#
%global flavor @BUILD_FLAVOR@%{nil}
%if "%{flavor}" == "test"
%define psuffix -test
%bcond_without test
%else
%bcond_with test
%endif
%{?sle15_python_module_pythons}
Name: python-arrow%{?psuffix}
Version: 1.3.0
Release: 0
Summary: Better dates and times for Python
License: Apache-2.0
URL: https://github.com/arrow-py/arrow
Source: https://files.pythonhosted.org/packages/source/a/arrow/arrow-%{version}.tar.gz
BuildRequires: %{python_module flit-core}
BuildRequires: %{python_module pip}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires: python-python-dateutil >= 2.7.0
Requires: python-types-python-dateutil >= 2.8.10
BuildArch: noarch
%if %{with test}
BuildRequires: %{python_module arrow == %{version}}
BuildRequires: %{python_module dateparser}
BuildRequires: %{python_module dateutil >= 2.7.0}
BuildRequires: %{python_module pytest-mock}
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module pytz >= 2021.1}
BuildRequires: %{python_module simplejson}
%endif
%python_subpackages
%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}
rm -rf arrow.egg-info
%build
%pyproject_wheel
%install
%if %{without test}
%pyproject_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%endif
%check
%if %{with test}
rm tox.ini
%pytest
%endif
%if %{without test}
%files %{python_files}
%license LICENSE
%doc README.rst
%{python_sitelib}/arrow
%{python_sitelib}/arrow-%{version}*-info
%endif
%changelog