[packages/python3-graphviz] - up to 0.20.3

baggins baggins at pld-linux.org
Tue Apr 8 02:06:46 CEST 2025


commit 72d06b65602aa236c2f39bc4f88fc47d989f5501
Author: Jan Rękorajski <baggins at pld-linux.org>
Date:   Tue Apr 8 01:13:08 2025 +0200

    - up to 0.20.3

 python-graphviz.spec => python3-graphviz.spec | 87 +++------------------------
 1 file changed, 8 insertions(+), 79 deletions(-)
---
diff --git a/python-graphviz.spec b/python3-graphviz.spec
similarity index 53%
rename from python-graphviz.spec
rename to python3-graphviz.spec
index 5574c68..e474dfa 100644
--- a/python-graphviz.spec
+++ b/python3-graphviz.spec
@@ -2,37 +2,22 @@
 # Conditional build:
 %bcond_without	doc	# Sphinx documentation
 %bcond_without	tests	# unit tests
-%bcond_without	python2 # CPython 2.x module
-%bcond_without	python3 # CPython 3.x module
 
 Summary:	Simple Python interface for Graphviz
 Summary(pl.UTF-8):	Prosty pythonowy interfejs do Graphviza
 Name:		python-graphviz
-# keep 0.16.x here for python2 support
-Version:	0.16
-Release:	5
+Version:	0.20.3
+Release:	1
 Epoch:		1
 License:	MIT
 Group:		Libraries/Python
 #Source0Download: https://pypi.org/simple/graphviz/
 Source0:	https://files.pythonhosted.org/packages/source/g/graphviz/graphviz-%{version}.zip
-# Source0-md5:	76a73ed4821bcd993519490ec46d2061
-Patch0:		%{name}-mock.patch
+# Source0-md5:	b7c6caf06c0badc770b187645519ea28
 URL:		https://github.com/xflr6/graphviz
 BuildRequires:	rpm-pythonprov
 BuildRequires:	rpmbuild(macros) >= 1.714
 BuildRequires:	sed >= 4.0
-%if %{with python2}
-BuildRequires:	python-modules >= 1:2.7
-BuildRequires:	python-setuptools
-%if %{with tests}
-BuildRequires:	python-mock >= 2
-BuildRequires:	python-pytest >= 4
-BuildRequires:	python-pytest-cov
-BuildRequires:	python-pytest-mock >= 1.8
-%endif
-%endif
-%if %{with python3}
 BuildRequires:	python3-modules >= 1:3.4
 BuildRequires:	python3-setuptools
 %if %{with tests}
@@ -40,11 +25,11 @@ BuildRequires:	python3-pytest >= 4
 BuildRequires:	python3-pytest-cov
 BuildRequires:	python3-pytest-mock >= 1.8
 %endif
-%endif
 %if %{with tests}
 BuildRequires:	graphviz
 %endif
-%if %{with apidocs}
+%if %{with doc}
+BuildRequires:	python3-sphinx_autodoc_typehints
 BuildRequires:	python3-sphinx_rtd_theme
 BuildRequires:	sphinx-pdg-3 >= 1.7
 %endif
@@ -62,22 +47,6 @@ software from Python.
 Ten pakiet wspomaga tworzenie i renderowanie opisów grafów w języku
 DOT oprogramowania do rysowania grafów Graphviz z poziomu Pythona.
 
-%package -n python3-graphviz
-Summary:	Simple Python interface for Graphviz
-Summary(pl.UTF-8):	Prosty pythonowy interfejs do Graphviza
-Group:		Libraries/Python
-Requires:	graphviz
-Requires:	python3-modules >= 1:3.4
-
-%description -n python3-graphviz
-This package facilitates the creation and rendering of graph
-descriptions in the DOT language of the Graphviz graph drawing
-software from Python.
-
-%description -n python3-graphviz -l pl.UTF-8
-Ten pakiet wspomaga tworzenie i renderowanie opisów grafów w języku
-DOT oprogramowania do rysowania grafów Graphviz z poziomu Pythona.
-
 %package apidocs
 Summary:	API documentation for Python graphviz module
 Summary(pl.UTF-8):	Dokumentacja API modułu Pythona graphviz
@@ -91,78 +60,38 @@ Dokumentacja API modułu Pythona graphviz.
 
 %prep
 %setup -q -n graphviz-%{version}
-%patch0 -p1
 
 %build
-%if %{with python2}
-%py_build
-
-%if %{with tests}
-PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
-PYTEST_PLUGINS="pytest_cov.plugin,pytest_mock" \
-%{__python} -m pytest tests
-%endif
-%endif
-
-%if %{with python3}
 %py3_build
 
 %if %{with tests}
 PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
 PYTEST_PLUGINS="pytest_cov.plugin,pytest_mock" \
-%{__python3} -m pytest tests
-%endif
+%{__python3} -m pytest tests/backend
 %endif
 
 %if %{with doc}
-cd docs
-sphinx-build-3 -b html . _build/html
+sphinx-build-3 -b html docs docs/_build/html
 %endif
 
 %install
 rm -rf $RPM_BUILD_ROOT
 
-%if %{with python2}
-%py_install
-
-%py_postclean
-%endif
-
-%if %{with python3}
 %py3_install
-%endif
 
-%if %{with python2}
-install -d $RPM_BUILD_ROOT%{_examplesdir}/python-graphviz-%{version}
-cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/python-graphviz-%{version}
-%{__sed} -i -e '1s,/usr/bin/env python,%{__python},' $RPM_BUILD_ROOT%{_examplesdir}/python-graphviz-%{version}/*.py
-%endif
-%if %{with python3}
 install -d $RPM_BUILD_ROOT%{_examplesdir}/python3-graphviz-%{version}
 cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/python3-graphviz-%{version}
 %{__sed} -i -e '1s,/usr/bin/env python,%{__python3},' $RPM_BUILD_ROOT%{_examplesdir}/python3-graphviz-%{version}/*.py
-%endif
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
-%if %{with python2}
 %files
 %defattr(644,root,root,755)
-%doc CHANGES.txt LICENSE.txt README.rst
-%{py_sitescriptdir}/graphviz
-%{py_sitescriptdir}/graphviz-%{version}-py*.egg-info
-%{_examplesdir}/python-graphviz-%{version}
-%endif
-
-%if %{with python3}
-%files -n python3-graphviz
-%defattr(644,root,root,755)
-%doc CHANGES.txt LICENSE.txt README.rst
+%doc CHANGES.rst LICENSE.txt README.rst
 %{py3_sitescriptdir}/graphviz
 %{py3_sitescriptdir}/graphviz-%{version}-py*.egg-info
 %{_examplesdir}/python3-graphviz-%{version}
-%endif
 
 %if %{with doc}
 %files apidocs
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/python3-graphviz.git/commitdiff/72d06b65602aa236c2f39bc4f88fc47d989f5501



More information about the pld-cvs-commit mailing list