]> git.pld-linux.org Git - packages/python-oslo.i18n.git/blob - python-oslo.i18n.spec
new package
[packages/python-oslo.i18n.git] / python-oslo.i18n.spec
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
8 Summary:        Oslo i18n library
9 Name:           python-oslo.i18n
10 Version:        3.17.0
11 Release:        1
12 License:        Apache
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
19 %if %{with python2}
20 BuildRequires:  python-pbr >= 2.0.0
21 BuildRequires:  python-setuptools
22 %endif
23 %if %{with python3}
24 BuildRequires:  python3-pbr >= 2.0.0
25 BuildRequires:  python3-setuptools
26 %endif
27 Requires:       python-babel >= 2.3.4
28 Requires:       python-pbr >= 2.0.0
29 Requires:       python-six >= 1.9.0
30 BuildArch:      noarch
31 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
32
33 %description
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.
37
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
44
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.
49
50 %package apidocs
51 Summary:        API documentation for Python oslo.i18n module
52 Summary(pl.UTF-8):      Dokumentacja API modułu Pythona oslo.i18n
53 Group:          Documentation
54
55 %description apidocs
56 API documentation for Pythona oslo.i18n module.
57
58 %description apidocs -l pl.UTF-8
59 Dokumentacja 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}
74 cd doc
75 %{__make} -j1 html
76 rm -rf _build/html/_sources
77 %endif
78
79 %install
80 rm -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
99 rm -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.060201 seconds and 3 git commands to generate.