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

# The github of this project does not have the test files
name                py-xlsx2csv
version             0.8.4
platforms           {darwin any}
supported_archs     noarch
license             MIT
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  ca03dfc5eed5abfd1ba9e9b8ac3c2735b5fde375 \
                    sha256  2aa809888826f6af5b26c77fc7f613f2bbeada0d8cc09e5a58e0f59684bb6911 \
                    size    221390

python.versions     39 310 311 312 313
python.pep517       yes

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

    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
    python.test_framework
    test.cmd            ${python.bin} ${worksrcpath}/test/run
}
