]> git.pld-linux.org Git - packages/python-osc-lib.git/blob - python-osc-lib.spec
df55110b3eb19255b7e0bd1afd8776b029f79c1d
[packages/python-osc-lib.git] / python-osc-lib.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:        OpenStackClient Library
9 Name:           python-osc-lib
10 Version:        1.7.0
11 Release:        2
12 License:        Apache
13 Group:          Libraries/Python
14 Source0:        https://files.pythonhosted.org/packages/source/o/osc-lib/osc-lib-%{version}.tar.gz
15 # Source0-md5:  8bae654318c8c82d341f7228cfa3ec2d
16 URL:            https://pypi.python.org/pypi/osc-lib
17 BuildRequires:  rpm-pythonprov
18 BuildRequires:  rpmbuild(macros) >= 1.714
19 %if %{with python2}
20 BuildRequires:  python-modules
21 BuildRequires:  python-setuptools
22 %endif
23 %if %{with python3}
24 BuildRequires:  python3-modules
25 BuildRequires:  python3-setuptools
26 %endif
27 Requires:       python-modules
28 BuildArch:      noarch
29 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
30
31 %description
32 OpenStackClient (aka OSC) is a command-line client for OpenStack.
33 osc-lib is a package of common support modules for writing OSC
34 plugins.
35
36 %package -n python3-osc-lib
37 Summary:        OpenStackClient Library
38 Group:          Libraries/Python
39 Requires:       python3-modules
40
41 %description -n python3-osc-lib
42 OpenStackClient (aka OSC) is a command-line client for OpenStack.
43 osc-lib is a package of common support modules for writing OSC
44 plugins.
45
46 %package apidocs
47 Summary:        API documentation for Python osc-lib module
48 Summary(pl.UTF-8):      Dokumentacja API modułu Pythona osc-lib
49 Group:          Documentation
50
51 %description apidocs
52 API documentation for Pythona osc-lib module.
53
54 %description apidocs -l pl.UTF-8
55 Dokumentacja API modułu Pythona osc-lib.
56
57 %prep
58 %setup -q -n osc-lib-%{version}
59
60 %build
61 %if %{with python2}
62 %py_build %{?with_tests:test}
63 %endif
64
65 %if %{with python3}
66 %py3_build %{?with_tests:test}
67 %endif
68
69 %if %{with doc}
70 cd doc
71 %{__make} -j1 html
72 rm -rf _build/html/_sources
73 %endif
74
75 %install
76 rm -rf $RPM_BUILD_ROOT
77
78 %if %{with python2}
79 %py_install
80
81 %py_postclean
82 %endif
83
84 %if %{with python3}
85 %py3_install
86 %endif
87
88 %clean
89 rm -rf $RPM_BUILD_ROOT
90
91 %if %{with python2}
92 %files
93 %defattr(644,root,root,755)
94 %doc AUTHORS ChangeLog README.rst
95 %{py_sitescriptdir}/osc_lib
96 %{py_sitescriptdir}/osc_lib-%{version}-py*.egg-info
97 %endif
98
99 %if %{with python3}
100 %files -n python3-osc-lib
101 %defattr(644,root,root,755)
102 %doc AUTHORS ChangeLog README.rst
103 %{py3_sitescriptdir}/osc_lib
104 %{py3_sitescriptdir}/osc_lib-%{version}-py*.egg-info
105 %endif
106
107 %if %{with doc}
108 %files apidocs
109 %defattr(644,root,root,755)
110 %doc doc/_build/html/*
111 %endif
This page took 0.073502 seconds and 2 git commands to generate.