# -*- 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-backports.weakref
version             1.0.post1
revision            1
platforms           darwin
supported_archs     noarch
license             PSF
maintainers         {emcrisostomo @emcrisostomo} openmaintainer

description         Backport of new features in Python's weakref module
long_description    ${description}

homepage            https://github.com/pjdelport/backports.weakref
master_sites        pypi:b/backports.weakref
distname            backports.weakref-${version}

checksums           rmd160 348aceddeb8e58622ffffe3983fae82101bc39c6 \
                    sha256 bc4170a29915f8b22c9e7c4939701859650f2eb84184aee80da329ac0b9825c2 \
                    size   10574

python.versions     27

if {${name} ne ${subport}} {

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

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

    post-destroot {
        foreach f {__init__.py __init__.pyc __init__.pyo __pycache__} {
            set fp "${destroot}${python.pkgd}/backports/$f"
            if {[file exists ${fp}]} {
                file delete -force ${fp}
            }
        }
    }

    livecheck.type      none
}