Skip to content
Permalink
Browse files

new port python/py-utidylib

a python interface to the html tidy lib

git-svn-id: https://svn.macports.org/repository/macports/trunk/dports@4621 d073be05-634f-4543-b044-5fe20cf6d1d6
  • Loading branch information
Markus W. Weißmann
Markus W. Weißmann committed Jan 13, 2004
1 parent f107df6 commit 604e74d149a0c3b486e7320e4a5104c7265174c2
Showing with 59 additions and 0 deletions.
  1. +48 −0 python/py-utidylib/Portfile
  2. +11 −0 python/py-utidylib/files/patch-lib.py.diff
@@ -0,0 +1,48 @@
# $Id: Portfile,v 1.1 2004/01/13 21:08:38 mww Exp $

PortSystem 1.0

name py-utidylib
version 0.1
categories python
platforms darwin
maintainers mww@opendarwin.org
description Python interface to html tidy
long_description Python interface to html tidy, the html and xml \
cleanup tool from the w3c;

homepage http://utidylib.sourceforge.net/
master_sites sourceforge:utidylib
distname uTidylib-${version}
checksums md5 46adcf72fe9457fddc19613745073cb3
use_zip yes
patchfiles patch-lib.py.diff

depends_lib bin:python:python \
lib:libtidy:tidy \
lib:XXX:py-ctypes \
lib:XXX:py-epydoc

post-patch {
reinplace "s|LIBTIDYPATH|${prefix}/lib/libtidy.dylib|g" \
${worksrcpath}/tidylib/lib.py
}

use_configure no

build.cmd python setup.py
build.target build
post-build {
system "cd ${worksrcpath} && python gendoc.py"
file rename ${worksrcpath}/apidoc ${worksrcpath}/doc
}

destroot.cmd python setup.py
destroot.destdir --prefix=${destroot}${prefix}

post-destroot {
file mkdir ${destroot}${prefix}/share/doc/
file copy ${worksrcpath}/doc ${destroot}${prefix}/share/doc/${name}
file copy ${worksrcpath}/INSTALL.txt ${worksrcpath}/README.path \
${worksrcpath}/README.txt ${destroot}${prefix}/share/doc/${name}
}
@@ -0,0 +1,11 @@
--- tidylib/lib.py Mon Jun 30 15:09:26 2003
+++ tidylib/lib.py.new Tue Jan 13 21:52:25 2004
@@ -8,7 +8,7 @@

# search the path for libtidy using the known names
thelib=None
-for libname in ['cygtidy-0-99-0', 'libtidy', 'libtidy.so',
+for libname in ['cygtidy-0-99-0', 'libtidy', 'libtidy.so', 'LIBTIDYPATH',
'libtidy-0.99.so.0']:
try:
thelib=getattr(c.cdll, libname)

0 comments on commit 604e74d

Please sign in to comment.
You can’t perform that action at this time.