# -*- 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

PortSystem          1.0
PortGroup           python 1.0
PortGroup           select 1.0

name                py-csvkit
version             2.1.0
revision            0

categories-append   textproc
supported_archs     noarch
platforms           {darwin any}
license             MIT
maintainers         {gmail.com:esafak @esafak} openmaintainer

description         A suite of utilities for converting to and working with CSV, the king of tabular file formats
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.

homepage            https://csvkit.readthedocs.io/

checksums           rmd160  2ccd0935f985b8157389068c88fd0173538ab79c \
                    sha256  b91e8f5a485888c3c515b15cc2525ce4be5cfcd4f4766ead83113e787b5fd536 \
                    size    3820430

python.versions     310 311 312 313

if {${name} ne ${subport}} {
    depends_lib-append  port:py${python.version}-agate \
                        port:py${python.version}-agate-excel \
                        port:py${python.version}-agate-dbf \
                        port:py${python.version}-agate-sql \
                        port:py${python.version}-openpyxl \
                        port:py${python.version}-sqlalchemy \
                        port:py${python.version}-xlrd

    depends_run-append  port:${python.rootname}_select

    select.group        ${python.rootname}
    select.file         ${filespath}/py${python.version}-${python.rootname}

    test.run        yes

    post-destroot {
        set docdir ${prefix}/share/doc/${subport}
        xinstall -d ${destroot}${docdir}
        xinstall -m 0644 -W ${worksrcpath} COPYING README.rst \
            AUTHORS.rst CHANGELOG.rst ${destroot}${docdir}
    }
}
