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"
9 Summary: Better dates and times for Python
10 Name: python-%{module}
14 Group: Development/Libraries
15 Source0: http://pypi.python.org/packages/source/a/%{module}/%{module}-%{version}.tar.gz
16 # Source0-md5: 5caa8442fd3a84a5ad0155a1f626ef1d
17 URL: http://pypi.python.org/pypi/arrow
18 BuildRequires: rpmbuild(macros) >= 1.710
19 BuildRequires: rpm-pythonprov
21 BuildRequires: python-chai
22 BuildRequires: python-dateutil
23 BuildRequires: python-distribute
24 BuildRequires: python-modules
25 BuildRequires: python-six
28 BuildRequires: python3-modules
30 Requires: python-dateutil
33 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
36 Arrow is a Python library that offers a sensible, human-friendly
37 approach to creating, manipulating, formatting and converting dates,
38 times, and timestamps. It implements and updates the datetime type,
39 plugging gaps in functionality, and provides an intelligent module API
40 that supports many common creation scenarios.
42 Simply put, it helps you work with dates and times with fewer imports
45 %package -n python3-arrow
46 Summary: Better dates and times for Python
47 Group: Development/Libraries
48 Requires: python3-dateutil
51 %description -n python3-arrow
52 Arrow is a Python library that offers a sensible, human-friendly
53 approach to creating, manipulating, formatting and converting dates,
54 times, and timestamps. It implements and updates the datetime type,
55 plugging gaps in functionality, and provides an intelligent module API
56 that supports many common creation scenarios.
58 Simply put, it helps you work with dates and times with fewer imports
62 %setup -q -n %{module}-%{version}
64 # Remove bundled egg-info in case it exists
65 rm -r %{module}.egg-info
69 %py_build %{?with_tests:test}
73 %py3_build %{?with_tests:test}
77 rm -rf $RPM_BUILD_ROOT
90 rm -rf $RPM_BUILD_ROOT
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
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