]> git.pld-linux.org Git - packages/python-oslo.config.git/blob - python-oslo.config.spec
rebuild with tests and docs
[packages/python-oslo.config.git] / python-oslo.config.spec
1 #
2 # Conditional build:
3 %bcond_with     doc     # do build doc (missing deps)
4 %bcond_with     tests   # do perform "make test" (missing deps)
5 %bcond_without  python2 # CPython 2.x module
6 %bcond_without  python3 # CPython 3.x module
7
8 Summary:        Oslo Configuration API
9 Name:           python-oslo.config
10 Version:        4.11.0
11 Release:        7
12 License:        Apache
13 Group:          Libraries/Python
14 Source0:        https://files.pythonhosted.org/packages/source/o/oslo.config/oslo.config-%{version}.tar.gz
15 # Source0-md5:  144c11b78b24c3d7393e23c5eaf2fedf
16 URL:            https://pypi.python.org/pypi/oslo.config
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-PyYAML >= 3.10.0
28 Requires:       python-debtcollector >= 1.2.0
29 Requires:       python-netaddr >= 0.7.13
30 Requires:       python-oslo.i18n >= 2.1.0
31 Requires:       python-rfc3986 >= 0.3.1
32 Requires:       python-six >= 1.9.0
33 Requires:       python-stevedore >= 1.20.0
34 BuildArch:      noarch
35 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
36
37 %description
38 The Oslo configuration API supports parsing command line arguments and
39 .ini style configuration files.
40
41 %package -n python3-oslo.config
42 Summary:        Oslo Configuration API
43 Group:          Libraries/Python
44 Requires:       python3-PyYAML >= 3.10.0
45 Requires:       python3-debtcollector >= 1.2.0
46 Requires:       python3-netaddr >= 0.7.13
47 Requires:       python3-oslo.i18n >= 2.1.0
48 Requires:       python3-rfc3986 >= 0.3.1
49 Requires:       python3-six >= 1.9.0
50 Requires:       python3-stevedore >= 1.20.0
51
52 %description -n python3-oslo.config
53 The Oslo configuration API supports parsing command line arguments and
54 .ini style configuration files.
55
56 %package apidocs
57 Summary:        API documentation for Python oslo.config module
58 Summary(pl.UTF-8):      Dokumentacja API modułu Pythona oslo.config
59 Group:          Documentation
60
61 %description apidocs
62 API documentation for Pythona oslo.config module.
63
64 %description apidocs -l pl.UTF-8
65 Dokumentacja API modułu Pythona oslo.config.
66
67 %prep
68 %setup -q -n oslo.config-%{version}
69
70 %build
71 %if %{with python2}
72 %py_build %{?with_tests:test}
73 %endif
74
75 %if %{with python3}
76 %py3_build %{?with_tests:test}
77 %endif
78
79 %if %{with doc}
80 cd doc
81 %{__make} -j1 html
82 rm -rf _build/html/_sources
83 %endif
84
85 %install
86 rm -rf $RPM_BUILD_ROOT
87
88 %if %{with python2}
89 %py_install
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_config
106 %{py_sitescriptdir}/oslo.config-%{version}-py*.egg-info
107 %if %{without python3}
108 %attr(755,root,root) %{_bindir}/oslo-config-generator
109 %endif
110 %endif
111
112 %if %{with python3}
113 %files -n python3-oslo.config
114 %defattr(644,root,root,755)
115 %doc AUTHORS ChangeLog README.rst
116 %attr(755,root,root) %{_bindir}/oslo-config-generator
117 %{py3_sitescriptdir}/oslo_config
118 %{py3_sitescriptdir}/oslo.config-%{version}-py*.egg-info
119 %endif
120
121 %if %{with doc}
122 %files apidocs
123 %defattr(644,root,root,755)
124 %doc doc/_build/html/*
125 %endif
This page took 0.181442 seconds and 3 git commands to generate.