aboutsummaryrefslogtreecommitdiff
path: root/graphics/py-graph
diff options
context:
space:
mode:
authorMartin Wilke <miwi@FreeBSD.org>2009-05-09 09:18:33 +0000
committerMartin Wilke <miwi@FreeBSD.org>2009-05-09 09:18:33 +0000
commit74762d5bc04b5ba56c2a1d5d8c6f2d1a2d38c45e (patch)
treead32488a0a5303b7ea8f3fb1a4e793e294755965 /graphics/py-graph
parent035d235403c0c9c67c4395e3ac4a6107110dd7b3 (diff)
downloadports-74762d5bc04b5ba56c2a1d5d8c6f2d1a2d38c45e.tar.gz
ports-74762d5bc04b5ba56c2a1d5d8c6f2d1a2d38c45e.zip
Notes
Diffstat (limited to 'graphics/py-graph')
-rw-r--r--graphics/py-graph/Makefile33
-rw-r--r--graphics/py-graph/distinfo6
-rw-r--r--graphics/py-graph/files/patch-setup.py19
-rw-r--r--graphics/py-graph/pkg-plist3
4 files changed, 47 insertions, 14 deletions
diff --git a/graphics/py-graph/Makefile b/graphics/py-graph/Makefile
index d0b7373d166c..79754b5ec2ef 100644
--- a/graphics/py-graph/Makefile
+++ b/graphics/py-graph/Makefile
@@ -6,7 +6,7 @@
#
PORTNAME= graph
-PORTVERSION= 1.4.2
+PORTVERSION= 1.5.0
CATEGORIES= graphics python
MASTER_SITES= ${MASTER_SITE_GOOGLE_CODE}
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
@@ -15,8 +15,7 @@ DISTNAME= python-graph-${PORTVERSION}
MAINTAINER= yzlin@cs.nctu.edu.tw
COMMENT= A library for working with graphs in Python
-BUILD_DEPENDS= dot:${PORTSDIR}/graphics/graphviz
-RUN_DEPENDS= dot:${PORTSDIR}/graphics/graphviz
+RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pydot>=0:${PORTSDIR}/graphics/py-pydot
PROJECTHOST= python-graph
USE_PYTHON= yes
@@ -30,17 +29,37 @@ USE_BZIP2= yes
DOCSDIR= ${PREFIX}/share/doc/py-${PORTNAME}
EXAMPLESDIR= ${PREFIX}/share/examples/py-${PORTNAME}
+TESTFILES= unittests-accessibility.py \
+ unittests-cycles.py \
+ unittests-digraph.py \
+ unittests-filters.py \
+ unittests-graph.py \
+ unittests-heuristics.py \
+ unittests-readwrite.py \
+ unittests-searching.py \
+ unittests-sorting.py \
+
post-install:
.if !defined(NOPORTDOCS)
@${MKDIR} ${DOCSDIR}
- ${INSTALL_DATA} ${WRKSRC}/README ${DOCSDIR}
- ${INSTALL_DATA} ${WRKSRC}/Changelog ${DOCSDIR}
- ${INSTALL_DATA} ${WRKSRC}/COPYING ${DOCSDIR}
- ${INSTALL_MAN} ${WRKSRC}/docs/* ${DOCSDIR}
+.for f in COPYING Changelog README
+ ${INSTALL_DATA} ${WRKSRC}/${f} ${DOCSDIR}
+.endfor
+ ${INSTALL_DATA} ${WRKSRC}/docs/* ${DOCSDIR}
.endif
.if !defined(NOPORTEXAMPLES)
@${MKDIR} ${EXAMPLESDIR}
${INSTALL_DATA} ${WRKSRC}/examples/* ${EXAMPLESDIR}
.endif
+# This target is only meant to be used by the port maintainer.
+x-regression-test: install
+.for f in ${TESTFILES}
+ @${ECHO} "" >> ${WRKSRC}/tests/${f}
+ @${ECHO} "if __name__ == '__main__':" >> ${WRKSRC}/tests/${f}
+ @${ECHO} " unittest.main()" >> ${WRKSRC}/tests/${f}
+ @${ECHO} "Unit-testing ${f}..."
+ @(cd ${WRKSRC}/tests && ${PYTHON_CMD} ${f})
+.endfor
+
.include <bsd.port.mk>
diff --git a/graphics/py-graph/distinfo b/graphics/py-graph/distinfo
index 81185dd5b242..3f3f9046851b 100644
--- a/graphics/py-graph/distinfo
+++ b/graphics/py-graph/distinfo
@@ -1,3 +1,3 @@
-MD5 (python-graph-1.4.2.tar.bz2) = 142807b1d3865c915bee8b5346790e7b
-SHA256 (python-graph-1.4.2.tar.bz2) = 91225ee818272debc17af7df4b0f4acb638fc772b796397689464a26c8bf0ee6
-SIZE (python-graph-1.4.2.tar.bz2) = 49957
+MD5 (python-graph-1.5.0.tar.bz2) = fc349565a013286a4cb20297cd00364b
+SHA256 (python-graph-1.5.0.tar.bz2) = f7bf5d9e7233d75b72defc724c9678abed54a54633dab0e700c7aec47a390532
+SIZE (python-graph-1.5.0.tar.bz2) = 53892
diff --git a/graphics/py-graph/files/patch-setup.py b/graphics/py-graph/files/patch-setup.py
index c6d20f03fc30..3e1fedeb3a42 100644
--- a/graphics/py-graph/files/patch-setup.py
+++ b/graphics/py-graph/files/patch-setup.py
@@ -1,6 +1,19 @@
---- setup.py.orig 2009-02-23 22:14:56.000000000 +0800
-+++ setup.py 2009-02-23 22:14:38.000000000 +0800
-@@ -37,8 +37,8 @@
+--- setup.py.orig
++++ setup.py
+@@ -4,11 +4,7 @@
+ import os
+ import logging
+
+-try:
+- from setuptools import setup, find_packages
+-except ImportError, ie:
+- import ez_setup
+- ez_setup.use_setuptools()
++from setuptools import setup, find_packages
+
+ # Startup
+ appname = "python-graph"
+@@ -37,8 +33,8 @@
name = appname,
version = appversion,
packages = ['graph', 'graph.algorithms', 'graph.algorithms.filters', 'graph.algorithms.heuristics', 'graph.classes'],
diff --git a/graphics/py-graph/pkg-plist b/graphics/py-graph/pkg-plist
index fb780887ac1a..3df4e3e5aaf9 100644
--- a/graphics/py-graph/pkg-plist
+++ b/graphics/py-graph/pkg-plist
@@ -1,5 +1,5 @@
%%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%
-@dirrm %%PYTHON_SITELIBDIR%%/graph
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/critical.py
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/draw.py
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/drawhyper.py
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/ex1.py
@@ -20,6 +20,7 @@
%%PORTDOCS%%%%DOCSDIR%%/graph-module.html
%%PORTDOCS%%%%DOCSDIR%%/graph.algorithms-module.html
%%PORTDOCS%%%%DOCSDIR%%/graph.algorithms.accessibility-module.html
+%%PORTDOCS%%%%DOCSDIR%%/graph.algorithms.critical-module.html
%%PORTDOCS%%%%DOCSDIR%%/graph.algorithms.cycles-module.html
%%PORTDOCS%%%%DOCSDIR%%/graph.algorithms.exceptions-module.html
%%PORTDOCS%%%%DOCSDIR%%/graph.algorithms.exceptions.python_graph_exception-class.html