]> git.pld-linux.org Git - packages/python-pyrfc3339.git/blame - python-pyrfc3339.spec
- up to 1.1
[packages/python-pyrfc3339.git] / python-pyrfc3339.spec
CommitLineData
1db2f73f
ER
1#
2# Conditional build:
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
7
8%define module pyRFC3339
9Summary: Generate and parse RFC 3339 timestamps
10Name: python-pyrfc3339
ac3a6957
AM
11Version: 1.1
12Release: 1
1db2f73f
ER
13License: MIT
14Source0: https://pypi.python.org/packages/source/p/pyRFC3339/pyRFC3339-%{version}.tar.gz
ac3a6957 15# Source0-md5: c829980738b8271b0179ffd0c41187b0
1db2f73f
ER
16Group: Libraries/Python
17URL: https://pypi.python.org/pypi/pyRFC3339
18BuildRequires: rpm-pythonprov
19BuildRequires: rpmbuild(macros) >= 1.713
20%if %{with python2}
77084ecb 21BuildRequires: python-setuptools
1db2f73f
ER
22%if %{with tests}
23BuildRequires: python-nose
24BuildRequires: python-pytz
25%endif
26%endif
27%if %{with python3}
77084ecb 28BuildRequires: python3-setuptools
1db2f73f
ER
29%if %{with tests}
30BuildRequires: python3-nose
31BuildRequires: python3-pytz
32%endif
33%endif
34BuildArch: noarch
35
36%description
bcf8b5f5 37This package contains a Python 2 library to parse and generate RFC
1db2f73f
ER
383339-compliant timestamps using Python datetime.datetime objects.
39
40%package -n python3-pyrfc3339
41Summary: Generate and parse RFC 3339 timestamps
42Group: Libraries/Python
43
44%description -n python3-pyrfc3339
45This package contains a Python 3 library to parse and generate RFC
463339-compliant timestamps using Python datetime.datetime objects.
47
48%prep
49%setup -q -n %{module}-%{version}
50
51%build
52%if %{with python2}
53%py_build %{?with_tests:test}
54%endif
55
56%if %{with python3}
57%py3_build %{?with_tests:test}
58%endif
59
60%install
61rm -rf $RPM_BUILD_ROOT
62%if %{with python2}
63%py_install
64%py_postclean
65%endif
66
67%if %{with python3}
68%py3_install
69%endif
70
71%clean
72rm -rf $RPM_BUILD_ROOT
73
74%if %{with python2}
75%files
76%defattr(644,root,root,755)
77%doc README.rst LICENSE.txt
78%{py_sitescriptdir}/pyrfc3339
79%{py_sitescriptdir}/%{module}-%{version}-py*.egg-info
80%endif
81
82%if %{with python3}
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
88%endif
This page took 0.100834 seconds and 4 git commands to generate.