# -*- 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-future
version             0.17.1
categories-append   devel
platforms           darwin
supported_archs     noarch
license             MIT

maintainers         {petr @petrrr} openmaintainer

description         Provides clean single-source support for Python 3 and 2
long_description    \
    The Python package future is the missing compatibility layer between \
    Python 3 and Python 2. It allows you to use a single, clean Python \
    3.x-compatible codebase to support both Python 3 and Python 2 with \
    minimal overhead. The futurize script aids in converting code from \
    either Python 2 or Python 3 to code compatible with both platforms.

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

checksums           rmd160  b61bd5644d24d2045feed1d3aaa983d74a0315bd \
                    sha256  67045236dcfd6816dc439556d009594abf643e5eb48992e36beac09c2ca659b8 \
                    size    829119

python.versions     27 34 35 36 37

if {${name} ne ${subport}} {
    depends_lib-append  port:py${python.version}-setuptools

    # Adding documentation
    post-destroot {
        set dest_doc ${destroot}${prefix}/share/doc/${subport}
        xinstall -d  ${dest_doc}
        xinstall -m 755 -W ${worksrcpath} \
            README.rst \
            LICENSE.txt \
                ${dest_doc}
        copy {*}[glob ${worksrcpath}/docs/*.py] ${dest_doc}
        copy {*}[glob ${worksrcpath}/docs/*.rst] ${dest_doc}
    }

    livecheck.type  none
}