File openstack-heat-gbp.spec of Package openstack-heat-gbp
#
# spec file for package openstack-heat-gbp
#
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
#
# 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/
#
%define component gbpautomation
%if ! %{defined _rundir}
%define _rundir %{_localstatedir}/run
%endif
%define version_unconverted 6.0.1.dev3
Name: openstack-heat-gbp
Version: 6.0.1~dev3
Release: 0
Summary: Openstack Group Based Policy Automation
License: Apache-2.0
Group: System/Management
Url: https://launchpad.net/group-based-policy-automation
Source: http://tarballs.openstack.org/group-based-policy-automation/group-based-policy-automation-master.tar.gz
BuildRequires: crudini
BuildRequires: fdupes
BuildRequires: openstack-suse-macros
BuildRequires: python-Sphinx
BuildRequires: python-devel
BuildRequires: python-oslosphinx
BuildRequires: python-pbr
Requires: python >= 2.6.8
Requires: python-heat-gbp = %{version}
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%if 0%{?suse_version} && 0%{?suse_version} <= 1110
%{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
%py_requires
%else
BuildArch: noarch
%endif
PreReq: %fillup_prereq
%description
Heat addon for Group Based Policy
%package -n python-heat-gbp
Summary: OpenStack Group Based Policy Automation - Python module
Group: Development/Languages/Python
Requires: python >= 2.6.8
Requires: python-Babel >= 2.3.4
Requires: python-mox3 >= 0.20.0
Requires: python-pbr >= 2.0.0
%description -n python-heat-gbp
This package contains the core Python module of Group Based Policy Automation (GBP)
%package test
Summary: OpenStack Group Based Policy - Testsuite
Group: Development/Languages/Python
Requires: %{name} = %{version}
Requires: python-PyMySQL >= 0.7.6
Requires: python-kombu >= 4.0.0
Requires: python-mock >= 2.0
Requires: python-oslotest >= 3.2.0
Requires: python-paramiko >= 1.16.0
Requires: python-psycopg2 >= 2.6.2
Requires: python-reno >= 2.5.0
Requires: python-testrepository >= 0.0.18
Requires: python-testresources >= 2.0.0
Requires: python-testscenarios >= 0.4
Requires: python-testtools >= 2.2.0
%description test
OpenStack Group Based Policy - Testsuite
%prep
%setup -q -n group-based-policy-automation-%{version_unconverted}
%openstack_cleanup_prep
%build
python setup.py build
python setup.py build_sphinx -b man
#tools/config/generate_sample.sh -p gbpservice
%install
python setup.py install --skip-build --prefix=%{_prefix} --root=%{buildroot} --install-data=/
### test subpackage
%openstack_test_package_install
%fdupes %{buildroot}%{_localstatedir}/lib/%{name}-test
ln -sf %{python_sitelib}/%{component}/heat/tests %{openstack_test_package_buildroot_dir}/%{component}
### misc
%fdupes %{buildroot}%{python_sitelib}/%{component}
%fdupes %{buildroot}%{_bindir}
%files
%defattr(-,root,root,-)
%doc README.rst
%license LICENSE
%files -n python-heat-gbp
%defattr(-,root,root,-)
%license LICENSE
%{python_sitelib}/%{component}/
%{python_sitelib}/group_based_policy_automation*.egg-info
# Part of test subpackage
%exclude %{python_sitelib}/%{component}/heat/tests/
%files test
%defattr(-,root,root)
%{python_sitelib}/%{component}/heat/tests/
%{_localstatedir}/lib/%{name}-test/
%changelog