summaryrefslogtreecommitdiff
path: root/python-ovn-octavia-provider.spec
blob: 888cd6118a3259d63ce2e9753da3aaf74200a979 (plain)
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
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
%{!?sources_gpg: %{!?dlrn:%global sources_gpg 0} }
%global sources_gpg_sign 0xa7475c5f2122fec3f90343223fe3bf5aad1080e4

%{!?upstream_version: %global upstream_version %{version}}
%global upstream_name ovn-octavia-provider
%global sum OVN provider driver for Openstack Octavia
%global library ovn_octavia_provider

Name:           python-%{upstream_name}
Summary:        %{sum}
Version:        1.0.2
Release:        1%{?dist}
License:        ASL 2.0
URL:            https://opendev.org/openstack/ovn-octavia-provider
Source0:        https://tarballs.opendev.org/openstack/%{upstream_name}/%{upstream_name}-%{upstream_version}.tar.gz
# Required for tarball sources verification
%if 0%{?sources_gpg} == 1
Source101:        https://tarballs.opendev.org/openstack/%{upstream_name}/%{upstream_name}-%{upstream_version}.tar.gz.asc
Source102:        https://releases.openstack.org/_static/%{sources_gpg_sign}.txt
%endif

BuildArch:      noarch

# Required for tarball sources verification
%if 0%{?sources_gpg} == 1
BuildRequires:  /usr/bin/gpgv2
%endif

%description
OVN Octavia provider is OVN driver for Openstack Octavia.

%package -n     python3-%{upstream_name}
Summary:        %{sum}
%{?python_provide:%python_provide python3-%{upstream_name}}

BuildRequires:  git-core
BuildRequires:  openstack-macros
BuildRequires:  python3-devel
BuildRequires:  python3-pbr >= 2.0.0

Requires:       python3-keystoneauth1 >= 3.4.0
Requires:       python3-netaddr >= 0.7.18
Requires:       python3-neutron-lib >= 2.1.0
Requires:       python3-neutronclient >= 6.7.0
Requires:       python3-octavia-lib >= 1.3.1
Requires:       python3-openvswitch >= 2.8.0
%if 0%{?openEuler}
Requires:       python3-oslo-config
%else
Requires:       python3-oslo-config >= 2:5.2.0
%endif
Requires:       python3-oslo-log >= 3.36.0
Requires:       python3-oslo-utils >= 3.33.0
Requires:       python3-oslo-serialization >= 2.28.1
Requires:       python3-ovsdbapp >= 0.17.0
Requires:       python3-pbr >= 2.0.0
Requires:       python3-tenacity >= 5.0.2
Requires:       python3-sqlalchemy >= 1.2.19
Requires:       python3-sqlalchemy < 1.4.0
Requires:       python3-oslo-messaging >= 12.4.0
%description -n python3-%{upstream_name}
OVN Octavia provider is OVN driver for Openstack Octavia.

%package -n python3-%{upstream_name}-tests
Summary:  %{sum} unit tests
%{?python_provide:%python_provide python3-%{upstream_name}-tests}
BuildRequires:  python3-neutron-tests
BuildRequires:  python3-neutron-lib-tests
BuildRequires:  python3-octavia-lib
BuildRequires:  python3-oslo-config
BuildRequires:  python3-oslo-log
BuildRequires:  python3-oslo-serialization
BuildRequires:  python3-oslotest
BuildRequires:  python3-ovsdbapp
BuildRequires:  python3-stestr
BuildRequires:  python3-tenacity
BuildRequires:  python3-testresources
BuildRequires:  python3-testscenarios
BuildRequires:  python3-testtools
BuildRequires:  python3-webtest

Requires: python3-%{upstream_name} = %{version}-%{release}
%if 0%{?openEuler}
Requires: python3-neutron-tests
%else
Requires: python3-neutron-tests >= 1:15.0.0
%endif
Requires: python3-neutron-lib-tests >= 1.28.0
Requires: python3-oslotest >= 3.2.0
Requires: python3-stestr >= 1.0.0
Requires: python3-testresources
Requires: python3-testscenarios >= 0.4
Requires: python3-testtools >= 2.2.0
Requires: python3-webtest >= 2.0.27

%description -n python3-%{upstream_name}-tests
This package contains the OVN Octavia test files.

%prep
# Required for tarball sources verification
%if 0%{?sources_gpg} == 1
%{gpgverify}  --keyring=%{SOURCE102} --signature=%{SOURCE101} --data=%{SOURCE0}
%endif
%autosetup -n %{upstream_name}-%{upstream_version} -S git

# Remove the requirements file so that pbr hooks don't add it
# to distutils requires_dist config
%py_req_cleanup

%build
%{py3_build}

%install
%{py3_install}

# Remove setuptools installed data_files
rm -rf %{buildroot}%{_datadir}/%{library}/LICENSE
rm -rf %{buildroot}%{_datadir}/%{library}/README.rst

%check
rm -f ./ovn_octavia_provider/tests/unit/hacking/test_checks.py
export OS_TEST_PATH='./ovn_octavia_provider/tests/unit'
export PATH=$PATH:%{buildroot}/usr/bin
export PYTHONPATH=$PWD
PYTHON=%{__python3} stestr --test-path $OS_TEST_PATH run

%files -n python3-%{upstream_name}-tests
%license LICENSE
%{python3_sitelib}/%{library}/tests

%files -n python3-%{upstream_name}
%license LICENSE
%{python3_sitelib}/%{library}
%{python3_sitelib}/%{library}-*.egg-info
%exclude %{python3_sitelib}/%{library}/tests

%changelog
* Wed Nov 02 2022 RDO <dev@lists.rdoproject.org> 1.0.2-1
- Update to 1.0.2

* Thu Jul 28 2022 RDO <dev@lists.rdoproject.org> 1.0.1-1
- Update to 1.0.1

* Fri Mar 26 2021 RDO <dev@lists.rdoproject.org> 1.0.0-1
- Update to 1.0.0