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-distribute
29 BuildRequires: python3-modules
31 Requires: python-dateutil
34 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
37 Arrow is a Python library that offers a sensible, human-friendly
38 approach to creating, manipulating, formatting and converting dates,
39 times, and timestamps. It implements and updates the datetime type,
40 plugging gaps in functionality, and provides an intelligent module API
41 that supports many common creation scenarios.
43 Simply put, it helps you work with dates and times with fewer imports
46 %package -n python3-arrow
47 Summary: Better dates and times for Python
48 Group: Development/Libraries
49 Requires: python3-dateutil
52 %description -n python3-arrow
53 Arrow is a Python library that offers a sensible, human-friendly
54 approach to creating, manipulating, formatting and converting dates,
55 times, and timestamps. It implements and updates the datetime type,
56 plugging gaps in functionality, and provides an intelligent module API
57 that supports many common creation scenarios.
59 Simply put, it helps you work with dates and times with fewer imports
63 %setup -q -n %{module}-%{version}
65 # Remove bundled egg-info in case it exists
66 rm -r %{module}.egg-info
70 %py_build %{?with_tests:test}
74 %py3_build %{?with_tests:test}
78 rm -rf $RPM_BUILD_ROOT
91 rm -rf $RPM_BUILD_ROOT
94 %defattr(644,root,root,755)
95 # pr pending https://github.com/crsmithdev/arrow/pull/70
96 #%doc LICENSE README.md HISTORY.md
97 %{py_sitescriptdir}/arrow
98 %{py_sitescriptdir}/arrow-%{version}-py*.egg-info
101 %files -n python3-%{module}
102 %defattr(644,root,root,755)
103 #%doc LICENSE README.md HISTORY.md
104 %{py3_sitescriptdir}/arrow
105 %{py3_sitescriptdir}/arrow-%{version}-py*.egg-info