/
python-networking-generic-switch.spec
120 lines (92 loc) · 3.34 KB
/
python-networking-generic-switch.spec
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
%{!?upstream_version: %global upstream_version %{version}%{?milestone}}
%global srcname networking_generic_switch
%global pkgname networking-generic-switch
%global common_summary Pluggable Modular Layer 2 Neutron Mechanism driver
Name: python-%{pkgname}
Version: XXX
Release: XXX
Summary: %{common_summary}
License: ASL 2.0
URL: https://pypi.python.org/pypi/%{pkgname}
Source0: https://tarballs.openstack.org/%{pkgname}/%{pkgname}-%{upstream_version}.tar.gz
BuildArch: noarch
BuildRequires: git
BuildRequires: openstack-macros
BuildRequires: python2-devel
BuildRequires: python2-pbr
# for documentation
BuildRequires: python2-oslo-sphinx
BuildRequires: python2-sphinx
# for unit tests
BuildRequires: /usr/bin/ostestr
BuildRequires: python2-mock
BuildRequires: python2-fixtures
BuildRequires: python2-netmiko
BuildRequires: python-neutron-lib
BuildRequires: python-neutron-tests
BuildRequires: python2-oslo-config
BuildRequires: python2-oslo-i18n
BuildRequires: python2-oslo-log
BuildRequires: python2-six
BuildRequires: python2-stevedore
BuildRequires: python-tenacity
BuildRequires: python2-tooz
%description
Pluggable Modular Layer 2 Neutron Mechanism driver implementing functionality
required for use-cases like OpenStack Ironic multi-tenancy mode.
%prep
%autosetup -n %{pkgname}-%{upstream_version} -S git
%py_req_cleanup
%build
%py2_build
%{__python2} setup.py build_sphinx -b html
# remove the sphinx-build leftovers
rm -rf doc/build/html/.{doctrees,buildinfo}
%check
ostestr --path %{srcname}/tests/unit
%install
%py2_install
%package -n python2-%{pkgname}
Summary: %{common_summary}
%{?python_provide:%python_provide python2-%{pkgname}}
Requires: python2-netmiko >= 1.2.5
Requires: python-neutron-lib >= 1.13.0
Requires: python2-oslo-config >= 2:5.1.0
Requires: python2-oslo-i18n >= 3.15.3
Requires: python2-oslo-log >= 3.36.0
Requires: python2-six >= 1.10.0
Requires: python2-stevedore >= 1.20.0
Requires: python-tenacity >= 3.2.1
Requires: python2-tooz >= 1.58.0
%description -n python2-%{pkgname}
Pluggable Modular Layer 2 Neutron Mechanism driver implementing functionality
required for use-cases like OpenStack Ironic multi-tenancy mode.
This package contains the plugin itself.
%package -n python2-%{pkgname}-tests
Summary: %{common_summary} - tests
Requires: python2-%{pkgname} = %{version}-%{release}
Requires: python2-mock >= 2.0.0
Requires: python-neutron-tests
Requires: python2-fixtures >= 3.0.0
%description -n python2-%{pkgname}-tests
Pluggable Modular Layer 2 Neutron Mechanism driver implementing functionality
required for use-cases like OpenStack Ironic multi-tenancy mode.
This package contains the unit tests.
%package doc
Summary: %{common_summary} - documentation
%description doc
Pluggable Modular Layer 2 Neutron Mechanism driver implementing functionality
required for use-cases like OpenStack Ironic multi-tenancy mode.
This package contains the documentation.
%files -n python2-%{pkgname}
%license LICENSE
%{python2_sitelib}/%{srcname}
%{python2_sitelib}/%{srcname}*.egg-info
%exclude %{python2_sitelib}/%{srcname}/tests
%files -n python2-%{pkgname}-tests
%license LICENSE
%{python2_sitelib}/%{srcname}/tests
%files doc
%license LICENSE
%doc doc/build/html README.rst
%changelog