]> git.pld-linux.org Git - packages/python-oslo.i18n.git/blame - python-oslo.i18n.spec
rebuild with python 3.10
[packages/python-oslo.i18n.git] / python-oslo.i18n.spec
CommitLineData
71f8fa36
JK
1#
2# Conditional build:
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
7
8Summary: Oslo i18n library
9Name: python-oslo.i18n
10Version: 3.17.0
3ce8ab2a 11Release: 6
71f8fa36
JK
12License: Apache
13Group: Libraries/Python
14Source0: https://files.pythonhosted.org/packages/source/o/oslo.i18n/oslo.i18n-%{version}.tar.gz
15# Source0-md5: 5750633d9105a972554ea9aeb9662ef0
16URL: https://pypi.python.org/pypi/oslo.i18n
17BuildRequires: rpm-pythonprov
18BuildRequires: rpmbuild(macros) >= 1.714
19%if %{with python2}
20BuildRequires: python-pbr >= 2.0.0
21BuildRequires: python-setuptools
22%endif
23%if %{with python3}
24BuildRequires: python3-pbr >= 2.0.0
25BuildRequires: python3-setuptools
26%endif
27Requires: python-babel >= 2.3.4
28Requires: python-pbr >= 2.0.0
29Requires: python-six >= 1.9.0
30BuildArch: noarch
31BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
32
33%description
34The oslo.i18n library contain utilities for working with
35internationalization (i18n) features, especially translation for text
36strings in an application or library.
37
38%package -n python3-oslo.i18n
39Summary: Oslo i18n library
40Group: Libraries/Python
41Requires: python3-babel >= 2.3.4
42Requires: python3-pbr >= 2.0.0
43Requires: python3-six >= 1.9.0
44
45%description -n python3-oslo.i18n
46The oslo.i18n library contain utilities for working with
47internationalization (i18n) features, especially translation for text
48strings in an application or library.
49
50%package apidocs
51Summary: API documentation for Python oslo.i18n module
52Summary(pl.UTF-8): Dokumentacja API modułu Pythona oslo.i18n
53Group: Documentation
54
55%description apidocs
56API documentation for Pythona oslo.i18n module.
57
58%description apidocs -l pl.UTF-8
59Dokumentacja API modułu Pythona oslo.i18n.
60
61%prep
62%setup -q -n oslo.i18n-%{version}
63
64%build
65%if %{with python2}
66%py_build %{?with_tests:test}
67%endif
68
69%if %{with python3}
70%py3_build %{?with_tests:test}
71%endif
72
73%if %{with doc}
74cd doc
75%{__make} -j1 html
76rm -rf _build/html/_sources
77%endif
78
79%install
80rm -rf $RPM_BUILD_ROOT
81
82%if %{with python2}
83%py_install
84
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}
90
91%py_postclean
92%endif
93
94%if %{with python3}
95%py3_install
96%endif
97
98%clean
99rm -rf $RPM_BUILD_ROOT
100
101%if %{with python2}
102%files
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
107%endif
108
109%if %{with python3}
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
115%endif
116
117%if %{with doc}
118%files apidocs
119%defattr(644,root,root,755)
120%doc doc/_build/html/*
121%endif
This page took 0.150914 seconds and 4 git commands to generate.