File openstack-horizon-plugin-heat-ui.spec of Package openstack-horizon-plugin-heat-ui
#
# spec file for package openstack-horizon-plugin-heat-ui
#
# 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/
#
%if 0%{?rhel} || 0%{?fedora}
%global http_dashboard_dir %{_datarootdir}/openstack-dashboard
%else
%global http_dashboard_dir /srv/www/openstack-dashboard
%endif
Name: openstack-horizon-plugin-heat-ui
Version: 1.4.1~dev4
Release: 0
Summary: Horizon plugin for heat
License: Apache-2.0
Group: Development/Languages/Python
URL: https://launchpad.net/heat-dashboard
Source0: heat-dashboard-stable-rocky.tar.gz
BuildRequires: fdupes
BuildRequires: openstack-dashboard >= 14.0.0.0b3
BuildRequires: openstack-macros
BuildRequires: python-XStatic-Angular-UUID
BuildRequires: python-XStatic-Angular-Vis
BuildRequires: python-XStatic-FileSaver
BuildRequires: python-XStatic-JS-Yaml
BuildRequires: python-XStatic-Json2yaml
BuildRequires: python-heatclient >= 1.10.0
BuildRequires: python-mock
BuildRequires: python-mox3
BuildRequires: python-pbr >= 2.0.0
Requires: python-horizon-plugin-heat-ui = %{version}
BuildArch: noarch
%description
Heat dashboard is a horizon plugin for Heat.
%package -n python-horizon-plugin-heat-ui
Summary: Horizon plugin for heat - Python Module
Group: Development/Languages/Python
Requires: python-XStatic-Angular-UUID
Requires: python-XStatic-Angular-Vis
Requires: python-XStatic-FileSaver
Requires: python-XStatic-JS-Yaml
Requires: python-XStatic-Json2yaml
Requires: python-heatclient >= 1.10.0
Requires: python-pbr >= 2.0.0
%description -n python-horizon-plugin-heat-ui
OpenStack Heat plugin for Horizon.
This package contains the core Python module of the heat-ui.
%package test
Summary: Heat Management Plugin for Horizon - Testsuite
Group: Development/Languages/Python
Requires: python-mock
#Requires: python-nodeenv
Requires: python-testtools
%description test
OpenStack Heat management plugin for Horizon.
It is used to verify the functionality of the Heat UI Plugin.
%prep
%autosetup -p1 -n heat-dashboard-1.4.1.dev4
%py_req_cleanup
%build
%py2_build
%check
PYTHONPATH=%{http_dashboard_dir} python manage.py test heat_dashboard --settings=heat_dashboard.test.settings
%install
%py2_install
install -m 0755 -d %{buildroot}%{http_dashboard_dir}/openstack_dashboard/enabled/
cp -a heat_dashboard/enabled/*.py %{buildroot}%{http_dashboard_dir}/openstack_dashboard/enabled/
install -m 0755 -d %{buildroot}%{http_dashboard_dir}/openstack_dashboard/local/local_settings.d/
cp -a heat_dashboard/local_settings.d/_1699_orchestration_settings.py \
%{buildroot}%{http_dashboard_dir}/openstack_dashboard/local/local_settings.d/_1699_orchestration_settings.py
%fdupes %{buildroot}%{python2_sitelib}
%fdupes %{buildroot}%{http_dashboard_dir}
%post
su %{apache_user} -s /bin/sh -c "python %{http_dashboard_dir}/manage.py collectstatic --noinput --clear > /dev/null"
%postun
su %{apache_user} -s /bin/sh -c "python %{http_dashboard_dir}/manage.py collectstatic --noinput --clear > /dev/null"
%files
%doc ChangeLog CONTRIBUTING.rst README.rst
%license LICENSE
%{http_dashboard_dir}/openstack_dashboard/enabled/*.py*
%{http_dashboard_dir}/openstack_dashboard/local/local_settings.d/_1699_orchestration_settings.py*
%files -n python-horizon-plugin-heat-ui
%doc README.rst
%license LICENSE
%{python2_sitelib}/heat_dashboard/
%{python2_sitelib}/heat_dashboard-*.egg-info
%exclude %{python_sitelib}/heat_dashboard/test*
%files test
%{python_sitelib}/heat_dashboard/test*
%changelog