# -*- 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
# $Id: Portfile 117782 2014-03-12 20:06:07Z macsforever2000@macports.org $

PortSystem          1.0
PortGroup           python 1.0

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

name                py-${_name}
version             1.2.7
categories-append   net parallel
platforms           darwin
supported_archs     noarch
license             MIT

maintainers         bo.ingv.it:Peter.Danecek openmaintainer

description         Easy to use object-oriented thread pool framework

long_description    \
    A thread pool is an object that maintains a pool of worker threads to \
    perform time consuming operations in parallel. It assigns jobs to the \
    threads by putting them in a work request queue, where they are picked \
    up by the next available thread. This then performs the requested \
    operation in the background and puts the results in another queue.

homepage            http://chrisarndt.de/projects/${_name}/

use_bzip2           yes
distname            ${_name}-${version}
master_sites        http://chrisarndt.de/projects/${_name}/download/ \
                    https://pypi.python.org/packages/source/${_n}/${_name}/

checksums           md5     e1d5a4f73440ed701dfd0b3eb0d9c1ca \
                    rmd160  9bcc55d7c800996ce953d73702d42f9ced90eb65 \
                    sha256  538539b3783acc7f7b2bbb5611bd66e98e5026ae665f014e8bd5da19dbb55acf

python.versions     26 27

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

    # Adding documentation
    post-destroot {
        set dest_doc ${destroot}${prefix}/share/doc/${subport}
        xinstall -d  ${dest_doc}
        eval xinstall -m 755 [ glob ${worksrcpath}/*.txt ] ${dest_doc}
        copy ${worksrcpath}/doc ${dest_doc}/html
    }

    livecheck.type  none
} else {
    livecheck.type      regex
    livecheck.url       [lindex ${master_sites} 0]
    livecheck.regex     ">${_name}-(\\d+\\.\\d+\\.\\d+)\\${extract.suffix}<"
}
