14
0
forked from pool/python-pydot

Accepting request 438173 from home:TheBlackCat:branches:devel:languages:python

Update to 1.2.3

OBS-URL: https://build.opensuse.org/request/show/438173
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pydot?expand=0&rev=7
This commit is contained in:
Todd R
2016-11-01 20:03:22 +00:00
committed by Git OBS Bridge
parent 1da8718100
commit 2eb1738b8f
7 changed files with 67 additions and 53 deletions

View File

@@ -1,7 +0,0 @@
#! /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')

View File

@@ -1,7 +0,0 @@
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'))

View File

@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:1eeaff7b104fb8f305a98318dafde0b2d15f1efcdf8b16206465551cd46ed9df
size 19711

3
pydot-1.2.3.tar.gz Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:edb5d3f249f97fbd9c4bb16959e61bc32ecf40eee1a9f6d27abe8d01c0a73502
size 20268

View File

@@ -1,14 +0,0 @@
diff --git a/dot_parser.py b/dot_parser.py
index dedd61a..138d152 100644
--- a/dot_parser.py
+++ b/dot_parser.py
@@ -25,8 +25,9 @@ from pyparsing import __version__ as pyparsing_version
from pyparsing import ( nestedExpr, Literal, CaselessLiteral, Word, Upcase, OneOrMore, ZeroOrMore,
Forward, NotAny, delimitedList, oneOf, Group, Optional, Combine, alphas, nums,
restOfLine, cStyleComment, nums, alphanums, printables, empty, quotedString,
- ParseException, ParseResults, CharsNotIn, _noncomma, dblQuotedString, QuotedString, ParserElement )
+ ParseException, ParseResults, CharsNotIn, dblQuotedString, QuotedString, ParserElement )
+_noncomma = "".join( [ c for c in printables if c != "," ] )
class P_AttrList:

View File

@@ -1,3 +1,55 @@
-------------------------------------------------------------------
Tue Nov 1 19:38:17 UTC 2016 - toddrme2178@gmail.com
- Update to 1.2.3
- support Python 2.6
- several corrections
- quote empty strings to avoid graphviz errors
- Update to 1.2.0
- support Python 3
- bumped dependency to `pyparsing >= 2.1.4`
- tests running on Travis CI
- tests require `chardet`
- detect character encoding for most test files
using the package `chardet`
- API:
+ on all operating systems, search GraphViz
executables in environment `$PATH`,
using `subprocess.Popen`.
No paths hard-coded due to security and privacy issues.
+ add option to pass GraphViz executable name
or absolute path as `prog` to `pydot.Dot.write_*` methods.
This provides an alternative to
adding GraphViz to the `$PATH`.
+ the functions:
* `pydot.graph_from_dot_data`
* `pydot.graph_from_dot_file`
* `dot_parser.parse_dot_data`
changed to always return a `list` of graphs,
instead of behaving differently for singletons.
+ require that the user explicitly give an encoding to
the function `pydot.graph_from_dot_file`,
with default encoding same as `io.open`.
+ decode to unicode at program boundaries, and
treat binary images as bytes,
for more compatibility with python 3.
Use `io.open`, instead of the built-in `open`.
+ rm function `pydot.set_graphviz_executables`
+ rm attribute `pydot.Dot.progs`
- Update to 1.1.0
- compatibility with `pyparsing >= 1.5.7`
- API:
+ `pydot.Graph.to_string`: hide `subgraph` keyword only if so requested
+ produce `warnings.warn` if `pydot.dot_parser` fails to import,
instead of `print`
- Update to 1.0.29
- Maintenance release that keeps the same API
- pin `pyparsing == 1.5.7`
- update version number in source code
- update `setup.py`
- Remove unneeded python-pydot-1.0.28_fix_pyparser_2_incompatibility.patch
- Remove out-of-date example files
------------------------------------------------------------------- -------------------------------------------------------------------
Sat May 3 14:00:00 UTC 2014 - andrea@opensuse.org Sat May 3 14:00:00 UTC 2014 - andrea@opensuse.org

View File

@@ -1,7 +1,7 @@
# #
# spec file for package python-pydot # spec file for package python-pydot
# #
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany. # Copyright (c) 2016 SUSE LINUX Products GmbH, Nuernberg, Germany.
# #
# 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
@@ -16,54 +16,44 @@
# #
%define modname pydot Name: python-pydot
Name: python-%{modname} Version: 1.2.3
Version: 1.0.28
Release: 0 Release: 0
Url: http://code.google.com/p/pydot Url: http://code.google.com/p/pydot
Summary: Create (dot) graphs from python Summary: Create (dot) graphs from python
License: MIT License: MIT
Group: Development/Libraries/Python Group: Development/Libraries/Python
Source: http://%{modname}.googlecode.com/files/%{modname}-%{version}.tar.gz Source: https://files.pythonhosted.org/packages/source/p/pydot/pydot-%{version}.tar.gz
Source1: example-demo.py
Source2: example-rank.py
Patch0: %{name}-1.0.28_fix_pyparser_2_incompatibility.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: python-devel BuildRequires: python-devel
Requires: python-pyparsing BuildRequires: python-pyparsing >= 2.1.4
BuildRequires: python-setuptools
Requires: graphviz Requires: graphviz
%if 0%{?suse_version} <= 1110 Requires: python-pyparsing >= 2.1.4
%{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
%else
BuildArch: noarch BuildArch: noarch
%py_requires
%endif
%description %description
pydot allows to easily create both directed and non directed graphs from Python. 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). Currently all attributes implemented in the Dot language are supported (up to Graphviz 2.16).
%prep %prep
%setup -q -n %{modname}-%{version} %setup -q -n pydot-%{version}
%patch0 -p1
mkdir examples && cp %{SOURCE1} %{SOURCE2} examples
%build %build
export CFLAGS="%{optflags}"
python setup.py build python setup.py build
%install %install
python setup.py install --prefix=%{_prefix} --root=%{buildroot} python setup.py install --prefix=%{_prefix} --root=%{buildroot}
rm -rf %{buildroot}/usr/{LICENSE,README} # Wronly installed by setup script # rm -rf %{buildroot}/usr/{LICENSE,README} # Wronly installed by setup script
%clean %clean
rm -rf %{buildroot} rm -rf %{buildroot}
%files %files
%defattr(-,root,root,-) %defattr(-,root,root,-)
%doc README LICENSE examples %doc README.md LICENSE
%{python_sitelib}/dot_parser.py* %{python_sitelib}/dot_parser.py*
%{python_sitelib}/%{modname}.py* %{python_sitelib}/pydot.py*
%{python_sitelib}/%{modname}-%{version}-py%{py_ver}.egg-info %{python_sitelib}/pydot-%{version}-py*.egg-info
%changelog %changelog