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