# $Id: Portfile 88972 2012-01-15 17:02:10Z phw@macports.org $

PortSystem 1.0
PortGroup python 1.0

name			py-dot
python.versions         24 25 26 27
version			1.0.28
categories		python graphics
platforms		darwin
maintainers		phw openmaintainer
description		python module for creating graphs
long_description	An interface for creating both directed and non \
				directed graphs from Python. Currently all attributes \
				implemented in the Dot language are supported (up to \
				Graphviz 1.10).

homepage		http://code.google.com/p/pydot/
master_sites	        http://pydot.googlecode.com/files/
distname		pydot-${version}
checksums           sha1    3945af1765943807d72e773c7ac853f008ebb0b2
if { ${name} != ${subport} } {
    depends_run		bin:dot:graphviz
    patchfiles		patch-setup.py.diff
    
   post-patch {
       reinplace "s|@@DIRECTORY@@|share/doc/${subport}|g" ${worksrcpath}/setup.py
   }

    if { ${python.version} == 24 } {
    #Workaround until py-parsing is generalized
    depends_lib-append	port:py-parsing
    } else {
    depends_lib-append	port:py${python.version}-parsing
    }
}
