commit a53262b11e5dfd0419611093a8b42dde5996278e4da32c3c32ce9c116c4b5dad Author: Stephan Barth Date: Mon Apr 24 13:41:20 2017 +0000 Accepting request 488932 from home:DocB:branches:devel:languages:python3 Singelspec adaption for pydot3 (py2 build disabled) OBS-URL: https://build.opensuse.org/request/show/488932 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pydot3?expand=0&rev=1 diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/example-demo.py b/example-demo.py new file mode 100644 index 0000000..64a1ca4 --- /dev/null +++ b/example-demo.py @@ -0,0 +1,7 @@ +#! /usr/bin/python +import pydot + +edges=[("Hello",2), ("Hello",3), ("Hello",4), (3,4)] +g=pydot.graph_from_edges(edges, directed=True) +g.write_jpeg('graph_from_edges_dot.jpg', prog='dot') +g.write_svg( 'graph_from_edges_dot.svg', prog='dot') diff --git a/example-rank.py b/example-rank.py new file mode 100644 index 0000000..36b8fd2 --- /dev/null +++ b/example-rank.py @@ -0,0 +1,7 @@ + +graph = pydot.Dot('graphname', graph_type='digraph') +subg = pydot.Subgraph('', rank='same') +subg.add_node(pydot.Node('a')) +graph.add_subgraph(subg) +subg.add_node(pydot.Node('b')) +subg.add_node(pydot.Node('c')) diff --git a/pydot3-1.0.9.tar.gz b/pydot3-1.0.9.tar.gz new file mode 100644 index 0000000..c713a87 --- /dev/null +++ b/pydot3-1.0.9.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:413b52b970366bf8b38add553c3b7077a31751d7cd8ab5db00de6f1e9ec6b5a5 +size 19928 diff --git a/python-pydot3.changes b/python-pydot3.changes new file mode 100644 index 0000000..f2577d0 --- /dev/null +++ b/python-pydot3.changes @@ -0,0 +1,11 @@ +------------------------------------------------------------------- +Mon Apr 17 13:07:59 UTC 2017 - axel.braun@gmx.de + +- Version 1.0.9 + adaption for singlespec + +------------------------------------------------------------------- +Mon Jun 13 19:30:56 UTC 2016 - axel.braun@gmx.de + +- Initial OBS build for pydot3 + Version 1.0.8 diff --git a/python-pydot3.spec b/python-pydot3.spec new file mode 100644 index 0000000..4c825be --- /dev/null +++ b/python-pydot3.spec @@ -0,0 +1,61 @@ +# +# spec file for package python3-pydot3 +# +# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2017 Dr. Axel Braun +# +# 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. + +# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# + +%{?!python_module:%define python_module() python-%{**} python3-%{**}} + +%define modname pydot3 +Name: python-%{modname} +Version: 1.0.9 +Release: 0 +Summary: Create (dot) graphs from python +License: MIT +Group: Development/Libraries/Python +Url: https://pypi.python.org/pypi/pydot3 +Source: https://pypi.python.org/pypi/%{modname}-%{version}.tar.gz +Source1: example-demo.py +Source2: example-rank.py +BuildRequires: python-rpm-macros +BuildRequires: %{python_module setuptools} +Requires: graphviz +Requires: python-pyparsing +BuildArch: noarch +%python_subpackages +%undefine have_python2 + +%description +pydot allows to easily create both directed and non directed graphs from Python. +Currently all attributes implemented in the Dot language are supported (up to Graphviz 2.16). + +%prep +%setup -q -n %{modname}-%{version} + +mkdir examples && cp %{SOURCE1} %{SOURCE2} examples + +%build +%python_build + +%install +%python_install +rm -rf %{buildroot}%{_prefix}/{LICENSE,README,README.md} # Wronly installed by setup script + +%files %{python_files} +%defattr(-,root,root,-) +%doc LICENSE examples README.md +%{python_sitelib}/* + +%changelog