# -*- 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 116974 2014-02-11 17:58:09Z snc@macports.org $

PortSystem        1.0
PortGroup         python 1.0

name              py-memcached
version           1.53
python.versions     25 26 27 31 32 33 34
python.default_version 27
categories-append devel net
platforms         darwin
maintainers       akitada dh snc openmaintainer
license             psf
description       Pure python memcached client
long_description  This software is a 100% Python interface to the memcached \
                  memory cache daemon.  It is the client side software which \
                  allows storing values in one or more, possibly remote, \
                  memcached servers.  Search google for memcached for more \
                  information.

homepage          http://www.tummy.com/Community/software/python-memcached/
master_sites      ftp://ftp.tummy.com/pub/python-memcached/old-releases/

if {${name} ne ${subport}} {
    if {${python.version} > 27} {
        version 1.51
        master_sites        https://pypi.python.org/packages/source/p/python3-memcached/
        checksums           rmd160  b332ed7423eaa5fde3cf01a16584585622acd93e \
                            sha256  7cbe5951d68eef69d948b7a7ed7decfbd101e15e7f5be007dcd1219ccc584859

        distname          python3-memcached-${version}
    } else {
        checksums           rmd160  d353c699267c6f206606f70a812436eceaf8fe5b \
                            sha256  af04ea031b271a54f085166773e028fe053fc1d9a58cd8b3c3a57945990bfb48

        distname          python-memcached-${version}
    }
    depends_build     port:py${python.version}-setuptools
    livecheck.type      none
} else {
    livecheck.type    regex
    livecheck.url     ${master_sites}
    livecheck.regex   "python-memcached-(\[0-9\](\\.\[0-9\]+)*)\\.tar\\.gz"
}
