# -*- 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-pep517
version             0.13.0
platforms           {darwin any}
supported_archs     noarch
maintainers         {jmr @jmroot} openmaintainer
license             MIT

description         API to call PEP 517 hooks

long_description    {*}${description}

homepage            https://pypi.python.org/pypi/pep517/

checksums           md5 7fd08b11215256601a8a4940c1ba3d34 \
                    rmd160 b52f92cb3a3d6d8ae6892f8df4c144eb2c698e49 \
                    sha256 ae69927c5c172be1add9203726d4b84cf3ebad1edcd5f71fcdc746e66e829f59

# Latest version renamed to pyproject_hooks but doesn't support Python 3.6
python.versions     36
python.add_dependencies no

if {$subport ne $name && ${python.version} == 36} {
    python.pep517   yes
    depends_build   port:py36-bootstrap-modules
    depends_lib     port:python${python.version} \
                    port:py${python.version}-tomli \
                    port:py${python.version}-importlib-metadata \
                    port:py${python.version}-zipp

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

foreach pyver {37 38 39 310 311} {
    subport py${pyver}-pep517 {
        version     0.13.0
        revision    1
        replaced_by py${pyver}-pyproject_hooks
        distfiles
    }
}

livecheck.type  none
