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

github.setup        corydolphin flask-cors 3.0.10
revision            0
name                py-${github.project}

categories-append   www
platforms           darwin
license             MIT
maintainers         nomaintainer

description         Cross Origin Resource Sharing (CORS) support for Flask
long_description    A Flask extension for handling Cross Origin Resource \
                    Sharing (CORS), making cross-origin AJAX \
                    possible. This package has a simple philosophy, \
                    when you want to enable CORS, you wish to enable \
                    it for all use cases on a domain. This means no \
                    mucking around with different allowed headers, \
                    methods, etc. By default, submission of cookies \
                    across domains is disabled due to the security \
                    implications, please see the documentation for how \
                    to enable credential'ed requests, and please make \
                    sure you add some sort of CSRF protection before \
                    doing so!

homepage            https://flask-cors.corydolphin.com/

checksums           rmd160  b2bdad9a93050c23bf63742cf3df512866a7d350 \
                    sha256  adf86ec2566ddae75819c5a69d0ca8f8b4e6b589899e7df6cab9726ed1b7897d \
                    size    31016

python.versions     37 38 39

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

    depends_lib-append \
                    port:py${python.version}-flask \
                    port:py${python.version}-six

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

    test.run        yes
    test.cmd        nosetests-${python.branch}
    test.target
    test.env        PYTHONPATH=${worksrcpath}/build/lib

    post-destroot {
        set docdir ${prefix}/share/doc/${subport}
        xinstall -d ${destroot}${docdir}
        xinstall -m 0644 -W ${worksrcpath} README.rst LICENSE \
            CHANGELOG.md ${destroot}${docdir}
    }

    livecheck.type  none
}
