# -*- 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-six
version             1.16.0
revision            0

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

maintainers         nomaintainer

description         ${name} is a Python 2 and 3 compatibility library.
long_description    {*}${description} It provides utility functions for smoothing\
                    over the differences between the Python versions with the goal\
                    of writing Python code that is compatible on both Python versions.

homepage            https://pypi.python.org/pypi/six/

checksums           rmd160  ad79fa25e141856d4a384c4b2476f7e41a91ba98 \
                    sha256  1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926 \
                    size    34041

# keep version for PY27 and PY34, these are (indirect) dependencies of py-virtualenv
python.versions     27 34 35 36 37 38 39 310 311

if {${name} ne ${subport}} {
    depends_test-append \
                port:py${python.version}-pytest

    test.run    yes
    test.cmd    py.test-${python.branch}
    test.target
    test.env    PYTHONPATH=${worksrcpath}/build/lib

    # do not want to re-add py34-pytest and all its (recursive) depencies
    if {${python.version} == 34} {
        depends_test
        test.run        no
    }

    post-destroot {
        set docdir ${prefix}/share/doc/${subport}
        xinstall -d ${destroot}${docdir}
        xinstall -m 0644 -W ${worksrcpath} README.rst LICENSE CHANGES \
            ${destroot}${docdir}
    }

    livecheck.type  none
}
