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

#
# spec file for package python-octavia-tempest-plugin
#
# Copyright (c) 2020 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:           python-octavia-tempest-plugin
Version:        0.2.0
Release:        0
Summary:        Tempest plugin for the Octavia project
License:        Apache-2.0
Group:          Development/Languages/Python
URL:            https://git.openstack.org/cgit/openstack/octavia-tempest-plugin
Source0:        octavia-tempest-plugin-0.2.0.tar.gz
BuildRequires:  openstack-macros
BuildRequires:  python-devel
BuildRequires:  python2-pbr
BuildRequires:  python3-devel
BuildRequires:  python3-pbr
Requires:       openstack-tempest
Requires:       python-cryptography
Requires:       python-oslo.config
Requires:       python-oslo.log
Requires:       python-oslo.utils
Requires:       python-oslotest
Requires:       python-pbr
Requires:       python-python-dateutil
Requires:       python-requests
Requires:       python-six
Requires:       python-tenacity
%if 0%{?suse_version}
BuildRequires:  golang-packaging
%else
BuildRequires:  golang
%endif
%python_subpackages

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

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

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

%install
%{python_install}

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

%changelog
openSUSE Build Service is sponsored by