]>
Commit | Line | Data |
---|---|---|
71f8fa36 JK |
1 | # |
2 | # Conditional build: | |
d4cd6b59 JB |
3 | %bcond_without doc # Sphinx documentation |
4 | %bcond_with tests # unit tests (incomplete dependencies) | |
71f8fa36 JK |
5 | %bcond_without python2 # CPython 2.x module |
6 | %bcond_without python3 # CPython 3.x module | |
7 | ||
8 | Summary: Oslo i18n library | |
d4cd6b59 | 9 | Summary(pl.UTF-8): Biblioteka Oslo i18n |
71f8fa36 | 10 | Name: python-oslo.i18n |
d4cd6b59 JB |
11 | # keep 3.x for python2 support |
12 | Version: 3.25.1 | |
13 | Release: 1 | |
71f8fa36 JK |
14 | License: Apache |
15 | Group: Libraries/Python | |
16 | Source0: https://files.pythonhosted.org/packages/source/o/oslo.i18n/oslo.i18n-%{version}.tar.gz | |
d4cd6b59 JB |
17 | # Source0-md5: 82e01af1ce6aecfdece62ac5c0dd650a |
18 | URL: https://pypi.org/project/oslo.i18n | |
71f8fa36 | 19 | %if %{with python2} |
d4cd6b59 JB |
20 | BuildRequires: python-pbr >= 3.0.0 |
21 | BuildRequires: python-modules >= 1:2.7 | |
71f8fa36 | 22 | BuildRequires: python-setuptools |
d4cd6b59 JB |
23 | %if %{with tests} |
24 | BuildRequires: python-babel >= 2.5.0 | |
25 | BuildRequires: python-six >= 1.10.0 | |
26 | BuildRequires: python-stestr >= 2.0.0 | |
27 | BuildRequires: python-testscenarios >= 0.4 | |
28 | %endif | |
71f8fa36 JK |
29 | %endif |
30 | %if %{with python3} | |
d4cd6b59 JB |
31 | BuildRequires: python3-pbr >= 3.0.0 |
32 | BuildRequires: python3-modules >= 1:3.6 | |
71f8fa36 | 33 | BuildRequires: python3-setuptools |
d4cd6b59 JB |
34 | %if %{with tests} |
35 | BuildRequires: python3-babel >= 2.5.0 | |
36 | BuildRequires: python3-six >= 1.10.0 | |
37 | BuildRequires: python3-stestr >= 2.0.0 | |
38 | BuildRequires: python3-testscenarios >= 0.4 | |
39 | %endif | |
40 | %endif | |
41 | BuildRequires: rpm-pythonprov | |
42 | BuildRequires: rpmbuild(macros) >= 1.714 | |
43 | %if %{with doc} | |
44 | BuildRequires: python-openstackdocstheme >= 1.18.1 | |
45 | BuildRequires: sphinx-pdg-2 >= 1.8.0 | |
71f8fa36 | 46 | %endif |
71f8fa36 JK |
47 | BuildArch: noarch |
48 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
49 | ||
50 | %description | |
51 | The oslo.i18n library contain utilities for working with | |
52 | internationalization (i18n) features, especially translation for text | |
53 | strings in an application or library. | |
54 | ||
d4cd6b59 JB |
55 | %description -l pl.UTF-8 |
56 | Biblioteka oslo.i18n zawiera narzędzia do pracy z funkcjonalnością | |
57 | umiędzynarodowienia (internationalization - i18n), w szczególności | |
58 | tłumaczenia łańcuchów tekstowych w aplikachach lub bibliotekach. | |
59 | ||
71f8fa36 JK |
60 | %package -n python3-oslo.i18n |
61 | Summary: Oslo i18n library | |
d4cd6b59 | 62 | Summary(pl.UTF-8): Biblioteka Oslo i18n |
71f8fa36 | 63 | Group: Libraries/Python |
71f8fa36 JK |
64 | |
65 | %description -n python3-oslo.i18n | |
66 | The oslo.i18n library contain utilities for working with | |
67 | internationalization (i18n) features, especially translation for text | |
68 | strings in an application or library. | |
69 | ||
d4cd6b59 JB |
70 | %description -n python3-oslo.i18n -l pl.UTF-8 |
71 | Biblioteka oslo.i18n zawiera narzędzia do pracy z funkcjonalnością | |
72 | umiędzynarodowienia (internationalization - i18n), w szczególności | |
73 | tłumaczenia łańcuchów tekstowych w aplikachach lub bibliotekach. | |
74 | ||
71f8fa36 JK |
75 | %package apidocs |
76 | Summary: API documentation for Python oslo.i18n module | |
77 | Summary(pl.UTF-8): Dokumentacja API modułu Pythona oslo.i18n | |
78 | Group: Documentation | |
79 | ||
80 | %description apidocs | |
81 | API documentation for Pythona oslo.i18n module. | |
82 | ||
83 | %description apidocs -l pl.UTF-8 | |
84 | Dokumentacja API modułu Pythona oslo.i18n. | |
85 | ||
86 | %prep | |
87 | %setup -q -n oslo.i18n-%{version} | |
88 | ||
89 | %build | |
90 | %if %{with python2} | |
91 | %py_build %{?with_tests:test} | |
92 | %endif | |
93 | ||
94 | %if %{with python3} | |
95 | %py3_build %{?with_tests:test} | |
96 | %endif | |
97 | ||
98 | %if %{with doc} | |
d4cd6b59 | 99 | sphinx-build-2 -b html doc/source doc/build/html |
71f8fa36 JK |
100 | %endif |
101 | ||
102 | %install | |
103 | rm -rf $RPM_BUILD_ROOT | |
104 | ||
105 | %if %{with python2} | |
106 | %py_install | |
107 | ||
71f8fa36 | 108 | %py_postclean |
d4cd6b59 JB |
109 | |
110 | %{__rm} -r $RPM_BUILD_ROOT%{py_sitescriptdir}/oslo_i18n/tests | |
71f8fa36 JK |
111 | %endif |
112 | ||
113 | %if %{with python3} | |
114 | %py3_install | |
d4cd6b59 JB |
115 | |
116 | %{__rm} -r $RPM_BUILD_ROOT%{py3_sitescriptdir}/oslo_i18n/tests | |
71f8fa36 JK |
117 | %endif |
118 | ||
119 | %clean | |
120 | rm -rf $RPM_BUILD_ROOT | |
121 | ||
122 | %if %{with python2} | |
123 | %files | |
124 | %defattr(644,root,root,755) | |
125 | %doc AUTHORS ChangeLog README.rst | |
126 | %{py_sitescriptdir}/oslo_i18n | |
127 | %{py_sitescriptdir}/oslo.i18n-%{version}-py*.egg-info | |
128 | %endif | |
129 | ||
130 | %if %{with python3} | |
131 | %files -n python3-oslo.i18n | |
132 | %defattr(644,root,root,755) | |
133 | %doc AUTHORS ChangeLog README.rst | |
134 | %{py3_sitescriptdir}/oslo_i18n | |
135 | %{py3_sitescriptdir}/oslo.i18n-%{version}-py*.egg-info | |
136 | %endif | |
137 | ||
138 | %if %{with doc} | |
139 | %files apidocs | |
140 | %defattr(644,root,root,755) | |
d4cd6b59 | 141 | %doc doc/build/html/{_static,contributor,reference,user,*.html,*.js} |
71f8fa36 | 142 | %endif |