# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:filetype=tcl:et:sw=4:ts=4:sts=4
# $Id: Portfile 114324 2013-12-05 08:44:51Z ryandesign@macports.org $

PortSystem          1.0
PortGroup           python 1.0

name                py-pybtex
license             MIT
epoch               1
version             0.16
categories-append   textproc
platforms           darwin
maintainers         lightnin openmaintainer
supported_archs     noarch

description         A BibTeX-compatible bibliography processor in Python.
long_description    Pybtex reads citation information from a file and \
                    produces a formatted bibliography.  BibTeX style files \
                    are supported.  Alternatively it is possible to write \
                    styles in Python.

homepage            http://pybtex.sourceforge.net/
master_sites        http://pypi.python.org/packages/source/p/pybtex/
distname            pybtex-${version}
checksums           md5 951c4f913fb9c20362ece9cdf7cb3a3c \
                    sha1 f2e73e91cdd352fcd77fef69639c3fa28392039e \
                    rmd160 fdf2a521929d01ead2b6e00409efb7b909e7ec40

use_bzip2           yes

python.versions     25 26 27
python.default_version 27

if {${name} ne ${subport}} {
    depends_lib         port:py${python.version}-elementtree \
                        port:py${python.version}-parsing \
                        port:py${python.version}-setuptools \
                        port:py${python.version}-yaml

    test.run            yes
    test.cmd            ${python.bin} setup.py
    test.env            PYTHONPATH=${worksrcpath}/build/lib

    post-destroot   {
        set docdir ${prefix}/share/doc/${subport}
        xinstall -d ${destroot}${docdir}
        xinstall -m 644 -W ${worksrcpath} \
            CHANGES \
            COPYING \
            PKG-INFO \
            README \
            ${destroot}${docdir}
    }
}
