File python3-blockdiag.spec of Package python3-blockdiag
#
# spec file for package python3-blockdiag
#
# Copyright (c) 2016 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 http://bugs.opensuse.org/
Name: python3-blockdiag
Version: 1.5.3
Release: 0
License: Apache-2.0
Summary: Generate block-diagram image from text
Url: http://blockdiag.com/
Group: Development/Languages/Python
Source: https://files.pythonhosted.org/packages/source/b/blockdiag/blockdiag-%{version}.tar.gz
BuildRequires: python3-devel
BuildRequires: python3-docutils
BuildRequires: python3-Pillow
BuildRequires: python3-setuptools
BuildRequires: python3-webcolors
BuildRequires: fdupes
Requires(post): update-alternatives
Requires(postun): update-alternatives
Requires: python3-funcparserlib
Requires: python3-docutils
Requires: python3-Pillow
Requires: python3-reportlab
Requires: python3-setuptools
Requires: python3-webcolors
Suggests: python3-nose
Suggests: python3-mock
Suggests: python3-pep8 >= 1.3
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildArch: noarch
%description
Generate block-diagram image file from spec-text file.
%prep
%setup -q -n blockdiag-%{version}
%build
python3 setup.py build
%install
python3 setup.py install --prefix=%{_prefix} --root=%{buildroot}
%fdupes %{buildroot}%{python3_sitelib}
mv %{buildroot}%{_bindir}/blockdiag %{buildroot}%{_bindir}/blockdiag-%{py3_ver}
%post
update-alternatives \
--install %{_bindir}/blockdiag blockdiag %{_bindir}/blockdiag-%{py3_ver} 50
%postun
if [ $1 -eq 0 ] ; then
update-alternatives --remove blockdiag %{_bindir}/blockdiag-%{py3_ver}
fi
%files
%defattr(-,root,root,-)
%doc CHANGES.rst LICENSE README.rst
%{_bindir}/blockdiag-%{py3_ver}
%{python3_sitelib}/*
%ghost %{_sysconfdir}/alternatives/blockdiag
%changelog