# -*- 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-hiredis
version             2.0.0
revision            0
categories-append   devel databases
platforms           darwin
license             BSD

python.versions     27 35 36 37 38 39

maintainers         {stromnov @stromnov} openmaintainer

description         Python wrapper for hiredis
long_description    ${description}

homepage            https://github.com/pietern/hiredis-py

checksums           rmd160  692aa3121ccc11cfd8234c271c799b027a9816c7 \
                    sha256  81d6d8e39695f2c37954d1011c0480ef7cf444d4e3ae24bc5e89ee5de360139a \
                    size    75807

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

    if {${python.version} <= 35} {
        version             1.1.0
        revision            0
        distname            ${python.rootname}-${version}
        checksums           rmd160  7cdfd9925fcdeae6895c54a3feb37b11d71d7e0f \
                            sha256  996021ef33e0f50b97ff2d6b5f422a0fe5577de21a8873b58a779a5ddd1c3132 \
                            size    54620
    }

    pre-test {
        test.env    PYTHONPATH=[glob -nocomplain ${worksrcpath}/build/lib*]
    }

    test.run        yes
    test.cmd        ${python.bin} test.py
    test.target

    livecheck.type  none
}
