# -*- 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           bitarray
set _n              [string index ${_name} 0]

name                py-${_name}
version             0.8.1
categories-append   math
platforms           darwin

maintainers         {petr @petrrr} openmaintainer

license             PSF

description         A efficient implementation of arrays of booleans

long_description    \
    This module provides an object type which efficiently represents an array \
    of booleans. Bitarrays are sequence types and behave very much like usual \
    lists. Eight bits are represented by one byte in a contiguous block of \
    memory. The user can select between two representations: little-endian \
    and big-endian. Most of the functionality is implemented in C. \
    Methods for accessing the machine representation are provided.

homepage            https://github.com/ilanschnell/${_name}

distname            ${_name}-${version}
master_sites        pypi:${_n}/${_name}/

checksums           md5     3825184f54f4d93508a28031b4c65d3b \
                    rmd160  58c2a2665c2759f23bf1ab096de8c34bf7fcfcbb \
                    sha256  7da501356e48a83c61f479393681c1bc4b94e5a34ace7e08cb29e7dd9290ab18

python.versions     27 34 35 36

livecheck.type      none

if {${name} ne ${subport}} {
    depends_build         port:py${python.version}-setuptools
} else {
    livecheck.type      regex
    livecheck.url   https://pypi.python.org/pypi/${_name}/json
    livecheck.regex "\"${_name}-(\[.\\d\]+)\\${extract.suffix}\""
}