# -*- 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-py2app
version             0.28.8
categories-append   devel
license             {MIT PSF}
platforms           {darwin any}
supported_archs     noarch
maintainers         {jmr @jmroot} openmaintainer
description         converts python scripts into executable Mac OS X apps
long_description \
    A distutils extension which converts python scripts into executable \
    Mac OS X applications, able to run without requiring an existing python \
    installation.  This is a replacement for bundlebuilder.

homepage            https://py2app.readthedocs.io/

checksums           md5 d5f798f797ef433f46afd8b5e74e131a \
                    rmd160 d3d966ba0d65a9066dc20ed300991923652cd81a \
                    sha256 cab7aec752a8b83e7c6cef7c15271dc720155275e44cbf610e3162e0807313ec

python.versions     37 38 39 310 311 312 313

if {$subport ne $name} {
    # needs pkg_resources at runtime
    depends_lib     port:py${python.version}-macholib \
                    port:py${python.version}-modulegraph \
                    port:py${python.version}-setuptools

    post-destroot {
        xinstall -m 755 -d ${destroot}${prefix}/share/doc/${subport} \
        ${destroot}${prefix}/share/examples/${subport}
        xinstall -m 644 -W ${worksrcpath} LICENSE.txt README.rst \
        ${destroot}${prefix}/share/doc/${subport}
        file copy {*}[glob ${worksrcpath}/examples/*] \
        ${destroot}${prefix}/share/examples/${subport}
    }
    livecheck.type  none
}
