# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
# $Id: Portfile 92832 2012-05-08 23:37:21Z ryandesign@macports.org $

PortSystem          1.0
PortGroup           python 1.0
PortGroup           select 1.0

name                py-csvkit
version             0.4.3
python.versions     26 27
python.default_version  27
categories-append   textproc
platforms           darwin
maintainers         singingwolfboy openmaintainer
license             MIT
homepage            http://pypi.python.org/pypi/csvkit
description         suite of utilities for converting to and working with CSV
long_description    \
    csvkit is a suite of utilities for converting to and working with CSV, the \
    king of tabular file formats. csvkit is to tabular data what the standard \
    Unix text processing suite (grep, sed, cut, sort) is to text. As such, csvkit \
    adheres to the Unix philosophy.

master_sites        http://pypi.python.org/packages/source/c/csvkit
distname            csvkit-${version}

checksums           rmd160  a4526161f3bcb7cd61b8aaf9041dfcaf0a361074 \
                    sha256  542d0fede943ad25235e919d51775ccce936c445c2c8a47d1acafe4684bef16a


if {$subport != $name} {
    livecheck.type      none
    depends_lib         port:csvkit_select \
                        port:py${python.version}-xlrd \
                        port:py${python.version}-dateutil \
                        port:py${python.version}-sqlalchemy \
                        port:py${python.version}-openpyxl
    subport py26-csvkit {
        depends_lib-append  port:py26-argparse
    }
    select.group        csvkit
    select.file         ${filespath}/py${python.version}-csvkit
} else {
    livecheck.type      regex
    livecheck.url       ${homepage}
    livecheck.regex     csvkit (\\d+(\\.\\d+)+)
}
