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

name                py-xlsx2csv
version             0.7.7
platforms           darwin
supported_archs     noarch
license             GPL-2+
maintainers         {khindenburg @kurthindenburg} openmaintainer

description         xlsx to csv converter

long_description    Converts xslx files to csv format.\
                    Handles large XLSX files. Fast and easy to use.

homepage            https://github.com/dilshod/xlsx2csv

checksums           rmd160  5391403df70ec0877ac9eaf7a8798feb8f7c1e1f \
                    sha256  844a79ec29278ae05cb60b0056a5b839c034d45875b6e672fcb1845fed7c7127 \
                    size    237132

python.versions     27 36 37 38

if {${subport} ne ${name}} {
    depends_build       port:py${python.version}-setuptools

    patchfiles          patch-run-python-version.diff
    post-patch {
        reinplace "s|/usr/bin/env python|${python.bin}|g" ${worksrcpath}/test/run
        reinplace "s|__PYTHON_VERSION__|${python.branch}|g" ${worksrcpath}/test/run
    }

    test.run            yes
    test.cmd            ${python.bin} ${worksrcpath}/test/run
    test.env            PYTHONPATH=[glob -nocomplain ${worksrcpath}/build/lib*]
    test.target

    livecheck.type      none
}
