File python-octavia-tempest-plugin.spec of Package python-octavia-tempest-plugin

#
# spec file for package python39-octavia-tempest-plugin
#
# Copyright (c) 2023 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via https://bugs.opensuse.org/
#


Name:           python39-octavia-tempest-plugin
Version:        1.5.0
Release:        0
Summary:        Tempest plugin for the Octavia project
License:        Apache-2.0
Group:          Development/Languages/Python
URL:            https://docs.openstack.org/octavia-tempest-plugin
Source0:        octavia-tempest-plugin-1.5.0.tar.gz
BuildRequires:  openstack-macros
BuildRequires:  python39-pbr
Requires:       openstack-tempest
Requires:       python39-cryptography
Requires:       python39-oslo.config
Requires:       python39-oslo.log
Requires:       python39-oslo.utils
Requires:       python39-oslotest
Requires:       python39-pbr
Requires:       python39-python-dateutil
Requires:       python39-requests
Requires:       python39-six
Requires:       python39-tenacity
%if 0%{?suse_version}
BuildRequires:  golang-packaging
%else
BuildRequires:  golang
%endif

%description
This project contains the Tempest plugin for the Octavia project for
OpenStack Load Balancing.

%prep
%autosetup -p1 -n octavia-tempest-plugin-1.5.0
%py_req_cleanup

%build
pushd octavia_tempest_plugin/contrib/test_server
# we don't want to ship a binary blob that we didn't build ourself
rm -f test_server.bin
%if 0%{?suse_version}
CGO_ENABLED=0 GOOS=linux go build -a -ldflags '-s -w -extldflags -static' -o test_server.bin test_server.go
%else
# NOTE(jpena): the CentOS 8 build fails without this flag
go build -ldflags '-linkmode=external -compressdwarf=false' -o test_server.bin test_server.go
%endif
popd
%{py3_build}

%install
%{py3_install}

%files
%license LICENSE
%doc README.rst
%{python3_sitelib}/octavia_tempest_plugin
%{python3_sitelib}/*.egg-info

%changelog
openSUSE Build Service is sponsored by