# -*- 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           github 1.0
PortGroup           python 1.0

github.setup        mjpost sacrebleu 1.5.1 v
revision            0
name                py-${github.project}

license             Apache-2
maintainers         nomaintainer
platforms           darwin

description         Hassle-free computation of shareable, comparable, and \
                    reproducible BLEU, chrF, and TER scores

long_description    SacreBLEU provides hassle-free computation of \
                    shareable, comparable, and reproducible BLEU \
                    scores. Inspired by Rico Sennrich's \
                    multi-bleu-detok.perl, it produces the official \
                    WMT scores but works with plain text. It also \
                    knows all the standard test sets and handles \
                    downloading, processing, and tokenization for you.

checksums           rmd160  94b7651a7b8ffe74b27ab2d7118067c3ed147cec \
                    sha256  5ab2302c3192dabf99bfd5cd1597089ce22da6b03d91164e800fce4b2e66fc28 \
                    size    65410

python.versions     37 38 39

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

    depends_run-append \
                    port:py${python.version}-portalocker

    depends_test-append \
                    port:py${python.version}-pytest

    pre-test {
        test.env-append \
                    PYTHONPATH=[glob -nocomplain ${build.dir}/build/lib*]
    }

    test.run        yes
    test.cmd        py.test-${python.branch}
}
