From df3d7808042b7a401fef7af29b62fafdb30a486f7112cabdfbb695085457595c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20V=C3=B6gl?= Date: Mon, 16 Mar 2020 09:54:57 +0000 Subject: [PATCH] Accepting request 784223 from home:scarabeus_iv:branches:graphics - Add python2/python3 split subpkgs in order to allow building without python2 available OBS-URL: https://build.opensuse.org/request/show/784223 OBS-URL: https://build.opensuse.org/package/show/graphics/graphviz?expand=0&rev=148 --- graphviz-addons.changes | 6 ++++++ graphviz-addons.spec | 35 ++++++++++++++++++++++++++--------- graphviz.spec | 4 ++-- 3 files changed, 34 insertions(+), 11 deletions(-) diff --git a/graphviz-addons.changes b/graphviz-addons.changes index 172edc6..0108847 100644 --- a/graphviz-addons.changes +++ b/graphviz-addons.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Thu Mar 12 09:07:17 UTC 2020 - Tomáš Chvátal + +- Add python2/python3 split subpkgs in order to allow building + without python2 available + ------------------------------------------------------------------- Mon Jan 13 11:59:55 UTC 2020 - Christian Vögl diff --git a/graphviz-addons.spec b/graphviz-addons.spec index 31d5d8b..65b6a02 100644 --- a/graphviz-addons.spec +++ b/graphviz-addons.spec @@ -1,7 +1,7 @@ # # spec file for package graphviz-addons # -# Copyright (c) 2020 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2020 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -43,13 +43,14 @@ %else %define sle12 0 %endif +%bcond_without python2 Name: graphviz-addons Version: 2.42.3 Release: 0 Summary: Graph Visualization Tools License: EPL-1.0 Group: Productivity/Graphics/Visualization/Graph -Url: http://www.graphviz.org/ +URL: http://www.graphviz.org/ Source: https://www2.graphviz.org/Packages/stable/portable_source/graphviz-%{version}.tar.gz Source2: graphviz-rpmlintrc #PATCH-FIX-UPSTREAM add flags to also link against libGLU and libGL @@ -87,7 +88,6 @@ BuildRequires: freeglut-devel BuildRequires: libjpeg-devel BuildRequires: libpng-devel BuildRequires: perl -BuildRequires: python3-devel %if 0%{?suse_version} >= 1500 BuildRequires: php7-devel BuildRequires: swig >= 3.0.11 @@ -112,7 +112,10 @@ BuildRequires: pkgconfig(libglade-2.0) BuildRequires: pkgconfig(librsvg-2.0) BuildRequires: pkgconfig(lua) BuildRequires: pkgconfig(pango) +%if %{with python2} BuildRequires: pkgconfig(python) +%endif +BuildRequires: pkgconfig(python3) BuildRequires: pkgconfig(sm) BuildRequires: pkgconfig(tcl) BuildRequires: pkgconfig(x11) @@ -236,14 +239,24 @@ Requires: php%{php_version} The graphviz-php package contains the PHP extension for the graphviz tools. -%package -n graphviz-python +%package -n python2-graphviz Summary: Python Extension for Graphviz Group: Productivity/Graphics/Visualization/Graph Requires: graphviz = %{version} -Requires: python -%description -n graphviz-python -The graphviz-python package contains the Python extension for the +%description -n python2-graphviz +The package contains the Python extension for the +graphviz tools. + +%package -n python3-graphviz +Summary: Python 3 Extension for Graphviz +Group: Productivity/Graphics/Visualization/Graph +Requires: graphviz = %{version} +Provides: graphviz-python +Obsoletes: graphviz-python + +%description -n python3-graphviz +The package contains the Python extension for the graphviz tools. %package -n graphviz-ruby @@ -558,14 +571,18 @@ fi %{_datadir}/php%{php_version}/gv.php %{_mandir}/man3/gv.3php%{ext_man} -%files -n graphviz-python +%if %{with python2} +%files -n python2-graphviz %dir %{_libdir}/graphviz/python2 -%dir %{_libdir}/graphviz/python3 %{python_sitearch}/_gv.so %{python_sitearch}/gv.py %{_libdir}/graphviz/python2/_gv.so %{_libdir}/graphviz/python2/gv.py %{_libdir}/graphviz/python2/libgv_python2.so +%endif + +%files -n python3-graphviz +%dir %{_libdir}/graphviz/python3 %{python3_sitearch}/_gv.so %{python3_sitearch}/gv.py %{_libdir}/graphviz/python3/_gv.so diff --git a/graphviz.spec b/graphviz.spec index 3a820cb..2300d62 100644 --- a/graphviz.spec +++ b/graphviz.spec @@ -1,7 +1,7 @@ # # spec file for package graphviz # -# Copyright (c) 2020 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2020 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -49,7 +49,7 @@ Release: 0 Summary: Graph Visualization Tools License: EPL-1.0 Group: Productivity/Graphics/Visualization/Graph -Url: http://www.graphviz.org/ +URL: http://www.graphviz.org/ Source: https://www2.graphviz.org/Packages/stable/portable_source/graphviz-%{version}.tar.gz Source2: graphviz-rpmlintrc #PATCH-FIX-UPSTREAM add flags to also link against libGLU and libGL