2011-03-28 13:34:41 +00:00
|
|
|
#
|
|
|
|
# spec file for package python-pygraphviz
|
|
|
|
#
|
2017-05-24 11:28:15 +00:00
|
|
|
# Copyright (c) 2017 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
2011-03-28 13:34:41 +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.
|
2014-03-28 14:43:09 +00:00
|
|
|
|
2011-03-28 13:34:41 +00:00
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
|
|
#
|
|
|
|
|
2014-03-28 14:43:09 +00:00
|
|
|
|
2017-05-24 11:28:15 +00:00
|
|
|
%bcond_without tests
|
|
|
|
|
|
|
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
2013-12-09 13:36:27 +00:00
|
|
|
Name: python-pygraphviz
|
2017-05-24 11:28:15 +00:00
|
|
|
Version: 1.4rc1
|
2011-03-28 13:34:41 +00:00
|
|
|
Release: 0
|
|
|
|
Url: http://networkx.lanl.gov/pygraphviz
|
2009-11-10 01:32:14 +00:00
|
|
|
Summary: Python interface to Graphviz
|
2014-03-28 14:43:09 +00:00
|
|
|
License: BSD-3-Clause
|
2011-03-28 13:34:41 +00:00
|
|
|
Group: Development/Languages/Python
|
2017-05-24 11:28:15 +00:00
|
|
|
Source: https://files.pythonhosted.org/packages/source/p/pygraphviz/pygraphviz-%{version}.tar.gz
|
2011-03-28 13:34:41 +00:00
|
|
|
# PATCH-FIX-UPSTREAM docdir.patch
|
|
|
|
Patch: docdir.patch
|
2009-11-10 01:32:14 +00:00
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
2016-06-15 17:28:47 +00:00
|
|
|
BuildRequires: graphviz-devel >= 2.16
|
2011-03-28 13:34:41 +00:00
|
|
|
BuildRequires: pkg-config
|
2017-05-24 11:28:15 +00:00
|
|
|
BuildRequires: swig
|
|
|
|
BuildRequires: fdupes
|
|
|
|
BuildRequires: python-rpm-macros
|
|
|
|
BuildRequires: %{python_module devel}
|
|
|
|
BuildRequires: %{python_module setuptools}
|
|
|
|
# Needed even without tests
|
|
|
|
BuildRequires: %{python_module nose}
|
2016-06-15 17:28:47 +00:00
|
|
|
Requires: graphviz >= 2.16
|
2017-05-24 11:28:15 +00:00
|
|
|
%python_subpackages
|
2009-11-10 01:32:14 +00:00
|
|
|
|
|
|
|
%description
|
|
|
|
A Python wrapper for the Graphviz Agraph data structure.
|
2011-03-28 13:34:41 +00:00
|
|
|
PyGraphviz can be used to create and draw networks and graphs with Graphviz.
|
2009-11-10 01:32:14 +00:00
|
|
|
|
2017-05-24 11:28:15 +00:00
|
|
|
%package -n %{name}-doc
|
|
|
|
Summary: Documentation for %{name}
|
|
|
|
Group: Documentation/Other
|
|
|
|
Provides: %{python_module pygraphviz-doc = %{version}}
|
|
|
|
|
|
|
|
%description -n %{name}-doc
|
|
|
|
This package provides documentation and help files for %{name}
|
|
|
|
|
2009-11-10 01:32:14 +00:00
|
|
|
%prep
|
2013-12-09 13:36:27 +00:00
|
|
|
%setup -q -n pygraphviz-%{version}
|
2009-11-10 01:32:14 +00:00
|
|
|
%patch
|
|
|
|
|
|
|
|
%build
|
2017-05-24 11:28:15 +00:00
|
|
|
# Need command-line flags only available in install
|
2009-11-10 01:32:14 +00:00
|
|
|
|
|
|
|
%install
|
2017-05-24 11:28:15 +00:00
|
|
|
export CFLAGS="%{optflags}"
|
|
|
|
%python_exec setup.py install -O1 --force --root %{buildroot} --prefix %{_prefix} --include-path %{_includedir}/graphviz/ --library-path %{_libdir}/graphviz/
|
|
|
|
%python_expand %fdupes %{buildroot}%{$python_sitearch}
|
|
|
|
%python_expand chmod +x %{buildroot}%{$python_sitearch}/pygraphviz/tests/test.py
|
2011-03-28 13:34:41 +00:00
|
|
|
|
2017-05-24 11:28:15 +00:00
|
|
|
%if %{with tests}
|
2016-06-15 17:28:47 +00:00
|
|
|
%check
|
|
|
|
pushd examples
|
2017-05-24 11:28:15 +00:00
|
|
|
%{python_expand export PYTHONPATH=%{buildroot}%{$python_sitearch}
|
|
|
|
$python -c "import pygraphviz;pygraphviz.test()"
|
|
|
|
}
|
2016-06-15 17:28:47 +00:00
|
|
|
popd
|
2017-05-24 11:28:15 +00:00
|
|
|
%endif
|
2009-11-10 01:32:14 +00:00
|
|
|
|
2017-05-24 11:28:15 +00:00
|
|
|
%files %{python_files}
|
2011-03-28 13:34:41 +00:00
|
|
|
%defattr(-,root,root,-)
|
2016-06-15 17:28:47 +00:00
|
|
|
%doc LICENSE README.rst
|
2013-12-09 13:36:27 +00:00
|
|
|
%{python_sitearch}/pygraphviz/
|
|
|
|
%{python_sitearch}/pygraphviz-%{version}-py*.egg-info
|
2009-11-10 01:32:14 +00:00
|
|
|
|
2017-05-24 11:28:15 +00:00
|
|
|
%files -n %{name}-doc
|
|
|
|
%defattr(-,root,root,-)
|
|
|
|
%doc LICENSE
|
|
|
|
%{_docdir}/pygraphviz-%{version}
|
|
|
|
|
2011-03-28 13:34:41 +00:00
|
|
|
%changelog
|