# -*- 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-roman
version             5.0
revision            0

categories-append   textproc
license             ZPL-2.1
platforms           {darwin any}
supported_archs     noarch
maintainers         {aronnax @lpsinger} openmaintainer

description         Integer to Roman numerals converter
long_description    {*}${description}.

homepage            https://github.com/zopefoundation/roman

checksums           rmd160  f000a2db1af64eb0f1ba2f79fb07b6389ab8c5ee \
                    sha256  cb35293c1c4046105fd899194f4f2985f78c955a8b05937f7ab93f3be1660697 \
                    size    7664

python.versions     27 35 36 37 38 39 310 311 312 313

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

    if {${python.version} in {37 38}} {
        version     4.2
        revision    0
        checksums   rmd160  d4ebccb4258690bcb30bcf210e78e23cd00b02eb \
                    sha256  05f335a1b2b0824f827ed42fff84b35909aab9013799145ed4508bdd4fa3b385 \
                    size    7339
    } elseif {${python.version} <= 36} {
        version     3.3
        revision    0
        checksums   rmd160  793b600babe15e5cc811f9eb9fe2fe931378a180 \
                    sha256  2c46ac8db827d34e4fa9ccc0577e7f0b0d84f16ffe112351bd4f1ec2eb12d73f \
                    size    7577
    } else {
        patchfiles-append   pyproject.toml.patch
    }

    test.run                yes
    python.test_framework   {}
    test.cmd                ${python.bin} setup.py test

    livecheck.type          none
}
