mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-03 01:23:49 +00:00
Add py-gato 0.96.g, a Python-based toolbox to visualise algorithms
on graphs.
This commit is contained in:
parent
2f0c6d8518
commit
89bcea8639
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=47357
@ -88,6 +88,7 @@
|
||||
SUBDIR += physcalc
|
||||
SUBDIR += plplot
|
||||
SUBDIR += pspp
|
||||
SUBDIR += py-gato
|
||||
SUBDIR += py-gnuplot
|
||||
SUBDIR += py-numeric
|
||||
SUBDIR += py-numeric17
|
||||
|
50
math/py-gato/Makefile
Normal file
50
math/py-gato/Makefile
Normal file
@ -0,0 +1,50 @@
|
||||
# New ports collection makefile for: py-gato
|
||||
# Date created: 31 August 2001
|
||||
# Whom: Johann Visagie <wjv@FreeBSD.org>
|
||||
#
|
||||
# $FreeBSD$
|
||||
#
|
||||
|
||||
PORTNAME= gato
|
||||
PORTVERSION= 0.96.g
|
||||
CATEGORIES= math python
|
||||
MASTER_SITES= http://www.zpr.uni-koeln.de/~gato/Download/
|
||||
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
|
||||
DISTNAME= Gato-${PORTVERSION:U:C|\.([^.]*)$|\1|}
|
||||
EXTRACT_SUFX= .tar
|
||||
|
||||
MAINTAINER= wjv@FreeBSD.org
|
||||
|
||||
RUN_DEPENDS= ${PYTHON_SITELIBDIR}/_tkinter.so:${PORTSDIR}/x11-toolkits/py-tkinter
|
||||
|
||||
USE_PYTHON= yes
|
||||
WRKSRC= ${WRKDIR}/Gato
|
||||
GATO_DIR= ${PREFIX}/lib/${PYTHON_VERSION}/site-packages/Gato
|
||||
EXAMPLESDIR= ${PREFIX}/share/examples/${PORTNAME}
|
||||
CPIO= cpio --quiet -pdum -R
|
||||
|
||||
pre-build:
|
||||
@ ${TOUCH} ${WRKSRC}/__init__.py
|
||||
|
||||
do-build:
|
||||
@ ${PYTHON_CMD} ${PYTHON_LIBDIR}/compileall.py ${WRKSRC}
|
||||
@ ${PYTHON_CMD} -O ${PYTHON_LIBDIR}/compileall.py ${WRKSRC}
|
||||
|
||||
do-install:
|
||||
@ ${MKDIR} ${GATO_DIR}
|
||||
@ cd ${WRKSRC} && find *.py *.pyc *.pyo \
|
||||
-name Gato.py\* -o -name Gred.py\* -o -print \
|
||||
| ${CPIO} ${BINOWN}:${BINGRP} ${GATO_DIR}
|
||||
.for script in Gato Gred
|
||||
@ ${INSTALL_SCRIPT} ${WRKSRC}/${script}.py ${PREFIX}/bin/${script}
|
||||
.endfor
|
||||
|
||||
post-install:
|
||||
.if !defined(NOPORTDOCS)
|
||||
@ ${MKDIR} ${EXAMPLESDIR}
|
||||
.for egfile in *.alg *.pro *.cat
|
||||
@ ${INSTALL_DATA} ${WRKSRC}/${egfile} ${EXAMPLESDIR}
|
||||
.endfor
|
||||
.endif
|
||||
|
||||
.include <bsd.port.mk>
|
1
math/py-gato/distinfo
Normal file
1
math/py-gato/distinfo
Normal file
@ -0,0 +1 @@
|
||||
MD5 (Gato-0.96G.tar) = c0c942acf0961847b07fb9a6cd7e535c
|
57
math/py-gato/files/patch-Gato.py
Normal file
57
math/py-gato/files/patch-Gato.py
Normal file
@ -0,0 +1,57 @@
|
||||
--- Gato.py.orig Wed May 16 13:16:55 2001
|
||||
+++ Gato.py Mon Sep 3 12:26:21 2001
|
||||
@@ -38,7 +38,6 @@
|
||||
import bdb
|
||||
import whrandom
|
||||
import re
|
||||
-import regsub
|
||||
import string
|
||||
import StringIO
|
||||
import tokenize
|
||||
@@ -49,13 +48,13 @@
|
||||
from ScrolledText import ScrolledText
|
||||
|
||||
|
||||
-from Graph import Graph
|
||||
-from GraphUtil import *
|
||||
-from GraphDisplay import GraphDisplayToplevel
|
||||
-from GatoUtil import *
|
||||
-from GatoGlobals import *
|
||||
-from GatoDialogs import AboutBox, SplashScreen, HTMLViewer
|
||||
-import GatoIcons
|
||||
+from Gato.Graph import Graph
|
||||
+from Gato.GraphUtil import *
|
||||
+from Gato.GraphDisplay import GraphDisplayToplevel
|
||||
+from Gato.GatoUtil import *
|
||||
+from Gato.GatoGlobals import *
|
||||
+from Gato.GatoDialogs import AboutBox, SplashScreen, HTMLViewer
|
||||
+from Gato import GatoIcons
|
||||
|
||||
# put someplace else
|
||||
def WMExtrasGeometry(window):
|
||||
@@ -67,7 +66,7 @@
|
||||
|
||||
NOTE: Does not work with tk8.0 style menus, since those are
|
||||
handled by WM (according to Tk8.1 docs) """
|
||||
- g = regsub.split(window.geometry(),"+")
|
||||
+ g = re.split("\+", window.geometry())
|
||||
trueRootx = string.atoi(g[1])
|
||||
trueRooty = string.atoi(g[2])
|
||||
|
||||
@@ -1159,11 +1158,11 @@
|
||||
self.algoGlobals['A'] = self.GUI.graphDisplay
|
||||
# XXX
|
||||
# explictely loading packages we want to make available to the algorithm
|
||||
- modules = ['DataStructures',
|
||||
- 'AnimatedDataStructures',
|
||||
- 'AnimatedAlgorithms',
|
||||
- 'GraphUtil',
|
||||
- 'GatoUtil']
|
||||
+ modules = ['Gato.DataStructures',
|
||||
+ 'Gato.AnimatedDataStructures',
|
||||
+ 'Gato.AnimatedAlgorithms',
|
||||
+ 'Gato.GraphUtil',
|
||||
+ 'Gato.GatoUtil']
|
||||
|
||||
for m in modules:
|
||||
exec("from %s import *" % m, self.algoGlobals, self.algoGlobals)
|
13
math/py-gato/files/patch-GatoUtil.py
Normal file
13
math/py-gato/files/patch-GatoUtil.py
Normal file
@ -0,0 +1,13 @@
|
||||
--- GatoUtil.py.orig Wed May 16 13:16:56 2001
|
||||
+++ GatoUtil.py Mon Sep 3 12:14:42 2001
|
||||
@@ -40,8 +40,8 @@
|
||||
|
||||
def extension(pathAndFile):
|
||||
""" Return ext if path/filename.ext is given """
|
||||
- import regsub
|
||||
- return regsub.split(stripPath(pathAndFile),"\.")[1]
|
||||
+ import re
|
||||
+ return re.split("\.", stripPath(pathAndFile))[1]
|
||||
|
||||
def stripPath(pathAndFile):
|
||||
""" Return filename.ext if path/filename.ext is given """
|
11
math/py-gato/files/patch-Graph.py
Normal file
11
math/py-gato/files/patch-Graph.py
Normal file
@ -0,0 +1,11 @@
|
||||
--- Graph.py.orig Wed May 16 13:16:57 2001
|
||||
+++ Graph.py Fri Aug 31 17:12:01 2001
|
||||
@@ -31,7 +31,7 @@
|
||||
#
|
||||
################################################################################
|
||||
|
||||
-from regsub import split
|
||||
+from re import split
|
||||
from GatoGlobals import *
|
||||
from DataStructures import Point2D, VertexLabeling, EdgeLabeling, EdgeWeight
|
||||
from math import log
|
85
math/py-gato/files/patch-GraphUtil.py
Normal file
85
math/py-gato/files/patch-GraphUtil.py
Normal file
@ -0,0 +1,85 @@
|
||||
--- GraphUtil.py.orig Wed May 16 13:16:58 2001
|
||||
+++ GraphUtil.py Mon Sep 3 12:21:49 2001
|
||||
@@ -31,7 +31,7 @@
|
||||
#
|
||||
################################################################################
|
||||
|
||||
-from regsub import split
|
||||
+from re import split
|
||||
from GatoGlobals import *
|
||||
from Graph import Graph
|
||||
from DataStructures import Point2D, VertexLabeling, EdgeLabeling, EdgeWeight, VertexWeight, Queue
|
||||
@@ -223,13 +223,13 @@
|
||||
break
|
||||
|
||||
if lineNr == 2: # Read directed and euclidian
|
||||
- splitLine = split(line[:-1],';')
|
||||
- G.directed = eval(split(splitLine[0],':')[1])
|
||||
- G.simple = eval(split(splitLine[1],':')[1])
|
||||
- G.euclidian = eval(split(splitLine[2],':')[1])
|
||||
- intWeights = eval(split(splitLine[3],':')[1])
|
||||
- nrOfEdgeWeights = eval(split(splitLine[4],':')[1])
|
||||
- nrOfVertexWeights = eval(split(splitLine[5],':')[1])
|
||||
+ splitLine = split(';',line[:-1])
|
||||
+ G.directed = eval(split(':',splitLine[0])[1])
|
||||
+ G.simple = eval(split(':',splitLine[1])[1])
|
||||
+ G.euclidian = eval(split(':',splitLine[2])[1])
|
||||
+ intWeights = eval(split(':',splitLine[3])[1])
|
||||
+ nrOfEdgeWeights = eval(split(':',splitLine[4])[1])
|
||||
+ nrOfVertexWeights = eval(split(':',splitLine[5])[1])
|
||||
for i in xrange(nrOfEdgeWeights):
|
||||
G.edgeWeights[i] = EdgeWeight(G)
|
||||
for i in xrange(nrOfVertexWeights):
|
||||
@@ -237,33 +237,33 @@
|
||||
|
||||
|
||||
if lineNr == 5: # Read nr of vertices
|
||||
- nrOfVertices = eval(split(line[:-2],':')[1]) # Strip of "\n" and ;
|
||||
+ nrOfVertices = eval(split(':',line[:-2])[1]) # Strip of "\n" and ;
|
||||
firstVertexLineNr = lineNr + 1
|
||||
lastVertexLineNr = lineNr + nrOfVertices
|
||||
|
||||
if firstVertexLineNr <= lineNr and lineNr <= lastVertexLineNr:
|
||||
- splitLine = split(line[:-1],';')
|
||||
+ splitLine = split(';',line[:-1])
|
||||
v = G.AddVertex()
|
||||
- x = eval(split(splitLine[1],':')[1])
|
||||
- y = eval(split(splitLine[2],':')[1])
|
||||
+ x = eval(split(':',splitLine[1])[1])
|
||||
+ y = eval(split(':',splitLine[2])[1])
|
||||
for i in xrange(nrOfVertexWeights):
|
||||
- w = eval(split(splitLine[3+i],':')[1])
|
||||
+ w = eval(split(':',splitLine[3+i])[1])
|
||||
G.vertexWeights[i][v] = w
|
||||
|
||||
E[v] = Point2D(x,y)
|
||||
|
||||
if lineNr == lastVertexLineNr + 1: # Read Nr of edges
|
||||
- nrOfEdges = eval(split(line[:-2],':')[1]) # Strip of "\n" and ;
|
||||
+ nrOfEdges = eval(split(':',line[:-2])[1]) # Strip of "\n" and ;
|
||||
firstEdgeLineNr = lineNr + 1
|
||||
lastEdgeLineNr = lineNr + nrOfEdges
|
||||
|
||||
if firstEdgeLineNr <= lineNr and lineNr <= lastEdgeLineNr:
|
||||
- splitLine = split(line[:-1],';')
|
||||
- h = eval(split(splitLine[0],':')[1])
|
||||
- t = eval(split(splitLine[1],':')[1])
|
||||
+ splitLine = split(';',line[:-1])
|
||||
+ h = eval(split(':',splitLine[0])[1])
|
||||
+ t = eval(split(':',splitLine[1])[1])
|
||||
G.AddEdge(t,h)
|
||||
for i in xrange(nrOfEdgeWeights):
|
||||
- G.edgeWeights[i][(t,h)] = eval(split(splitLine[3+i],':')[1])
|
||||
+ G.edgeWeights[i][(t,h)] = eval(split(':',splitLine[3+i])[1])
|
||||
|
||||
lineNr = lineNr + 1
|
||||
|
||||
@@ -345,7 +345,7 @@
|
||||
if not line:
|
||||
return retval
|
||||
|
||||
- token = filter(lambda x: x != '', split(line[:-1],"[\t ]*"))
|
||||
+ token = filter(lambda x: x != '', split("[\t ]*",line[:-1]))
|
||||
|
||||
if len(token) == 1 and token[0] == ']':
|
||||
return retval
|
38
math/py-gato/files/patch-Gred.py
Normal file
38
math/py-gato/files/patch-Gred.py
Normal file
@ -0,0 +1,38 @@
|
||||
--- Gred.py.orig Wed May 16 13:16:58 2001
|
||||
+++ Gred.py Mon Sep 3 12:01:13 2001
|
||||
@@ -31,16 +31,16 @@
|
||||
# last change by $Author: schliep $.
|
||||
#
|
||||
################################################################################
|
||||
-from Graph import Graph
|
||||
-from DataStructures import EdgeWeight, VertexWeight
|
||||
-from GraphUtil import OpenCATBoxGraph, OpenGMLGraph, SaveCATBoxGraph, WeightedGraphInformer
|
||||
-from GraphEditor import GraphEditor
|
||||
+from Gato.Graph import Graph
|
||||
+from Gato.DataStructures import EdgeWeight, VertexWeight
|
||||
+from Gato.GraphUtil import OpenCATBoxGraph, OpenGMLGraph, SaveCATBoxGraph, WeightedGraphInformer
|
||||
+from Gato.GraphEditor import GraphEditor
|
||||
from Tkinter import *
|
||||
-from GatoUtil import stripPath, extension, gatoPath
|
||||
-from GatoGlobals import *
|
||||
-import GatoDialogs
|
||||
-import GatoGlobals
|
||||
-import GatoIcons
|
||||
+from Gato.GatoUtil import stripPath, extension, gatoPath
|
||||
+from Gato.GatoGlobals import *
|
||||
+from Gato import GatoDialogs
|
||||
+from Gato import GatoGlobals
|
||||
+from Gato import GatoIcons
|
||||
from ScrolledText import *
|
||||
|
||||
from tkFileDialog import askopenfilename, asksaveasfilename
|
||||
@@ -51,7 +51,8 @@
|
||||
import sys
|
||||
import os
|
||||
|
||||
-import GraphCreator, Embedder
|
||||
+from Gato import GraphCreator
|
||||
+from Gato import Embedder
|
||||
|
||||
class GredSplashScreen(GatoDialogs.SplashScreen):
|
||||
|
1
math/py-gato/pkg-comment
Normal file
1
math/py-gato/pkg-comment
Normal file
@ -0,0 +1 @@
|
||||
A Python-based toolbox to visualise algorithms on graphs
|
16
math/py-gato/pkg-descr
Normal file
16
math/py-gato/pkg-descr
Normal file
@ -0,0 +1,16 @@
|
||||
Paraphrasing the website:
|
||||
Gato - the Graph Animation Toolbox - is software [toolkit] which visualizes
|
||||
algorithms on graphs.
|
||||
- Graphs are mathematical objects consisting of vertices, and edges
|
||||
connecting pairs of vertices.
|
||||
- Algorithms might find a shortest path - the fastest route - or a minimal
|
||||
spanning tree or solve one of other interesting problems on graphs:
|
||||
maximal-flow, weighted and non-weighted matching and min-cost flow.
|
||||
- Visualisation means linking cause - the statements of an algorithm -
|
||||
immediately to an effect - changes to the graph the algorithm has as its
|
||||
input - by terms of blinking, changing colors and other visual effects.
|
||||
|
||||
Author: Alexander Schliep <schliep@zpr.uni-koeln.de>
|
||||
WWW: http://www.zpr.uni-koeln.de/~gato/
|
||||
|
||||
-- Johann Visagie <wjv@FreeBSD.org>
|
60
math/py-gato/pkg-plist
Normal file
60
math/py-gato/pkg-plist
Normal file
@ -0,0 +1,60 @@
|
||||
%%PORTDOCS%%share/examples/gato/BFS.alg
|
||||
%%PORTDOCS%%share/examples/gato/BFS.pro
|
||||
%%PORTDOCS%%share/examples/gato/DFS.alg
|
||||
%%PORTDOCS%%share/examples/gato/DFS.pro
|
||||
%%PORTDOCS%%share/examples/gato/sample.cat
|
||||
bin/Gato
|
||||
bin/Gred
|
||||
lib/%%PYTHON_VERSION%%/site-packages/Gato/AnimatedAlgorithms.py
|
||||
lib/%%PYTHON_VERSION%%/site-packages/Gato/AnimatedAlgorithms.pyc
|
||||
lib/%%PYTHON_VERSION%%/site-packages/Gato/AnimatedAlgorithms.pyo
|
||||
lib/%%PYTHON_VERSION%%/site-packages/Gato/AnimatedDataStructures.py
|
||||
lib/%%PYTHON_VERSION%%/site-packages/Gato/AnimatedDataStructures.pyc
|
||||
lib/%%PYTHON_VERSION%%/site-packages/Gato/AnimatedDataStructures.pyo
|
||||
lib/%%PYTHON_VERSION%%/site-packages/Gato/DataStructures.py
|
||||
lib/%%PYTHON_VERSION%%/site-packages/Gato/DataStructures.pyc
|
||||
lib/%%PYTHON_VERSION%%/site-packages/Gato/DataStructures.pyo
|
||||
lib/%%PYTHON_VERSION%%/site-packages/Gato/Embedder.py
|
||||
lib/%%PYTHON_VERSION%%/site-packages/Gato/Embedder.pyc
|
||||
lib/%%PYTHON_VERSION%%/site-packages/Gato/Embedder.pyo
|
||||
lib/%%PYTHON_VERSION%%/site-packages/Gato/GatoDialogs.py
|
||||
lib/%%PYTHON_VERSION%%/site-packages/Gato/GatoDialogs.pyc
|
||||
lib/%%PYTHON_VERSION%%/site-packages/Gato/GatoDialogs.pyo
|
||||
lib/%%PYTHON_VERSION%%/site-packages/Gato/GatoGlobals.py
|
||||
lib/%%PYTHON_VERSION%%/site-packages/Gato/GatoGlobals.pyc
|
||||
lib/%%PYTHON_VERSION%%/site-packages/Gato/GatoGlobals.pyo
|
||||
lib/%%PYTHON_VERSION%%/site-packages/Gato/GatoIcons.py
|
||||
lib/%%PYTHON_VERSION%%/site-packages/Gato/GatoIcons.pyc
|
||||
lib/%%PYTHON_VERSION%%/site-packages/Gato/GatoIcons.pyo
|
||||
lib/%%PYTHON_VERSION%%/site-packages/Gato/GatoTest.py
|
||||
lib/%%PYTHON_VERSION%%/site-packages/Gato/GatoTest.pyc
|
||||
lib/%%PYTHON_VERSION%%/site-packages/Gato/GatoTest.pyo
|
||||
lib/%%PYTHON_VERSION%%/site-packages/Gato/GatoUtil.py
|
||||
lib/%%PYTHON_VERSION%%/site-packages/Gato/GatoUtil.pyc
|
||||
lib/%%PYTHON_VERSION%%/site-packages/Gato/GatoUtil.pyo
|
||||
lib/%%PYTHON_VERSION%%/site-packages/Gato/Graph.py
|
||||
lib/%%PYTHON_VERSION%%/site-packages/Gato/Graph.pyc
|
||||
lib/%%PYTHON_VERSION%%/site-packages/Gato/Graph.pyo
|
||||
lib/%%PYTHON_VERSION%%/site-packages/Gato/GraphCreator.py
|
||||
lib/%%PYTHON_VERSION%%/site-packages/Gato/GraphCreator.pyc
|
||||
lib/%%PYTHON_VERSION%%/site-packages/Gato/GraphCreator.pyo
|
||||
lib/%%PYTHON_VERSION%%/site-packages/Gato/GraphDisplay.py
|
||||
lib/%%PYTHON_VERSION%%/site-packages/Gato/GraphDisplay.pyc
|
||||
lib/%%PYTHON_VERSION%%/site-packages/Gato/GraphDisplay.pyo
|
||||
lib/%%PYTHON_VERSION%%/site-packages/Gato/GraphEditor.py
|
||||
lib/%%PYTHON_VERSION%%/site-packages/Gato/GraphEditor.pyc
|
||||
lib/%%PYTHON_VERSION%%/site-packages/Gato/GraphEditor.pyo
|
||||
lib/%%PYTHON_VERSION%%/site-packages/Gato/GraphUtil.py
|
||||
lib/%%PYTHON_VERSION%%/site-packages/Gato/GraphUtil.pyc
|
||||
lib/%%PYTHON_VERSION%%/site-packages/Gato/GraphUtil.pyo
|
||||
lib/%%PYTHON_VERSION%%/site-packages/Gato/PlanarEmbedding.py
|
||||
lib/%%PYTHON_VERSION%%/site-packages/Gato/PlanarEmbedding.pyc
|
||||
lib/%%PYTHON_VERSION%%/site-packages/Gato/PlanarEmbedding.pyo
|
||||
lib/%%PYTHON_VERSION%%/site-packages/Gato/PlanarityTest.py
|
||||
lib/%%PYTHON_VERSION%%/site-packages/Gato/PlanarityTest.pyc
|
||||
lib/%%PYTHON_VERSION%%/site-packages/Gato/PlanarityTest.pyo
|
||||
lib/%%PYTHON_VERSION%%/site-packages/Gato/__init__.py
|
||||
lib/%%PYTHON_VERSION%%/site-packages/Gato/__init__.pyc
|
||||
lib/%%PYTHON_VERSION%%/site-packages/Gato/__init__.pyo
|
||||
@dirrm lib/%%PYTHON_VERSION%%/site-packages/Gato
|
||||
%%PORTDOCS%%@dirrm share/examples/gato
|
Loading…
Reference in New Issue
Block a user