2011-03-28 13:34:41 +00:00
|
|
|
#
|
|
|
|
# spec file for package python-pygraphviz
|
|
|
|
#
|
2023-02-17 22:02:58 +00:00
|
|
|
# Copyright (c) 2023 SUSE LLC
|
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
|
|
|
|
2019-05-14 15:44:58 +00:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2011-03-28 13:34:41 +00:00
|
|
|
#
|
|
|
|
|
2014-03-28 14:43:09 +00:00
|
|
|
|
2023-02-17 22:02:58 +00:00
|
|
|
%{?!python_module:%define python_module() python3-%{**}}
|
2020-09-28 11:17:08 +00:00
|
|
|
%global skip_python2 1
|
2022-08-18 14:31:16 +00:00
|
|
|
%bcond_without tests
|
2013-12-09 13:36:27 +00:00
|
|
|
Name: python-pygraphviz
|
2023-02-17 22:02:58 +00:00
|
|
|
Version: 1.10
|
2011-03-28 13:34:41 +00:00
|
|
|
Release: 0
|
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
|
2022-08-18 14:31:16 +00:00
|
|
|
URL: https://pygraphviz.github.io/
|
2019-05-14 15:44:58 +00:00
|
|
|
Source: https://files.pythonhosted.org/packages/source/p/pygraphviz/pygraphviz-%{version}.zip
|
2011-03-28 13:34:41 +00:00
|
|
|
# PATCH-FIX-UPSTREAM docdir.patch
|
2021-10-19 22:20:39 +00:00
|
|
|
Patch0: docdir.patch
|
2023-02-17 22:02:58 +00:00
|
|
|
BuildRequires: %{python_module devel >= 3.8}
|
2022-08-18 14:31:16 +00:00
|
|
|
# Needed even without tests
|
|
|
|
BuildRequires: %{python_module pytest}
|
2019-05-14 15:44:58 +00:00
|
|
|
BuildRequires: %{python_module setuptools}
|
|
|
|
BuildRequires: fdupes
|
2021-10-19 22:20:39 +00:00
|
|
|
BuildRequires: graphviz-devel >= 2.42
|
|
|
|
BuildRequires: libpng-devel
|
2017-05-24 11:28:15 +00:00
|
|
|
BuildRequires: python-rpm-macros
|
2019-05-14 15:44:58 +00:00
|
|
|
BuildRequires: swig
|
|
|
|
BuildRequires: unzip
|
2021-10-19 22:20:39 +00:00
|
|
|
Requires: graphviz >= 2.42
|
2023-02-17 22:02:58 +00:00
|
|
|
%if 0%{?suse_version} >= 1550
|
|
|
|
BuildRequires: pkgconf-pkg-config
|
|
|
|
%endif
|
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
|
2021-10-19 22:20:39 +00:00
|
|
|
%autosetup -p1 -n pygraphviz-%{version}
|
2009-11-10 01:32:14 +00:00
|
|
|
|
|
|
|
%build
|
2021-10-19 22:20:39 +00:00
|
|
|
export CFLAGS="%{optflags}"
|
|
|
|
%python_build
|
2009-11-10 01:32:14 +00:00
|
|
|
|
|
|
|
%install
|
2017-05-24 11:28:15 +00:00
|
|
|
export CFLAGS="%{optflags}"
|
2021-10-19 22:20:39 +00:00
|
|
|
%python_install
|
|
|
|
%fdupes %{buildroot}%{$python_sitearch}
|
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
|
2021-10-19 22:30:22 +00:00
|
|
|
# export PYTEST_ADDOPTS="--doctest-modules --durations=10 --import-mode=importlib"
|
2021-10-19 22:20:39 +00:00
|
|
|
export PYTEST_ADDOPTS="--import-mode=importlib"
|
2021-10-19 22:30:22 +00:00
|
|
|
# skip tests because of gh#pygraphviz/pygraphviz#366
|
2021-10-19 22:20:39 +00:00
|
|
|
%pytest_arch -k 'not (test_drawing_makes_file or test_drawing_makes_file1 or test_drawing_makes_file)'
|
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}
|
2020-09-28 11:17:08 +00:00
|
|
|
%license LICENSE
|
|
|
|
%doc 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
|
2020-09-28 11:17:08 +00:00
|
|
|
%license LICENSE
|
2017-05-24 11:28:15 +00:00
|
|
|
%{_docdir}/pygraphviz-%{version}
|
|
|
|
|
2011-03-28 13:34:41 +00:00
|
|
|
%changelog
|