]> git.pld-linux.org Git - packages/python-arrow.git/blame - python-arrow.spec
rebuild with tests and docs
[packages/python-arrow.git] / python-arrow.spec
CommitLineData
4d6b99a4
ER
1#
2# Conditional build:
3%bcond_without python2 # CPython 2.x module
4%bcond_without python3 # CPython 3.x module
5## Disable the tests as apparently the version 0.4.2 does not ship them
6%bcond_with tests # do not perform "make test"
7
8%define module arrow
9Summary: Better dates and times for Python
10Name: python-%{module}
11Version: 0.4.2
88a73ab0 12Release: 12
4d6b99a4
ER
13License: Apache v2.0
14Group: Development/Libraries
15Source0: http://pypi.python.org/packages/source/a/%{module}/%{module}-%{version}.tar.gz
16# Source0-md5: 5caa8442fd3a84a5ad0155a1f626ef1d
17URL: http://pypi.python.org/pypi/arrow
8b324dcc 18BuildRequires: rpmbuild(macros) >= 1.710
9def19cc
ER
19BuildRequires: rpm-pythonprov
20%if %{with python2}
4d6b99a4
ER
21BuildRequires: python-chai
22BuildRequires: python-dateutil
9def19cc
ER
23BuildRequires: python-distribute
24BuildRequires: python-modules
4d6b99a4 25BuildRequires: python-six
9def19cc 26%endif
4d6b99a4 27%if %{with python3}
9def19cc 28BuildRequires: python3-modules
4d6b99a4
ER
29%endif
30Requires: python-dateutil
31Requires: python-six
32BuildArch: noarch
33BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
34
35%description
36Arrow is a Python library that offers a sensible, human-friendly
37approach to creating, manipulating, formatting and converting dates,
38times, and timestamps. It implements and updates the datetime type,
39plugging gaps in functionality, and provides an intelligent module API
40that supports many common creation scenarios.
41
42Simply put, it helps you work with dates and times with fewer imports
43and a lot less code.
44
45%package -n python3-arrow
46Summary: Better dates and times for Python
47Group: Development/Libraries
48Requires: python3-dateutil
49Requires: python3-six
50
51%description -n python3-arrow
52Arrow is a Python library that offers a sensible, human-friendly
53approach to creating, manipulating, formatting and converting dates,
54times, and timestamps. It implements and updates the datetime type,
55plugging gaps in functionality, and provides an intelligent module API
56that supports many common creation scenarios.
57
58Simply put, it helps you work with dates and times with fewer imports
59and a lot less code.
60
61%prep
62%setup -q -n %{module}-%{version}
63
64# Remove bundled egg-info in case it exists
65rm -r %{module}.egg-info
66
67%build
68%if %{with python2}
b2555e47 69%py_build %{?with_tests:test}
4d6b99a4
ER
70%endif
71
72%if %{with python3}
b2555e47 73%py3_build %{?with_tests:test}
4d6b99a4
ER
74%endif
75
76%install
77rm -rf $RPM_BUILD_ROOT
78
79%if %{with python2}
b2555e47 80%py_install
4d6b99a4
ER
81
82%py_postclean
83%endif
84
85%if %{with python3}
b2555e47 86%py3_install
4d6b99a4
ER
87%endif
88
89%clean
90rm -rf $RPM_BUILD_ROOT
91
92%files
93%defattr(644,root,root,755)
94# pr pending https://github.com/crsmithdev/arrow/pull/70
95#%doc LICENSE README.md HISTORY.md
96%{py_sitescriptdir}/arrow
97%{py_sitescriptdir}/arrow-%{version}-py*.egg-info
98
99%if %{with python3}
100%files -n python3-%{module}
101%defattr(644,root,root,755)
102#%doc LICENSE README.md HISTORY.md
103%{py3_sitescriptdir}/arrow
104%{py3_sitescriptdir}/arrow-%{version}-py*.egg-info
105%endif
This page took 0.12452 seconds and 4 git commands to generate.