summaryrefslogtreecommitdiff
path: root/graphics
diff options
context:
space:
mode:
authorrichard <richard>2013-07-22 12:16:18 +0000
committerrichard <richard>2013-07-22 12:16:18 +0000
commitcfa49a853340a96501e7eeb1008445654b2662df (patch)
tree7da8a4cf20bb40908261693d50fdbde25bbf373c /graphics
parent52b810b6d011068bd1cec160085ca5716295dc67 (diff)
downloadpkgsrc-cfa49a853340a96501e7eeb1008445654b2662df.tar.gz
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.26.3). Output can be inlined in Postscript into interactive scientific environments like TeXmacs, or output in any of the format's supported by the Graphviz tools dot, neato, twopi.
Diffstat (limited to 'graphics')
-rw-r--r--graphics/Makefile3
-rw-r--r--graphics/py-pydot/DESCR7
-rw-r--r--graphics/py-pydot/Makefile24
-rw-r--r--graphics/py-pydot/PLIST7
-rw-r--r--graphics/py-pydot/distinfo6
-rw-r--r--graphics/py-pydot/patches/patch-dot__parser.py23
6 files changed, 69 insertions, 1 deletions
diff --git a/graphics/Makefile b/graphics/Makefile
index 404f15ccba3..1da6dd060c0 100644
--- a/graphics/Makefile
+++ b/graphics/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.659 2013/07/21 12:02:18 richard Exp $
+# $NetBSD: Makefile,v 1.660 2013/07/22 12:16:18 richard Exp $
#
COMMENT= Graphics tools and libraries
@@ -390,6 +390,7 @@ SUBDIR+= py-matplotlib-tk
SUBDIR+= py-nwdiag
SUBDIR+= py-piddle
SUBDIR+= py-pycha
+SUBDIR+= py-pydot
SUBDIR+= py-pyfits
SUBDIR+= py-seqdiag
SUBDIR+= py-sk1libs
diff --git a/graphics/py-pydot/DESCR b/graphics/py-pydot/DESCR
new file mode 100644
index 00000000000..d2b99b49580
--- /dev/null
+++ b/graphics/py-pydot/DESCR
@@ -0,0 +1,7 @@
+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.26.3).
+
+Output can be inlined in Postscript into interactive scientific environments
+like TeXmacs, or output in any of the format's supported by the Graphviz tools
+dot, neato, twopi.
diff --git a/graphics/py-pydot/Makefile b/graphics/py-pydot/Makefile
new file mode 100644
index 00000000000..4736aac8e27
--- /dev/null
+++ b/graphics/py-pydot/Makefile
@@ -0,0 +1,24 @@
+# $NetBSD: Makefile,v 1.1 2013/07/22 12:16:18 richard Exp $
+DISTNAME= pydot-1.0.28
+PKGNAME= ${PYPKGPREFIX}-${DISTNAME}
+CATEGORIES= graphics python
+MASTER_SITES= http://pydot.googlecode.com/files/
+
+MAINTAINER= pkgsrc-users@NetBSD.org
+HOMEPAGE= http://code.google.com/p/pydot/
+COMMENT= Python interface to Graphviz's Dot language
+LICENSE= mit
+
+PYTHON_VERSIONS_INCLUDE_3X = no
+PYDISTUTILSPKG= yes
+
+DEPENDS+= ${PYPKGPREFIX}-pyparsing-[0-9]*:../../devel/py-pyparsing
+DEPENDS+= graphviz-[0-9]*:../../graphics/graphviz
+
+post-install:
+ ${RM} ${DESTDIR}${PREFIX}/README
+ ${RM} ${DESTDIR}${PREFIX}/LICENSE
+
+.include "../../lang/python/application.mk"
+.include "../../lang/python/extension.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/graphics/py-pydot/PLIST b/graphics/py-pydot/PLIST
new file mode 100644
index 00000000000..30b3f02c42b
--- /dev/null
+++ b/graphics/py-pydot/PLIST
@@ -0,0 +1,7 @@
+@comment $NetBSD: PLIST,v 1.1 2013/07/22 12:16:18 richard Exp $
+${PYSITELIB}/dot_parser.py
+${PYSITELIB}/dot_parser.pyc
+${PYSITELIB}/dot_parser.pyo
+${PYSITELIB}/pydot.py
+${PYSITELIB}/pydot.pyc
+${PYSITELIB}/pydot.pyo
diff --git a/graphics/py-pydot/distinfo b/graphics/py-pydot/distinfo
new file mode 100644
index 00000000000..37685a076e8
--- /dev/null
+++ b/graphics/py-pydot/distinfo
@@ -0,0 +1,6 @@
+$NetBSD: distinfo,v 1.1 2013/07/22 12:16:18 richard Exp $
+
+SHA1 (pydot-1.0.28.tar.gz) = 3945af1765943807d72e773c7ac853f008ebb0b2
+RMD160 (pydot-1.0.28.tar.gz) = a67336f5edf55a81fe654df3258a12a8ff92d4f6
+Size (pydot-1.0.28.tar.gz) = 19711 bytes
+SHA1 (patch-dot__parser.py) = 9ce92c76bb5878ac990a3557e550679364a2d7b2
diff --git a/graphics/py-pydot/patches/patch-dot__parser.py b/graphics/py-pydot/patches/patch-dot__parser.py
new file mode 100644
index 00000000000..db0e809b3c5
--- /dev/null
+++ b/graphics/py-pydot/patches/patch-dot__parser.py
@@ -0,0 +1,23 @@
+$NetBSD: patch-dot__parser.py,v 1.1 2013/07/22 12:16:18 richard Exp $
+
+_noncomma is obsoleted in the latest pyparsing, fix to work with all versions.
+
+--- dot_parser.py.orig 2012-01-02 23:23:26.000000000 +0000
++++ dot_parser.py
+@@ -25,7 +25,7 @@ from pyparsing import __version__ as pyp
+ 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 )
+
+
+ class P_AttrList:
+@@ -414,6 +414,7 @@ def graph_definition():
+
+ double_quoted_string = QuotedString('"', multiline=True, unquoteResults=False) # dblQuotedString
+
++ _noncomma = "".join( [ c for c in printables if c != "," ] )
+ alphastring_ = OneOrMore(CharsNotIn(_noncomma + ' '))
+
+ def parse_html(s, loc, toks):