2016-05-17 13:13:39 +00:00
|
|
|
#
|
|
|
|
# spec file for package python-blockdiag
|
|
|
|
#
|
2018-02-27 21:54:09 +00:00
|
|
|
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
|
2016-05-17 13:13:39 +00:00
|
|
|
#
|
|
|
|
# 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.
|
|
|
|
|
2018-12-04 13:17:17 +00:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2016-05-17 13:13:39 +00:00
|
|
|
#
|
|
|
|
|
2018-02-27 21:54:09 +00:00
|
|
|
|
2017-04-20 15:16:51 +00:00
|
|
|
# tests need network connection
|
|
|
|
%bcond_with tests
|
2016-05-17 13:13:39 +00:00
|
|
|
|
2017-04-20 15:16:51 +00:00
|
|
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
2016-05-17 13:13:39 +00:00
|
|
|
Name: python-blockdiag
|
|
|
|
Version: 1.5.3
|
|
|
|
Release: 0
|
|
|
|
Summary: Generates block-diagram image from text
|
|
|
|
License: Apache-2.0
|
|
|
|
Group: Development/Languages/Python
|
|
|
|
Url: http://blockdiag.com/
|
2016-12-06 12:05:45 +00:00
|
|
|
Source: https://files.pythonhosted.org/packages/source/b/blockdiag/blockdiag-%{version}.tar.gz
|
2017-04-20 15:16:51 +00:00
|
|
|
BuildRequires: %{python_module Pillow >= 2.2.1}
|
|
|
|
BuildRequires: %{python_module funcparserlib >= 0.3.6}
|
|
|
|
BuildRequires: %{python_module reportlab}
|
2018-02-27 21:54:09 +00:00
|
|
|
BuildRequires: %{python_module setuptools}
|
2017-04-20 15:16:51 +00:00
|
|
|
BuildRequires: %{python_module webcolors}
|
2018-02-27 21:54:09 +00:00
|
|
|
BuildRequires: fdupes
|
|
|
|
BuildRequires: python-rpm-macros
|
2017-04-20 15:16:51 +00:00
|
|
|
%if %{with tests}
|
|
|
|
BuildRequires: %{python_module docutils}
|
|
|
|
BuildRequires: %{python_module mock}
|
|
|
|
BuildRequires: %{python_module nose}
|
|
|
|
BuildRequires: %{python_module pep8 >= 1.3}
|
|
|
|
BuildRequires: %{python_module pip >= 1.4.1}
|
|
|
|
%endif
|
|
|
|
Requires: python-Pillow >= 2.2.1
|
|
|
|
Requires: python-funcparserlib >= 0.3.6
|
2016-05-17 13:13:39 +00:00
|
|
|
Requires: python-webcolors
|
2018-03-06 14:29:56 +00:00
|
|
|
%if 0%{?suse_version} >= 1000 || 0%{?fedora_version} >= 24
|
2017-04-20 15:16:51 +00:00
|
|
|
Recommends: ghostscript
|
|
|
|
Recommends: python-Wand
|
|
|
|
Recommends: python-reportlab
|
2018-02-27 21:54:09 +00:00
|
|
|
%endif
|
2017-04-20 15:16:51 +00:00
|
|
|
Requires(post): update-alternatives
|
|
|
|
Requires(preun): update-alternatives
|
2016-05-17 13:13:39 +00:00
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
|
|
BuildArch: noarch
|
2017-04-20 15:16:51 +00:00
|
|
|
%python_subpackages
|
2016-05-17 13:13:39 +00:00
|
|
|
|
|
|
|
%description
|
2017-04-20 15:16:51 +00:00
|
|
|
The blockdiag package generates block-diagram image file
|
|
|
|
from a spec-text file.
|
2016-05-17 13:13:39 +00:00
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q -n blockdiag-%{version}
|
|
|
|
|
|
|
|
%build
|
2017-04-20 15:16:51 +00:00
|
|
|
%python_build
|
2016-05-17 13:13:39 +00:00
|
|
|
|
|
|
|
%install
|
2017-04-20 15:16:51 +00:00
|
|
|
%python_install
|
|
|
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
|
|
|
%python_clone -a %{buildroot}%{_bindir}/blockdiag
|
2016-12-06 12:05:45 +00:00
|
|
|
|
|
|
|
%post
|
2017-04-20 15:16:51 +00:00
|
|
|
%python_install_alternative blockdiag
|
|
|
|
|
|
|
|
%preun
|
|
|
|
%python_uninstall_alternative blockdiag
|
2016-12-06 12:05:45 +00:00
|
|
|
|
2017-04-20 15:16:51 +00:00
|
|
|
%if %{with tests}
|
|
|
|
%check
|
|
|
|
%python_exec setup.py test
|
|
|
|
%endif
|
2016-05-17 13:13:39 +00:00
|
|
|
|
2017-04-20 15:16:51 +00:00
|
|
|
%files %{python_files}
|
2016-05-17 13:13:39 +00:00
|
|
|
%defattr(-,root,root,-)
|
|
|
|
%doc CHANGES.rst LICENSE README.rst
|
2017-04-20 15:16:51 +00:00
|
|
|
%python_alternative %{_bindir}/blockdiag
|
2016-05-17 13:13:39 +00:00
|
|
|
%{python_sitelib}/*
|
|
|
|
|
|
|
|
%changelog
|