# -*- 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-flask
version             2.2.2
revision            0

checksums           rmd160  6082c43b4b752bee1dc2b8b59ef6be5018fc5f73 \
                    sha256  642c450d19c4ad482f96729bd2a8f6d32554aa1e231f4f6b4e7e5264b16cca2b \
                    size    677389

python.versions     27 37 38 39 310
platforms           {darwin any}
maintainers         {@catap korins.ky:kirill} openmaintainer
license             BSD
supported_archs     noarch

description         microframework for Python based on Werkzeug and Jinja2

long_description    Flask is a {*}${description}, intended for small-scale applications

homepage            https://palletsprojects.com/p/flask/
python.rootname     Flask

python.test_framework \
                    pytest

if {${name} ne ${subport}} {
    # The last supported version for 27
    # See: https://github.com/pallets/flask/blob/main/CHANGES.rst#version-200
    if {${python.version} <= 27} {
        version             1.1.4
        revision            0
        checksums           rmd160  03b23def022b1cf6afdcae01cb840f4623288c43 \
                            sha256  0fbeb6180d383a9186d0d6ed954e0042ad9f18e0e8de088b2b419d526927d196 \
                            size    635920
    }

    depends_build-append    port:py${python.version}-setuptools

    depends_lib-append      port:py${python.version}-jinja2 \
                            port:py${python.version}-werkzeug \
                            port:py${python.version}-itsdangerous \
                            port:py${python.version}-click

    if {${python.version} < 310} {
        depends_lib-append  port:py${python.version}-importlib-metadata
    }

    # test before 2.x requires missed py-pathlib
    if {${python.version} > 27} {
        test.run            yes
    }

    livecheck.type      none
}
