2016-05-17 13:13:39 +00:00
|
|
|
#
|
|
|
|
# spec file for package python-blockdiag
|
|
|
|
#
|
2021-08-31 17:54:10 +00:00
|
|
|
# Copyright (c) 2021 SUSE LLC
|
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
|
|
|
|
2018-12-04 17:10:32 +00:00
|
|
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
2020-02-24 02:13:35 +00:00
|
|
|
%define skip_python2 1
|
2016-05-17 13:13:39 +00:00
|
|
|
Name: python-blockdiag
|
2020-02-24 02:13:35 +00:00
|
|
|
Version: 2.0.1
|
2016-05-17 13:13:39 +00:00
|
|
|
Release: 0
|
2018-12-05 08:20:15 +00:00
|
|
|
Summary: Program to generate block-diagram images from text
|
2016-05-17 13:13:39 +00:00
|
|
|
License: Apache-2.0
|
|
|
|
Group: Development/Languages/Python
|
2018-12-04 17:10:32 +00:00
|
|
|
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
|
2021-12-09 00:52:59 +00:00
|
|
|
# PATCH-FIX-UPSTREAM denose.patch gh#blockdiag/blockdiag#131 pgajdos@suse.com
|
|
|
|
# Remove the last silly dependency on nose
|
2021-09-01 08:57:37 +00:00
|
|
|
Patch0: python-blockdiag-nose-to-pytest.patch
|
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
|
2018-12-04 17:10:32 +00:00
|
|
|
Requires: python-Pillow >= 2.2.1
|
|
|
|
Requires: python-funcparserlib >= 0.3.6
|
|
|
|
Requires: python-webcolors
|
|
|
|
Requires(post): update-alternatives
|
2021-08-31 17:54:10 +00:00
|
|
|
Requires(preun):update-alternatives
|
2018-12-04 17:10:32 +00:00
|
|
|
BuildArch: noarch
|
2021-08-31 17:54:10 +00:00
|
|
|
# SECTION test requirements
|
2017-04-20 15:16:51 +00:00
|
|
|
BuildRequires: %{python_module docutils}
|
|
|
|
BuildRequires: %{python_module pep8 >= 1.3}
|
|
|
|
BuildRequires: %{python_module pip >= 1.4.1}
|
2021-08-31 17:54:10 +00:00
|
|
|
BuildRequires: %{python_module pytest}
|
|
|
|
# /SECTION
|
2021-12-09 00:52:59 +00:00
|
|
|
%if 0%{?suse_version} || 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
|
|
|
%python_subpackages
|
2016-05-17 13:13:39 +00:00
|
|
|
|
|
|
|
%description
|
2018-12-05 08:20:15 +00:00
|
|
|
The blockdiag package generates block-diagram image files
|
2021-09-01 08:57:37 +00:00
|
|
|
from spec-text files.
|
2016-05-17 13:13:39 +00:00
|
|
|
|
|
|
|
%prep
|
2021-12-09 00:52:59 +00:00
|
|
|
%autosetup -p1 -n blockdiag-%{version}
|
2016-05-17 13:13:39 +00:00
|
|
|
|
|
|
|
%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
|
|
|
|
|
2021-12-09 00:52:59 +00:00
|
|
|
%postun
|
2017-04-20 15:16:51 +00:00
|
|
|
%python_uninstall_alternative blockdiag
|
2016-12-06 12:05:45 +00:00
|
|
|
|
2017-04-20 15:16:51 +00:00
|
|
|
%check
|
2021-08-31 17:54:10 +00:00
|
|
|
pushd src
|
|
|
|
# other disabled tests:
|
|
|
|
# [ 9s] WARNING: Could not retrieve: http://blockdiag.com/favicon.ico
|
|
|
|
# [ 9s] WARNING: Could not retrieve: http://upload.wikimedia.org/wikipedia/commons/9/9b/Scalable_Vector_Graphics_Circle2.svg
|
|
|
|
# [ 9s] WARNING: Could not retrieve: http://people.sc.fsu.edu/~jburkardt/data/eps/circle.eps
|
|
|
|
%pytest -k 'not (test_app_cleans_up_images or test_node_attribute or test_setup_inline_svg_is_true_with_multibytes)'
|
|
|
|
popd
|
2016-05-17 13:13:39 +00:00
|
|
|
|
2017-04-20 15:16:51 +00:00
|
|
|
%files %{python_files}
|
2018-12-04 17:10:32 +00:00
|
|
|
%license LICENSE
|
|
|
|
%doc CHANGES.rst README.rst
|
2017-04-20 15:16:51 +00:00
|
|
|
%python_alternative %{_bindir}/blockdiag
|
2021-12-09 00:52:59 +00:00
|
|
|
%{python_sitelib}/blockdiag*
|
|
|
|
%pycache_only %{python_sitelib}/__pycache__/blockdiag*
|
2016-05-17 13:13:39 +00:00
|
|
|
|
|
|
|
%changelog
|