# -*- 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-importlib-metadata
python.rootname     importlib_metadata
version             3.10.0
revision            0
categories-append   devel
platforms           darwin
license             Apache-2
supported_archs     noarch

# keep version for PY27 and PY34, these are (indirect) dependencies of py-virtualenv
python.versions     27 34 35 36 37 38 39

maintainers         {stromnov @stromnov} openmaintainer

description         Library to access the metadata for a Python package.
long_description    ${description}

homepage            https://importlib-metadata.readthedocs.io/

checksums           rmd160  b3cd2027fbcb880dbf01c6051b393296fe4831d8 \
                    sha256  c9db46394197244adf2f0b08ec5bc3cf16757e9590b02af1fca085c16c0d600a \
                    size    39679

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

    depends_lib-append  port:py${python.version}-zipp

    if {${python.version} in "27 35"} {
        version         2.1.0
        epoch           1
        revision        0
        checksums       rmd160  9495c1a8bb600b4aa7991788967b4b7339a947b9 \
                        sha256  caeee3603f5dcf567864d1be9b839b0bcfdf1383e3e7be33ce2dead8144ff19c \
                        size    30139
        if {${python.version} eq 27} {
            depends_lib-append \
                        port:py${python.version}-contextlib2 \
                        port:py${python.version}-configparser \
                        port:py${python.version}-pathlib2
        }
    } elseif {${python.version} eq 34} {
        version         1.0.0
        epoch           1
        revision        0
        checksums       rmd160  d85c4afae2456a17c35bfc008641499918c2cd84 \
                        sha256  a82ca8c109e194d7d6aee3f7531b0470dd4dd6b36ec14fd55087142a96bd55a7 \
                        size    28194
        depends_lib-append \
                        port:py${python.version}-pathlib2
    } else {
        depends_lib-append  port:py${python.version}-toml
    }

    if {${python.version} in "36 37"} {
        depends_lib-append \
                        port:py${python.version}-typing_extensions
    }

    livecheck.type      none
}
