# -*- 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-functools_lru_cache
python.rootname     backports.functools_lru_cache
version             1.6.4
revision            0

categories-append   devel
platforms           {darwin any}
supported_archs     noarch
license             MIT
maintainers         nomaintainer

description         Backport of functools.lru_cache from Python 3.3 as \
                    published at ActiveState \
                    (https://code.activestate.com/recipes/578078/)
long_description    ${description}

homepage            https://github.com/jaraco/backports.functools_lru_cache

checksums           rmd160  95f61231a30fb7fafb438b08b0a5da9790f696a1 \
                    sha256  d5ed2169378b67d3c545e5600d363a923b09c456dab1593914935a68ad478271 \
                    size    13904

python.versions     27

if {${name} ne ${subport}} {
    depends_build-append \
                    port:py${python.version}-setuptools \
                    port:py${python.version}-setuptools_scm \
                    port:py${python.version}-toml

    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}
            }
        }
    }

    test.run        yes
}
