3 %bcond_with doc # build doc (broken)
4 %bcond_with tests # do perform "make test" (broken)
5 %bcond_without python2 # CPython 2.x module
6 %bcond_without python3 # CPython 3.x module
8 Summary: Oslo i18n library
13 Group: Libraries/Python
14 Source0: https://files.pythonhosted.org/packages/source/o/oslo.i18n/oslo.i18n-%{version}.tar.gz
15 # Source0-md5: 5750633d9105a972554ea9aeb9662ef0
16 URL: https://pypi.python.org/pypi/oslo.i18n
17 BuildRequires: rpm-pythonprov
18 BuildRequires: rpmbuild(macros) >= 1.714
20 BuildRequires: python-pbr >= 2.0.0
21 BuildRequires: python-setuptools
24 BuildRequires: python3-pbr >= 2.0.0
25 BuildRequires: python3-setuptools
27 Requires: python-babel >= 2.3.4
28 Requires: python-pbr >= 2.0.0
29 Requires: python-six >= 1.9.0
31 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
34 The oslo.i18n library contain utilities for working with
35 internationalization (i18n) features, especially translation for text
36 strings in an application or library.
38 %package -n python3-oslo.i18n
39 Summary: Oslo i18n library
40 Group: Libraries/Python
41 Requires: python3-babel >= 2.3.4
42 Requires: python3-pbr >= 2.0.0
43 Requires: python3-six >= 1.9.0
45 %description -n python3-oslo.i18n
46 The oslo.i18n library contain utilities for working with
47 internationalization (i18n) features, especially translation for text
48 strings in an application or library.
51 Summary: API documentation for Python oslo.i18n module
52 Summary(pl.UTF-8): Dokumentacja API modułu Pythona oslo.i18n
56 API documentation for Pythona oslo.i18n module.
58 %description apidocs -l pl.UTF-8
59 Dokumentacja API modułu Pythona oslo.i18n.
62 %setup -q -n oslo.i18n-%{version}
66 %py_build %{?with_tests:test}
70 %py3_build %{?with_tests:test}
76 rm -rf _build/html/_sources
80 rm -rf $RPM_BUILD_ROOT
85 # when files are installed in other way that standard 'setup.py
86 # they need to be (re-)compiled
87 # change %{py_sitedir} to %{py_sitescriptdir} for 'noarch' packages!
88 %py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
89 %py_comp $RPM_BUILD_ROOT%{py_sitedir}
99 rm -rf $RPM_BUILD_ROOT
103 %defattr(644,root,root,755)
104 %doc AUTHORS ChangeLog README.rst
105 %{py_sitescriptdir}/oslo_i18n
106 %{py_sitescriptdir}/oslo.i18n-%{version}-py*.egg-info
110 %files -n python3-oslo.i18n
111 %defattr(644,root,root,755)
112 %doc AUTHORS ChangeLog README.rst
113 %{py3_sitescriptdir}/oslo_i18n
114 %{py3_sitescriptdir}/oslo.i18n-%{version}-py*.egg-info
119 %defattr(644,root,root,755)
120 %doc doc/_build/html/*