# -*- 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-entrypoints
version             0.4
revision            0

categories-append   devel
platforms           darwin
license             MIT
supported_archs     noarch

python.versions     27 35 36 37 38 39 310

maintainers         {stromnov @stromnov} openmaintainer

description         Discover and load entry points from installed packages.
long_description    {*}${description}

homepage            https://github.com/takluyver/entrypoints

checksums           rmd160  77fc44b29f217e2af6f2c26e2fd3b39fe2b939b2 \
                    sha256  b706eddaa9218a19ebcd67b56818f05bb27589b1ca9e8d797b74affad4ccacd4 \
                    size    13974

if {${name} ne ${subport}} {
    if {${python.version} >= 37} {
        python.pep517       yes
        python.pep517_backend   flit
    } else {
        version             0.3
        revision            0
        distname            ${python.rootname}-${version}
        checksums           rmd160  368a6f43ee97280b824a597947ea3a276f4125f5 \
                            sha256  c70dd71abe5a8c85e55e12c19bd91ccfeec11a6e99044204511f9ed547d48451 \
                            size    12315
        if {${python.version} == 27} {
            depends_lib-append  port:py${python.version}-configparser
        }
    } 

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

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

    livecheck.type      none
}
