3 %bcond_without tests # do not perform "make test"
4 %bcond_without python2 # CPython 2.x module
5 %bcond_without python3 # CPython 3.x module
8 Summary: Simple module to parse ISO 8601 dates
9 Summary(pl.UTF-8): Prosty moduł do analizy dat ISO 8601
10 Name: python-%{module}
14 Group: Development/Languages/Python
15 #Source0Download: https://pypi.org/simple/iso8601/
16 Source0: https://files.pythonhosted.org/packages/source/i/iso8601/%{module}-%{version}.tar.gz
17 # Source0-md5: 4de940f691c5ea759fb254384c8ddcf6
18 URL: https://bitbucket.org/micktwomey/pyiso8601
19 BuildRequires: rpm-pythonprov
20 BuildRequires: rpmbuild(macros) >= 1.714
22 BuildRequires: python-devel >= 1:2.6
23 %{?with_tests:BuildRequires: python-pytest}
24 BuildRequires: python-setuptools
27 BuildRequires: python3-devel >= 1:3.2
28 %{?with_tests:BuildRequires: python3-pytest}
29 BuildRequires: python3-setuptools
31 Requires: python-modules >= 1:2.6
33 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
36 This module parses the most common forms of ISO 8601 date strings
37 (e.g. 2007-01-14T20:34:22+00:00) into datetime objects.
39 %description -l pl.UTF-8
40 Ten moduł analizuje najbardziej popularne postaci łańcuchów dat ISO
41 8601 (np. 2007-01-14T20:34:22+00:00) i przekształca na obiekty
44 %package -n python3-%{module}
45 Summary: Simple module to parse ISO 8601 dates
46 Summary(pl.UTF-8): Prosty moduł do analizy dat ISO 8601
47 Group: Development/Languages/Python
48 Requires: python3-modules >= 1:3.2
50 %description -n python3-%{module}
51 This module parses the most common forms of ISO 8601 date strings
52 (e.g. 2007-01-14T20:34:22+00:00) into datetime objects.
54 %description -n python3-%{module} -l pl.UTF-8
55 Ten moduł analizuje najbardziej popularne postaci łańcuchów dat ISO
56 8601 (np. 2007-01-14T20:34:22+00:00) i przekształca na obiekty
60 %setup -qn %{module}-%{version}
67 %{__python} -mpytest iso8601/test_iso8601.py
75 %{__python} -mpytest iso8601/test_iso8601.py
80 rm -rf $RPM_BUILD_ROOT
86 %{__rm} $RPM_BUILD_ROOT%{py_sitescriptdir}/iso8601/test_*
92 %{__rm} $RPM_BUILD_ROOT%{py3_sitescriptdir}/iso8601/test_*
96 rm -rf $RPM_BUILD_ROOT
100 %defattr(644,root,root,755)
101 %doc LICENSE README.rst
102 %{py_sitescriptdir}/iso8601
103 %{py_sitescriptdir}/iso8601-%{version}-py*.egg-info
107 %files -n python3-%{module}
108 %defattr(644,root,root,755)
109 %doc LICENSE README.rst
110 %{py3_sitescriptdir}/iso8601
111 %{py3_sitescriptdir}/iso8601-%{version}-py*.egg-info