7f970e4
Jeroen van Meeuwen (Kolab Systems) 0e57aec
%if 0%{?fedora} || 0%{?rhel} >= 8
7f970e4
%{!?python3_pkgversion: %global python3_pkgversion 3}
7f970e4
%else
7f970e4
%{!?python3_pkgversion: %global python3_pkgversion 34}
9bda489
%endif
9bda489
9bda489
%global modname arrow
9bda489
9bda489
Name:               python-%{modname}
9f4adab
Version:            1.2.3
01f05e8
Release:            %autorelease
9bda489
Summary:            Better dates and times for Python
9bda489
9bda489
License:            ASL 2.0
b0ef630
URL:                https://pypi.io/project/arrow
5cb9ffa
Source0:            %pypi_source arrow
cd76032
# This lets us drop a hard to port dep for py3 on epel7.
cd76032
Patch0:             python-arrow-remove-simplejson-test.patch
9bda489
9bda489
BuildArch:          noarch
49de29b
a3ecc72
%description
a3ecc72
Arrow is a Python library that offers a sensible, human-friendly approach to
a3ecc72
creating, manipulating, formatting and converting dates, times, and timestamps.
9bda489
a3ecc72
It implements and updates the datetime type, plugging gaps in functionality,
a3ecc72
and provides an intelligent module API that supports many common creation
a3ecc72
scenarios.
9bda489
a3ecc72
Simply put, it helps you work with dates and times with fewer imports and a lot
a3ecc72
less code.
a3ecc72
7f970e4
%package -n         python%{python3_pkgversion}-%{modname}
9bda489
Summary:            Better dates and times for Python
a3ecc72
%{?python_provide:%python_provide python%{python3_pkgversion}-%{modname}}
a3ecc72
a3ecc72
BuildRequires:      python%{python3_pkgversion}-devel
a3ecc72
BuildRequires:      python%{python3_pkgversion}-setuptools
a3ecc72
BuildRequires:      python%{python3_pkgversion}-chai
a3ecc72
BuildRequires:      python%{python3_pkgversion}-dateutil
8c43023
BuildRequires:      python%{python3_pkgversion}-pytz
4daa0ed
BuildRequires:      python%{python3_pkgversion}-pytest
06ede1d
BuildRequires:      python%{python3_pkgversion}-pytest-mock
1b45b29
BuildRequires:      python%{python3_pkgversion}-pytest-cov
a3ecc72
BuildRequires:      python%{python3_pkgversion}-six
1ff1991
BuildRequires:      python%{python3_pkgversion}-simplejson
af9d5c9
BuildRequires:      python%{python3_pkgversion}-mock
Clement Verna 844decb
BuildRequires:      python%{python3_pkgversion}-dateparser
a3ecc72
7f970e4
Requires:           python%{python3_pkgversion}-dateutil
7f970e4
Requires:           python%{python3_pkgversion}-six
9bda489
1b9c7e8
%description -n python%{python3_pkgversion}-%{modname}
9bda489
Arrow is a Python library that offers a sensible, human-friendly approach to
9bda489
creating, manipulating, formatting and converting dates, times, and timestamps.
a3ecc72
9bda489
It implements and updates the datetime type, plugging gaps in functionality,
9bda489
and provides an intelligent module API that supports many common creation
9bda489
scenarios.
a3ecc72
9bda489
Simply put, it helps you work with dates and times with fewer imports and a lot
9bda489
less code.
9bda489
9bda489
%prep
9bda489
%setup -q -n %{modname}-%{version}
9bda489
fcccbe6
# Don't enforce a certain coverage when we build the RPM, that's an upstream's
fcccbe6
# problem
fcccbe6
sed -i -e "s|--cov-fail-under=100 ||" tox.ini
fcccbe6
9a8debe
#%patch0 -p1
f2b0b8d
a3ecc72
9bda489
# Remove bundled egg-info in case it exists
9bda489
rm -rf %{modname}.egg-info
9bda489
9bda489
%build
1b9c7e8
%{py3_build}
9bda489
9bda489
%install
1b9c7e8
%{py3_install}
9bda489
b7c99dc
%check
9f0909b
pytest-%{python3_version} tests
b7c99dc
7f970e4
%files -n python%{python3_pkgversion}-%{modname}
Clement Verna 844decb
%doc README.rst CHANGELOG.rst
49de29b
%license LICENSE
9bda489
%{python3_sitelib}/%{modname}/
9bda489
%{python3_sitelib}/%{modname}-%{version}-*
9bda489
9bda489
%changelog
01f05e8
%autochangelog