]> git.pld-linux.org Git - packages/python-isodate.git/blob - python-isodate.spec
- updated URLs and dependencies, fixed python2/python3 bconds
[packages/python-isodate.git] / python-isodate.spec
1 #
2 # Conditional build:
3 %bcond_without  python2 # CPython 2.x module
4 %bcond_without  python3 # CPython 3.x module
5 %bcond_without  tests   # unit tests
6
7 %define         module  isodate
8 Summary:        An ISO 8601 date/time/duration parser and formater
9 Summary(pl.UTF-8):      Moduł analizujący i formatujący daty/czas/okresy w formacie ISO 8601
10 Name:           python-%{module}
11 # 0.6.1 is expected to be last version for python2
12 Version:        0.6.1
13 Release:        1
14 License:        BSD
15 Group:          Libraries/Python
16 #Source0Download: https://pypi.simple/isodate/
17 Source0:        https://files.pythonhosted.org/packages/source/i/isodate/isodate-%{version}.tar.gz
18 # Source0-md5:  1a310658b30a48641bafb5652ad91c40
19 URL:            https://pypi.org/project/pypi/
20 %if %{with python2}
21 BuildRequires:  python-devel >= 1:2.7
22 BuildRequires:  python-modules >= 1:2.7
23 BuildRequires:  python-setuptools
24 BuildRequires:  python-six
25 %endif
26 %if %{with python3}
27 BuildRequires:  python3-devel >= 1:3.6
28 BuildRequires:  python3-modules >= 1:3.6
29 BuildRequires:  python3-setuptools
30 BuildRequires:  python3-six
31 %endif
32 BuildRequires:  rpm-pythonprov
33 BuildRequires:  rpmbuild(macros) >= 1.714
34 Requires:       python-modules >= 1:2.7
35 BuildArch:      noarch
36 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
37
38 %description
39 This module implements ISO 8601 date, time and duration parsing. The
40 implementation follows ISO8601:2004 standard, and implements only
41 date/time representations mentioned in the standard. If something is
42 not mentioned there, then it is treated as non existent, and not as an
43 allowed option.
44
45 %description -l pl.UTF-8
46 Ten moduł zawiera implementację analizy daty, czasu i okresów w
47 formacie ISO 8601. Implementacja jest zgodna ze standardem
48 ISO8601:2004 i zawiera tylko reprezentacje daty/czasu opisane w
49 standardzie.
50
51 %package -n python3-%{module}
52 Summary:        An ISO 8601 date/time/duration parser and formater
53 Summary(pl.UTF-8):      Moduł analizujący i formatujący daty/czas/okresy w formacie ISO 8601
54 Group:          Libraries/Python
55 Requires:       python3-modules >= 1:3.6
56
57 %description -n python3-%{module}
58 This module implements ISO 8601 date, time and duration parsing. The
59 implementation follows ISO8601:2004 standard, and implements only
60 date/time representations mentioned in the standard. If something is
61 not mentioned there, then it is treated as non existent, and not as an
62 allowed option.
63
64 %description -n python3-%{module} -l pl.UTF-8
65 Ten moduł zawiera implementację analizy daty, czasu i okresów w
66 formacie ISO 8601. Implementacja jest zgodna ze standardem
67 ISO8601:2004 i zawiera tylko reprezentacje daty/czasu opisane w
68 standardzie.
69
70 %prep
71 %setup -q -n isodate-%{version}
72
73 %build
74 %if %{with python2}
75 %py_build %{?with_tests:test}
76 %endif
77
78 %if %{with python3}
79 %py3_build %{?with_tests:test}
80 %endif
81
82 %install
83 rm -rf $RPM_BUILD_ROOT
84
85 %if %{with python2}
86 %py_install
87
88 %py_postclean
89 # tests
90 %{__rm} -r $RPM_BUILD_ROOT%{py_sitescriptdir}/isodate/tests
91 %endif
92
93 %if %{with python3}
94 %py3_install
95
96 # tests
97 %{__rm} -r $RPM_BUILD_ROOT%{py3_sitescriptdir}/isodate/tests
98 %endif
99
100 %clean
101 rm -rf $RPM_BUILD_ROOT
102
103 %if %{with python2}
104 %files
105 %defattr(644,root,root,755)
106 %doc CHANGES.txt README.rst TODO.txt
107 %dir %{py_sitescriptdir}/isodate
108 %{py_sitescriptdir}/isodate/*.py[co]
109 %{py_sitescriptdir}/isodate-%{version}-py*.egg-info
110 %endif
111
112 %if %{with python3}
113 %files -n python3-%{module}
114 %defattr(644,root,root,755)
115 %doc CHANGES.txt README.rst TODO.txt
116 %dir %{py3_sitescriptdir}/isodate
117 %{py3_sitescriptdir}/isodate/*.py
118 %{py3_sitescriptdir}/isodate/__pycache__
119 %{py3_sitescriptdir}/isodate-%{version}-py*.egg-info
120 %endif
This page took 0.036254 seconds and 3 git commands to generate.