summaryrefslogtreecommitdiff
path: root/python-octavia-lib.spec
diff options
context:
space:
mode:
Diffstat (limited to 'python-octavia-lib.spec')
-rw-r--r--python-octavia-lib.spec141
1 files changed, 141 insertions, 0 deletions
diff --git a/python-octavia-lib.spec b/python-octavia-lib.spec
new file mode 100644
index 0000000..a52a8fa
--- /dev/null
+++ b/python-octavia-lib.spec
@@ -0,0 +1,141 @@
+%{!?sources_gpg: %{!?dlrn:%global sources_gpg 1} }
+%global sources_gpg_sign 0x5d2d1e4fb8d38e6af76c50d53d4fec30cf5ce3da
+%{!?upstream_version: %global upstream_version %{version}%{?milestone}}
+%global with_doc 1
+
+%global library octavia-lib
+%global module octavia_lib
+
+%global common_desc A library to support Octavia provider drivers.
+
+Name: python-%{library}
+Version: 2.3.1
+Release: 1%{?dist}
+Summary: OpenStack Octavia library
+License: ASL 2.0
+URL: https://docs.openstack.org/octavia-lib/
+
+Source0: https://tarballs.openstack.org/%{library}/%{library}-%{upstream_version}.tar.gz
+# Required for tarball sources verification
+%if 0%{?sources_gpg} == 1
+Source101: https://tarballs.openstack.org/%{library}/%{library}-%{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
+
+BuildRequires: python3-devel
+BuildRequires: python3-pbr
+BuildRequires: python3-setuptools
+BuildRequires: git-core
+BuildRequires: openstack-macros
+
+%description
+%{common_desc}
+
+%package -n python3-%{library}
+Summary: OpenStack Octavia library
+%{?python_provide:%python_provide python3-%{library}}
+# Required for tests
+BuildRequires: python3-oslotest
+BuildRequires: python3-stestr
+BuildRequires: python3-oslo-i18n
+BuildRequires: python3-oslo-serialization
+BuildRequires: python3-oslo-utils
+BuildRequires: python3-six
+BuildRequires: python3-tenacity
+
+Requires: python3-pbr
+Requires: python3-oslo-i18n >= 3.15.3
+Requires: python3-oslo-serialization >= 2.28.1
+Requires: python3-tenacity >= 5.0.2
+
+%description -n python3-%{library}
+%{common_desc}
+
+
+%package -n python3-%{library}-tests
+Summary: OpenStack Octavia library tests
+%{?python_provide:%python_provide python3-%{library}-tests}
+Requires: python3-%{library} = %{version}-%{release}
+
+%description -n python3-%{library}-tests
+%{common_desc}
+
+This package contains the Octavia library test files.
+
+%if 0%{?with_doc}
+%package doc
+Summary: OpenStack Octavia library documentation
+
+BuildRequires: python3-sphinx
+BuildRequires: python3-openstackdocstheme
+BuildRequires: python3-sphinxcontrib-apidoc
+BuildRequires: python3-sphinxcontrib-rsvgconverter
+
+%description doc
+%{common_desc}
+
+This package contains the documentation.
+%endif
+
+%prep
+# Required for tarball sources verification
+%if 0%{?sources_gpg} == 1
+%{gpgverify} --keyring=%{SOURCE102} --signature=%{SOURCE101} --data=%{SOURCE0}
+%endif
+%autosetup -n %{library}-%{upstream_version} -S git
+
+# Let's handle dependencies ourseleves
+%py_req_cleanup
+
+%build
+%{py3_build}
+
+%if 0%{?with_doc}
+# generate html docs
+export PYTHONPATH=.
+sphinx-build-3 -b html doc/source doc/build/html
+# remove the sphinx-build leftovers
+rm -rf doc/build/html/.{doctrees,buildinfo}
+%endif
+
+%install
+%{py3_install}
+
+# Remove setuptools installed data_files
+rm -rf %{buildroot}%{_datadir}/%{library}/LICENSE
+rm -rf %{buildroot}%{_datadir}/%{library}/README.rst
+
+%check
+rm -f ./octavia_lib/tests/unit/hacking/test_checks.py
+export OS_TEST_PATH='./octavia_lib/tests/unit'
+export PATH=$PATH:%{buildroot}/usr/bin
+export PYTHONPATH=$PWD
+PYTHON=python3 stestr-3 --test-path $OS_TEST_PATH run
+
+%files -n python3-%{library}
+%license LICENSE
+%{python3_sitelib}/%{module}
+%{python3_sitelib}/%{module}-*.egg-info
+%exclude %{python3_sitelib}/%{module}/tests
+
+%files -n python3-%{library}-tests
+%license LICENSE
+%{python3_sitelib}/%{module}/tests
+
+%if 0%{?with_doc}
+%files doc
+%license LICENSE
+%doc doc/build/html README.rst
+%endif
+
+%changelog
+* Fri Mar 12 2021 RDO <dev@lists.rdoproject.org> 2.3.1-1
+- Update to 2.3.1
+