# -*- 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 114324 2013-12-05 08:44:51Z ryandesign@macports.org $

PortSystem              1.0
PortGroup               python 1.0

name                    py-cssselect
version                 0.8
categories-append       devel
platforms               darwin
supported_archs         noarch
license                 BSD
maintainers             nomaintainer

description             cssselect parses CSS3 Selectors and translates \
                        them to XPath 1.0

long_description        cssselect parses CSS3 Selectors and translates \
                        them to XPath 1.0 expressions. Such expressions \
                        can be used in lxml or another XPath engine to \
                        find the matching elements in an XML or HTML \
                        document.

homepage                http://packages.python.org/cssselect/
master_sites            http://pypi.python.org/packages/source/c/cssselect/
distname                cssselect-${version}

checksums               rmd160  09efd81eeced64438839ccce4fd4315a4a3b7763 \
                        sha256  792478c4405b90e28781e694d8b8bae00a234b557b9fac3c93082b938d313bbe

python.versions         25 26 27 31 32 33

if {${name} ne ${subport}} {
    depends_build-append    port:py${python.version}-setuptools
    post-destroot {
        xinstall -m 644 -W ${worksrcpath} \
            AUTHORS CHANGES LICENSE README.rst \
            ${destroot}${prefix}/share/doc/${subport}
    }
    livecheck.type      none
} else {
    livecheck.type      regex
    livecheck.url       ${master_sites}
    livecheck.regex     "cssselect-(\\d+(?:\\.\\d+)*)${extract.suffix}"
}
