]> git.pld-linux.org Git - packages/python-iso8601.git/blob - python-iso8601.spec
- python 3.6
[packages/python-iso8601.git] / python-iso8601.spec
1 #
2 # Conditional build:
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
6
7 %define         module  iso8601
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}
11 Version:        0.1.11
12 Release:        2
13 License:        MIT
14 Group:          Development/Languages/Python
15 #Source0Download: https://pypi.python.org/simple/iso8601/
16 Source0:        https://pypi.python.org/packages/source/i/iso8601/%{module}-%{version}.tar.gz
17 # Source0-md5:  b06d11cd14a64096f907086044f0fe38
18 URL:            https://bitbucket.org/micktwomey/pyiso8601
19 BuildRequires:  rpm-pythonprov
20 BuildRequires:  rpmbuild(macros) >= 1.714
21 %if %{with python2}
22 BuildRequires:  python-devel >= 1:2.6
23 %endif
24 %if %{with python3}
25 BuildRequires:  python3-devel >= 1:3.2
26 %endif
27 Requires:       python-modules >= 1:2.6
28 BuildArch:      noarch
29 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
30
31 %description
32 This module parses the most common forms of ISO 8601 date strings
33 (e.g. 2007-01-14T20:34:22+00:00) into datetime objects.
34
35 %description -l pl.UTF-8
36 Ten moduł analizuje najbardziej popularne postaci łańcuchów dat ISO
37 8601 (np. 2007-01-14T20:34:22+00:00) i przekształca na obiekty
38 datetime.
39
40 %package -n python3-%{module}
41 Summary:        Simple module to parse ISO 8601 dates
42 Summary(pl.UTF-8):      Prosty moduł do analizy dat ISO 8601
43 Group:          Development/Languages/Python
44 Requires:       python3-modules >= 1:3.2
45
46 %description -n python3-%{module}
47 This module parses the most common forms of ISO 8601 date strings
48 (e.g. 2007-01-14T20:34:22+00:00) into datetime objects.
49
50 %description -n python3-%{module} -l pl.UTF-8
51 Ten moduł analizuje najbardziej popularne postaci łańcuchów dat ISO
52 8601 (np. 2007-01-14T20:34:22+00:00) i przekształca na obiekty
53 datetime.
54
55 %prep
56 %setup -qn %{module}-%{version}
57
58 %build
59 %if %{with python2}
60 %py_build %{?with_tests:test}
61 %endif
62
63 %if %{with python3}
64 %py3_build %{?with_tests:test}
65 %endif
66
67 %install
68 rm -rf $RPM_BUILD_ROOT
69
70 %if %{with python2}
71 %py_install
72
73 %py_postclean
74 %{__rm} $RPM_BUILD_ROOT%{py_sitescriptdir}/iso8601/test_*
75 %endif
76
77 %if %{with python3}
78 %py3_install
79
80 %{__rm} $RPM_BUILD_ROOT%{py3_sitescriptdir}/iso8601/test_*
81 %endif
82
83 %clean
84 rm -rf $RPM_BUILD_ROOT
85
86 %if %{with python2}
87 %files
88 %defattr(644,root,root,755)
89 %doc LICENSE README.rst
90 %{py_sitescriptdir}/iso8601
91 %{py_sitescriptdir}/iso8601-%{version}-py*.egg-info
92 %endif
93
94 %if %{with python3}
95 %files -n python3-%{module}
96 %defattr(644,root,root,755)
97 %doc LICENSE README.rst
98 %{py3_sitescriptdir}/iso8601
99 %{py3_sitescriptdir}/iso8601-%{version}-py*.egg-info
100 %endif
This page took 0.032541 seconds and 4 git commands to generate.