# -*- 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 120118 2014-05-16 06:50:47Z stromnov@macports.org $

PortSystem          1.0
PortGroup           python 1.0

name                py-webob
set real_name       WebOb
version             1.4
revision            0
categories-append   www
platforms           darwin
license             MIT
supported_archs     noarch

python.versions     25 26 27 33 34

maintainers         stromnov openmaintainer

description         WSGI request and response object.

long_description    WebOb provides wrappers around the WSGI request \
                    environment, and an object to help create WSGI responses. \
                    \
                    The objects map much of the specified behavior of HTTP, \
                    including header parsing and accessors for other standard \
                    parts of the environment.

homepage            http://webob.org/
master_sites        https://pypi.python.org/packages/source/W/${real_name}/

distname            ${real_name}-${version}

checksums           rmd160  fcbc4baa8b06ab4c61cc39cfb7eecf506a997745 \
                    sha256  0819838204e2a6823e42bf2227898fdf3f306f7619bf328e25855a0d1ca20399

if {${name} ne ${subport}} {
    if {${python.version} == 25} {
        version             1.1.1
        revision            0
        distname            ${real_name}-${version}
        use_zip             yes
        checksums           rmd160 39284620aee3dc7e4063fb36a6298f25d3d7d6e9 \
                            sha256 21f3a2ecea66129b20ba757fafa087af8ba85e413c77972accdeb56a50f1eff6
    } elseif {${python.version} == 26} {
        version             1.2.3
        revision            0
        distname            ${real_name}-${version}
        checksums           rmd160  d97a2c3fdef966ee59179665ed87b5873a112a23 \
                            sha256  325c249f3ac35e72b75ba13b2c60317def0c986a24a413ebf700509ea4c73a13
    }

    depends_build       port:py${python.version}-setuptools

    livecheck.type      none
} else {
    livecheck.type      regex
    livecheck.url       ${master_sites}
    livecheck.regex     {WebOb-(\d+(?:\.\d+)*)\.[tz]}
}
