diff options
Diffstat (limited to 'graphics/py-graph/Makefile')
-rw-r--r-- | graphics/py-graph/Makefile | 33 |
1 files changed, 26 insertions, 7 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> |