# -*- 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

set _name           PyJWT
set _n              [string index ${_name} 0]

name                py-jwt
version             1.5.3
categories-append   security
platforms           darwin
supported_archs     noarch
license             MIT
maintainers         {petr @petrrr} openmaintainer

description         JSON Web Token implementation in Python
long_description    ${description}

homepage            https://pypi.python.org/pypi/${_name}/${version}
master_sites        pypi:${_n}/${_name}/
distname            ${_name}-${version}

checksums           md5     739494379f582ca98c89fb7ac229915b \
                    rmd160  276a1f712de978422ad64772abd3d3e55a07186c \
                    sha256  500be75b17a63f70072416843dc80c8821109030be824f4d14758f114978bae7

python.versions     27 34 35 36 37

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


    livecheck.type  none
} else {
    livecheck.type  regex
    livecheck.url   https://pypi.python.org/pypi/${_name}/json
    livecheck.regex "\"${_name}-(\[.\\d\]+)\\.tar\\.gz\""
}