# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8::et:sw=4:ts=4:sts=4

PortSystem          1.0
PortGroup           python 1.0

name                py-pync
version             2.0.3
checksums           rmd160  efa14da3e3618fe70a0d1a74cc83a45835e84db2 \
                    sha256  38b9e61735a3161f9211a5773c5f5ea698f36af4ff7f77fa03e8d1ff0caa117f \
                    size    374289

categories-append   aqua
platforms           darwin

license             MIT
# Except for 'Terminal.icns', which is a copy of Apple's Terminal.app icon and as such is copyright of Apple.
# But we delete the vendor/ dir, so we should be just MIT licensed.

maintainers         nomaintainer

description         A simple Python wrapper around the terminal-notifier command-line tool.
long_description    ${description} It allows you to send User Notifications to \
                    the Notification Center on OS X 10.8 or higher.

homepage            https://pypi.org/project/pync/
master_sites        pypi:[string index ${python.rootname} 0]/${python.rootname}
distname            ${python.rootname}-${version}

python.versions     27 34 35 36 37

if {$subport ne $name} {
    depends_build       port:py${python.version}-setuptools
    depends_run         port:py${python.version}-dateutil \
                        port:terminal-notifier

    supported_archs     noarch

    patchfiles          pync_TerminalNotifier.py.diff setup.py.diff

    post-extract {
        delete ${worksrcpath}/pync/vendor
    }

    post-patch {
        reinplace "s|__PREFIX__|${prefix}|" pync/TerminalNotifier.py
    }

    livecheck.type      none
}