# -*- 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 107890 2013-07-08 13:43:25Z stromnov@macports.org $

PortSystem          1.0
PortGroup           python 1.0
PortGroup           select 1.0

name                py-celery
version             3.0.21
revision            0
categories-append   devel
platforms           darwin
license             BSD
supported_archs     noarch

python.versions     26 27 32 33

maintainers         stromnov openmaintainer

description         Distributed Task Queue

long_description    Celery is an asynchronous task queue/job queue based \
                    on distributed message passing

homepage            http://celeryproject.org/
master_sites        http://pypi.python.org/packages/source/c/celery/

distname            celery-${version}

checksums           rmd160  4ac70f27757d2de313bc0e8e61d7f85171a083f2 \
                    sha256  c1a76a94ba0d766630678df4912e211dc916f73143a189f8a6e37148ad2ffa53

if {$subport != $name} {
    # celery depends on pkg_resources from setuptools
    depends_lib-append  port:py${python.version}-setuptools \
                        port:py${python.version}-kombu \
                        port:py${python.version}-anyjson \
                        port:py${python.version}-billiard \
                        port:py${python.version}-amqp

    depends_run-append  port:celery_select

    select.group        celery
    select.file         ${filespath}/py${python.version}-celery

    notes "
To make the Python ${python.branch} version of py-celery the one that is run\
when you execute the commands without a version suffix, e.g. 'celeryd' or\
'celeryctl', run:

port select --set ${select.group} [file tail ${select.file}]
"

    livecheck.type      none
} else {
    livecheck.type      regex
    livecheck.url       ${master_sites}
    livecheck.regex     "celery-(\\d+(?:\\.\\d+)*)${extract.suffix}"
}
