File python-graphviz.spec of Package python-graphviz

# spec file for package python-graphviz
# Copyright (c) 2017 SUSE LINUX Products 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

%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%bcond_without tests
Name:           python-graphviz
Version:        0.6
Release:        2.1
License:        MIT
Summary:        Simple Python interface for Graphviz
Group:          Development/Languages/Python
BuildRequires:  fdupes
BuildRequires:  graphviz
BuildRequires:  python-rpm-macros
BuildRequires:  %{python_module devel}
BuildRequires:  %{python_module setuptools}
BuildRequires:  unzip
%if %{with tests}
# Test requirements
BuildRequires:  %{python_module coverage}
BuildRequires:  %{python_module nose}
BuildRequires:  python2-unittest2
BuildRequires:  xdg-utils
# For pdf rendered tests
BuildRequires:  w3m
BuildRequires:  graphviz-gnome
Requires:       graphviz
Recommends:     xdg-utils
BuildArch:      noarch

This package facilitates the creation and rendering of graph descriptions in
the DOT language of the Graphviz graph drawing software from Python.

Create a graph object, assemble the graph by adding nodes and edges, and
retrieve its DOT source code string. Save the source code to a file and render
it with the Graphviz installation of your system.

Use the view option/method to directly inspect the resulting (PDF, PNG,
SVG, etc.) file with its default application. Graphs can also be rendered
and displayed within IPython notebooks (example).

%setup -q -n graphviz-%{version}

# Fix wrong-file-end-of-line-encoding
sed -i 's/\r$//' CHANGES
sed -i 's/\r$//' LICENSE
sed -i 's/\r$//' README.rst
sed -i 's/\r$//' docs/*.rst


%python_expand %fdupes %{buildroot}%{$python_sitelib}

%if %{with tests}
%python_expand nosetests-%{$python_bin_suffix}

%files %{python_files}

* Fri Apr 14 2017
- Initial singlespec version