3 %bcond_without doc # don't build doc
4 %bcond_without tests # do not perform "make test"
5 %bcond_without python2 # CPython 2.x module
6 %bcond_without python3 # CPython 3.x module
8 %define module pyRFC3339
9 Summary: Generate and parse RFC 3339 timestamps
10 Name: python-pyrfc3339
14 Source0: https://pypi.python.org/packages/source/p/pyRFC3339/pyRFC3339-%{version}.tar.gz
15 # Source0-md5: c829980738b8271b0179ffd0c41187b0
16 Group: Libraries/Python
17 URL: https://pypi.python.org/pypi/pyRFC3339
18 BuildRequires: rpm-pythonprov
19 BuildRequires: rpmbuild(macros) >= 1.713
21 BuildRequires: python-setuptools
23 BuildRequires: python-nose
24 BuildRequires: python-pytz
28 BuildRequires: python3-setuptools
30 BuildRequires: python3-nose
31 BuildRequires: python3-pytz
37 This package contains a Python 2 library to parse and generate RFC
38 3339-compliant timestamps using Python datetime.datetime objects.
40 %package -n python3-pyrfc3339
41 Summary: Generate and parse RFC 3339 timestamps
42 Group: Libraries/Python
44 %description -n python3-pyrfc3339
45 This package contains a Python 3 library to parse and generate RFC
46 3339-compliant timestamps using Python datetime.datetime objects.
49 %setup -q -n %{module}-%{version}
53 %py_build %{?with_tests:test}
57 %py3_build %{?with_tests:test}
61 rm -rf $RPM_BUILD_ROOT
72 rm -rf $RPM_BUILD_ROOT
76 %defattr(644,root,root,755)
77 %doc README.rst LICENSE.txt
78 %{py_sitescriptdir}/pyrfc3339
79 %{py_sitescriptdir}/%{module}-%{version}-py*.egg-info
83 %files -n python3-pyrfc3339
84 %defattr(644,root,root,755)
85 %doc README.rst LICENSE.txt
86 %{py3_sitescriptdir}/pyrfc3339
87 %{py3_sitescriptdir}/%{module}-%{version}-*.egg-info