# -*- 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-wheel
version             0.46.0
revision            0
license             MIT
maintainers         {mps @Schamschula} openmaintainer

description         A built package format for Python.
long_description    {*}${description}

homepage            https://github.com/pypa/wheel/

checksums           rmd160  744daabd2b70d31a3d73aaf077cf70ada5f2b4a2 \
                    sha256  bd9fadc35ff6a3624bdd00bc78437bcded40e2edc1fbb29076308de503fe9a4b \
                    size    49842

supported_archs     noarch
platforms           {darwin any}

# leave the EOL PY34 subport here as it is an indirect dependency of py34-virtualenv
python.versions     27 34 35 36 37 38 39 310 311 312 313

if {${name} ne ${subport}} {
    if {${python.version} == 37} {
        version     0.42.0
        revision    0
        epoch       1
        checksums   rmd160  25c120a08158cb9c9d642a6a900e49dab44b0c12 \
                    sha256  c45be39f7882c9d34243236f2d63cbd58039e360f85d0913425fbd7ceea617a8 \
                    size    98667
    }

    if {${python.version} == 36} {
        depends_build-append    port:py${python.version}-importlib-resources
        # break circular dependency with py36-build
        python.add_dependencies no
        depends_build-append    port:py36-bootstrap-modules

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

        build.env-append        PYTHONPATH=${prefix}/share/py36-bootstrap-modules
        build.args              --skip-dependency-check
        destroot.env-append     PYTHONPATH=${prefix}/share/py36-bootstrap-modules
    }

    if {${python.version} == 34} {
        version     0.33.6
        revision    0
        checksums   rmd160  9c84bfce4d05e61aed7898a212f37eb9d7351543 \
                    sha256  10c9da68765315ed98850f8e048347c3eb06dd81822dc2ab1d4fde9dc9702646 \
                    size    48130

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

    if {${python.version} == 27 || ${python.version} == 35 || ${python.version} == 36} {
        version     0.37.1
        revision    0
        checksums   rmd160  6c4df8aa7c6d59f8b97cf85cce9e362c81b0c523 \
                    sha256  e9a504e793efbca1b8e0e9cb979a249cf4a0a7b5b8c9e8b65a5e39d49529c1c4 \
                    size    66376
    }

    if {${python.version} <= 36} {
        depends_build-append \
                    port:py${python.version}-setuptools
    }

    if {${python.version} >= 36} {
        python.pep517           yes
        if {${python.version} >= 37} {
            python.pep517_backend   flit
        }
    }
}
