forked from pool/python-pygraphviz
- Update to 1.7:
- Drop Python 3.6 support - Add Python 3.9 support - Require Graphviz 2.42+, (Graphviz 2.46+ recommended) - Improve installation process and documentation - Switch from nose to pytest - Remove old Python 2 code - AGraph.eq includes attribute comparison (PR #246) OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pygraphviz?expand=0&rev=18
This commit is contained in:
20
docdir.patch
20
docdir.patch
@@ -1,13 +1,15 @@
|
|||||||
Index: setup.py
|
---
|
||||||
===================================================================
|
setup.py | 2 +-
|
||||||
--- setup.py.orig
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
+++ setup.py
|
|
||||||
@@ -36,7 +36,7 @@
|
--- a/setup.py
|
||||||
sys.path.pop(0)
|
+++ b/setup.py
|
||||||
|
@@ -54,7 +54,7 @@ with open("pygraphviz/__init__.py") as f
|
||||||
|
break
|
||||||
|
|
||||||
packages = ["pygraphviz", "pygraphviz.tests"]
|
packages = ["pygraphviz", "pygraphviz.tests"]
|
||||||
-docdirbase = 'share/doc/pygraphviz-%s' % release.version
|
-docdirbase = f"share/doc/pygraphviz-{version}"
|
||||||
+docdirbase = 'share/doc/packages/pygraphviz-%s' % release.version
|
+docdirbase = f"share/doc/packages/pygraphviz-{version}"
|
||||||
data = [
|
data = [
|
||||||
(docdirbase, glob("*.txt")),
|
(docdirbase, glob("*.txt")),
|
||||||
(os.path.join(docdirbase, 'examples'), glob("examples/*.py")),
|
(os.path.join(docdirbase, "examples"), glob("examples/*.py")),
|
||||||
|
@@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:411ae84a5bc313e3e1523a1cace59159f512336318a510573b47f824edef8860
|
|
||||||
size 117043
|
|
3
pygraphviz-1.7.zip
Normal file
3
pygraphviz-1.7.zip
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:a7bec6609f37cf1e64898c59f075afd659106cf9356c5f387cecaa2e0cdb2304
|
||||||
|
size 118754
|
@@ -1,3 +1,15 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Oct 19 19:58:44 UTC 2021 - Matej Cepl <mcepl@suse.com>
|
||||||
|
|
||||||
|
- Update to 1.7:
|
||||||
|
- Drop Python 3.6 support
|
||||||
|
- Add Python 3.9 support
|
||||||
|
- Require Graphviz 2.42+, (Graphviz 2.46+ recommended)
|
||||||
|
- Improve installation process and documentation
|
||||||
|
- Switch from nose to pytest
|
||||||
|
- Remove old Python 2 code
|
||||||
|
- AGraph.eq includes attribute comparison (PR #246)
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Mon Sep 28 11:16:38 UTC 2020 - Dirk Mueller <dmueller@suse.com>
|
Mon Sep 28 11:16:38 UTC 2020 - Dirk Mueller <dmueller@suse.com>
|
||||||
|
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package python-pygraphviz
|
# spec file for package python-pygraphviz
|
||||||
#
|
#
|
||||||
# Copyright (c) 2020 SUSE LLC
|
# Copyright (c) 2021 SUSE LLC
|
||||||
#
|
#
|
||||||
# All modifications and additions to the file contributed by third parties
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
@@ -20,29 +20,30 @@
|
|||||||
|
|
||||||
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
||||||
%global skip_python2 1
|
%global skip_python2 1
|
||||||
|
%global skip_python36 1
|
||||||
Name: python-pygraphviz
|
Name: python-pygraphviz
|
||||||
Version: 1.6
|
Version: 1.7
|
||||||
Release: 0
|
Release: 0
|
||||||
URL: http://networkx.lanl.gov/pygraphviz
|
URL: https://pygraphviz.github.io/
|
||||||
Summary: Python interface to Graphviz
|
Summary: Python interface to Graphviz
|
||||||
License: BSD-3-Clause
|
License: BSD-3-Clause
|
||||||
Group: Development/Languages/Python
|
Group: Development/Languages/Python
|
||||||
Source: https://files.pythonhosted.org/packages/source/p/pygraphviz/pygraphviz-%{version}.zip
|
Source: https://files.pythonhosted.org/packages/source/p/pygraphviz/pygraphviz-%{version}.zip
|
||||||
# PATCH-FIX-UPSTREAM docdir.patch
|
# PATCH-FIX-UPSTREAM docdir.patch
|
||||||
Patch: docdir.patch
|
Patch0: docdir.patch
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
BuildRequires: %{python_module devel}
|
BuildRequires: %{python_module devel}
|
||||||
BuildRequires: %{python_module setuptools}
|
BuildRequires: %{python_module setuptools}
|
||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
BuildRequires: graphviz-devel >= 2.16
|
BuildRequires: graphviz-devel >= 2.42
|
||||||
BuildRequires: pkg-config
|
BuildRequires: libpng-devel
|
||||||
|
BuildRequires: pkgconf-pkg-config
|
||||||
BuildRequires: python-rpm-macros
|
BuildRequires: python-rpm-macros
|
||||||
BuildRequires: swig
|
BuildRequires: swig
|
||||||
BuildRequires: unzip
|
BuildRequires: unzip
|
||||||
# Needed even without tests
|
# Needed even without tests
|
||||||
BuildRequires: %{python_module mock >= 2.0.0}
|
BuildRequires: %{python_module pytest}
|
||||||
BuildRequires: %{python_module nose >= 1.3.7}
|
Requires: graphviz >= 2.42
|
||||||
Requires: graphviz >= 2.16
|
|
||||||
%python_subpackages
|
%python_subpackages
|
||||||
|
|
||||||
%description
|
%description
|
||||||
@@ -58,34 +59,21 @@ Provides: %{python_module pygraphviz-doc = %{version}}
|
|||||||
This package provides documentation and help files for %{name}
|
This package provides documentation and help files for %{name}
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n pygraphviz-%{version}
|
%autosetup -p1 -n pygraphviz-%{version}
|
||||||
%patch
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
# Need command-line flags only available in install
|
export CFLAGS="%{optflags}"
|
||||||
|
%python_build
|
||||||
|
|
||||||
%install
|
%install
|
||||||
export CFLAGS="%{optflags}"
|
export CFLAGS="%{optflags}"
|
||||||
%python_exec setup.py install -O1 --force --root %{buildroot} --prefix %{_prefix} --include-path %{_includedir}/graphviz/ --library-path %{_libdir}/graphviz/
|
%python_install
|
||||||
|
%fdupes %{buildroot}%{$python_sitearch}
|
||||||
%{python_expand pushd %{buildroot}%{$python_sitearch}
|
|
||||||
# Fix wrong-script-interpreter
|
|
||||||
sed -i "s|#!/usr/bin/env python|#!%__$python|" pygraphviz/tests/test.py
|
|
||||||
chmod a+x pygraphviz/tests/test.py
|
|
||||||
# Deduplicating files can generate a RPMLINT warning for pyc mtime
|
|
||||||
$python -m compileall -d %{$python_sitearch} pygraphviz/tests/
|
|
||||||
$python -O -m compileall -d %{$python_sitearch} pygraphviz/tests/
|
|
||||||
%fdupes .
|
|
||||||
popd
|
|
||||||
}
|
|
||||||
|
|
||||||
%if %{with tests}
|
%if %{with tests}
|
||||||
%check
|
%check
|
||||||
pushd examples
|
export PYTEST_ADDOPTS="--import-mode=importlib"
|
||||||
%{python_expand export PYTHONPATH=%{buildroot}%{$python_sitearch}
|
%pytest_arch -k 'not (test_drawing_makes_file or test_drawing_makes_file1 or test_drawing_makes_file)'
|
||||||
$python -c "import pygraphviz;pygraphviz.test()"
|
|
||||||
}
|
|
||||||
popd
|
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%files %{python_files}
|
%files %{python_files}
|
||||||
|
Reference in New Issue
Block a user