]> git.pld-linux.org Git - packages/python-oslo.utils.git/blame - python-oslo.utils.spec
- release 3 (by relup.sh)
[packages/python-oslo.utils.git] / python-oslo.utils.spec
CommitLineData
ec8fe2e1
JK
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
8Summary: Oslo Utility library
9Name: python-oslo.utils
e9c0e915 10Version: 3.36.3
b8f0d489 11Release: 3
ec8fe2e1
JK
12License: Apache
13Group: Libraries/Python
14Source0: https://files.pythonhosted.org/packages/source/o/oslo.utils/oslo.utils-%{version}.tar.gz
e9c0e915 15# Source0-md5: f4d23e51547a37b2e54bb1623e6d2534
ec8fe2e1
JK
16URL: https://pypi.python.org/pypi/oslo.utils
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
27BuildRequires: sed >= 4.0
28Requires: python-debtcollector >= 1.2.0
29Requires: python-funcsigs >= 0.4
30Requires: python-iso8601 >= 0.1.11
31Requires: python-monotonic >= 0.6
32Requires: python-netaddr >= 0.7.13
33Requires: python-netifaces >= 0.10.4
34Requires: python-oslo.i18n >= 2.1.0
35Requires: python-pbr >= 2.0.0
36Requires: python-pyparsing >= 2.1.0
37Requires: python-pytz >= 2013.6
38Requires: python-six >= 1.9.0
39BuildArch: noarch
40BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
41
42%description
43The oslo.utils library provides support for common utility type
44functions, such as encoding, exception handling, string manipulation,
45and time handling.
46
47%description -l pl.UTF-8
48
49%package -n python3-oslo.utils
50Summary: Oslo Utility library
51Group: Libraries/Python
52Requires: python3-debtcollector >= 1.2.0
53Requires: python3-iso8601 >= 0.1.11
54Requires: python3-monotonic >= 0.6
55Requires: python3-netaddr >= 0.7.13
56Requires: python3-netifaces >= 0.10.4
57Requires: python3-oslo.i18n >= 2.1.0
58Requires: python3-pbr >= 2.0.0
59Requires: python3-pyparsing >= 2.1.0
60Requires: python3-pytz >= 2013.6
61Requires: python3-six >= 1.9.0
62
63%description -n python3-oslo.utils
64The oslo.utils library provides support for common utility type
65functions, such as encoding, exception handling, string manipulation,
66and time handling.
67
68%package apidocs
69Summary: API documentation for Python oslo.utils module
70Summary(pl.UTF-8): Dokumentacja API modułu Pythona oslo.utils
71Group: Documentation
72
73%description apidocs
74API documentation for Pythona oslo.utils module.
75
76%description apidocs -l pl.UTF-8
77Dokumentacja API modułu Pythona oslo.utils.
78
79%prep
80%setup -q -n oslo.utils-%{version}
81
82%build
83%if %{with python2}
84%py_build %{?with_tests:test}
85%endif
86
87%if %{with python3}
88%py3_build %{?with_tests:test}
89%endif
90
91%if %{with doc}
92cd doc
93%{__make} -j1 html
94rm -rf _build/html/_sources
95%endif
96
97%install
98rm -rf $RPM_BUILD_ROOT
99
100%if %{with python2}
101%py_install
102
103# when files are installed in other way that standard 'setup.py
104# they need to be (re-)compiled
105# change %{py_sitedir} to %{py_sitescriptdir} for 'noarch' packages!
106%py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
107%py_comp $RPM_BUILD_ROOT%{py_sitedir}
108
109%py_postclean
110%endif
111
112%if %{with python3}
113%py3_install
114
115# python dependency generator does not support conditionals
116# remove python2-only dependencies here
117sed -i -e"/python_version=='2./,+1 d" $RPM_BUILD_ROOT%{py3_sitescriptdir}/oslo.utils-%{version}-py*.egg-info/requires.txt
118%endif
119
120%clean
121rm -rf $RPM_BUILD_ROOT
122
123%if %{with python2}
124%files
125%defattr(644,root,root,755)
126%doc AUTHORS ChangeLog README.rst
127%{py_sitescriptdir}/oslo_utils
128%{py_sitescriptdir}/oslo.utils-%{version}-py*.egg-info
129%endif
130
131%if %{with python3}
132%files -n python3-oslo.utils
133%defattr(644,root,root,755)
134%doc AUTHORS ChangeLog README.rst
135%{py3_sitescriptdir}/oslo_utils
136%{py3_sitescriptdir}/oslo.utils-%{version}-py*.egg-info
137%endif
138
139%if %{with doc}
140%files apidocs
141%defattr(644,root,root,755)
142%doc doc/_build/html/*
143%endif
This page took 0.121119 seconds and 4 git commands to generate.