SHA256
1
0
forked from pool/python-arrow
python-arrow/python-arrow.spec
Steve Kowalik ae484b545a - Update to 1.0.3:
* [FIX] Updated internals to avoid issues when running mypy --strict.
  * [FIX] Corrections to Swedish locale.
  * [INTERNAL] Lowered required coverage limit until humanize month tests are
    fixed.
  * [FIXED] Fixed an OverflowError that could occur when running Arrow on a
    32-bit OS.
  * [FIXED] A py.typed file is now bundled with the Arrow package to conform
    to PEP 561.
  * [CHANGE] Arrow has dropped support for Python 2.7 and 3.5.
  * [CHANGE] There are multiple breaking changes with this release, please see
    the migration guide for a complete overview.
  * [CHANGE] Made humanize granularity="auto" limits more accurate to reduce
    strange results.
  * [NEW] Added support for Python 3.9.
  * [NEW] Added a new keyword argument "exact" to span, span_range and
    interval methods. This makes timespans begin at the start time given and
    not extend beyond the end time given.
  * [NEW] Arrow now natively supports PEP 484-style type annotations.
  * [FIX] Fixed handling of maximum permitted timestamp on Windows systems.
  * [FIX] Corrections to French, German, Japanese and Norwegian locales.

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-arrow?expand=0&rev=45
2021-03-09 05:19:35 +00:00

98 lines
2.8 KiB
RPMSpec

#
# spec file for package python
#
# Copyright (c) 2021 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/
#
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%global flavor @BUILD_FLAVOR@%{nil}
%if "%{flavor}" == "test"
%define psuffix -test
%bcond_without test
%else
%bcond_with test
%endif
%bcond_without python2
Name: python-arrow%{?psuffix}
Version: 1.0.3
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 setuptools}
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 chai}
BuildRequires: %{python_module dateparser}
BuildRequires: %{python_module dateutil >= 2.7.0}
BuildRequires: %{python_module mock}
BuildRequires: %{python_module pytest-mock}
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module pytz}
BuildRequires: %{python_module simplejson}
%endif
%if %{with python2}
BuildRequires: python-backports.functools_lru_cache >= 1.2.1
%endif
%ifpython2
Requires: python-backports.functools_lru_cache >= 1.2.1
%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
%python_build
%install
%if %{without test}
%python_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}-py*.egg-info
%endif
%changelog