Files
python-arrow/python-arrow.spec
Matej Cepl 477675a89e - Update to 1.4.0
* [ADDED] Added ``week_start`` parameter to ``floor()`` and ``ceil()`` methods. PR #1222
  * [ADDED] Added ``FORMAT_RFC3339_STRICT`` with a T separator. PR #1201
  * [ADDED] Added Macedonian in Latin locale support. PR #1200
  * [ADDED] Added Persian/Farsi locale support. PR #1190
  * [ADDED] Added week and weeks to Thai locale timeframes. PR #1218
  * [ADDED] Added weeks to Catalan locale. PR #1189
  * [ADDED] Added Persian names of months, month-abbreviations and
    day-abbreviations in Gregorian calendar. PR #1172
  * [CHANGED] Migrated Arrow to use ZoneInfo for timezones instead of pytz. PR #1217
  * [FIXED] Fixed humanize month limits. PR #1224
  * [FIXED] Fixed type hint of ``Arrow.__getattr__``. PR #1171
  * [FIXED] Fixed spelling and removed poorly used expressions in Korean locale. PR #1181
  * [FIXED] Updated ``shift()`` method for issue #1145. PR #1194
  * [FIXED] Improved Greek locale translations (seconds, days, "ago", and month typo). PR #1184
  * [FIXED] Addressed ``datetime.utcnow`` deprecation warning. PR #1182
  * [INTERNAL] Added codecov test results. PR #1223
  * [INTERNAL] Updated CI dependencies (actions/setup-python, actions/checkout,
    codecov/codecov-action, actions/cache).
  * [INTERNAL] Added docstrings to parser.py. PR #1010
  * [INTERNAL] Updated Python versions support and bumped CI dependencies. PR #1177
  * [INTERNAL] Added dependabot for GitHub actions. PR #1193
  * [INTERNAL] Moved dateutil types to test requirements. PR #1183
  * [INTERNAL] Added documentation link for ``arrow.format``. PR #1180
- Update BuildRequires from setup.py

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-arrow?expand=0&rev=67
2025-10-30 11:16:23 +00:00

92 lines
2.7 KiB
RPMSpec

#
# spec file
#
# Copyright (c) 2024 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.4.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 base >= 3.8}
BuildRequires: %{python_module flit-core >= 3.2}
BuildRequires: %{python_module pip}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires: python-python-dateutil >= 2.7.0
BuildArch: noarch
%if %{with test}
BuildRequires: %{python_module arrow == %{version}}
BuildRequires: %{python_module dateparser}
BuildRequires: %{python_module pytest-mock}
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module pytz >= 2025.02}
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
# typing stubs not required for runtime gh#arrow-py/arrow#1169
sed -i '/dependencies = /,/]/ {/types-python-dateutil/d}' pyproject.toml
%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