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

description         API to call PEP 517 hooks

long_description    This is a low-level library for calling \
                    build-backends in pyproject.toml-based projects. \
                    It provides the basic functionality to help write \
                    tooling that generates distribution files from \
                    Python projects.

homepage            https://pypi.python.org/pypi/${python.rootname}/

checksums           md5 ed3dd1b984339e83e35f676d7169c192 \
                    rmd160 cb4dceff34998e00fff09b829aa125b659571689 \
                    sha256 1e859bd5c40fae9448642dd871adf459e5e2084186e8d2c2a79a824c970da1f8

python.versions     37 38 39 310 311 312 313 314
python.pep517       yes
python.pep517_backend   flit

if {$subport ne $name} {
    python.add_dependencies no
    depends_build   port:py-bootstrap-modules \
                    port:py${python.version}-installer
    depends_lib     port:python${python.version}
    if {${python.version} < 311} {
        depends_lib-append  port:py${python.version}-tomli
    }

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

    if {${python.version} > 39} {
        test.run        yes
        depends_test-append port:py${python.version}-testpath
        test.env        PYTHONPATH=${worksrcpath}/src
    }

    livecheck.type  none
}
