# $Id: Portfile 114324 2013-12-05 08:44:51Z ryandesign@macports.org $

PortSystem		1.0
PortGroup		python 1.0

name			py-recaptcha
version			1.0.6
maintainers		nomaintainer
description		Python recaptcha client
long_description	Provides a CAPTCHA for Python using the reCAPTCHA service. Does not require any \
			imaging libraries because the CAPTCHA is served directly from reCAPTCHA. Also \
			allows you to securely obfuscate emails with Mailhide. This functionality requires \
			pycrypto. This library requires two types of API keys. If you'd like to use the \
			CAPTCHA, you'll need a key from http://recaptcha.net/api/getkey. For Mailhide, you'll \
			need a key from http://mailhide.recaptcha.net/apikey
categories-append	graphics
license			MIT
platforms		darwin freebsd
supported_archs	noarch
homepage		http://pypi.python.org/pypi/recaptcha-client
master_sites		http://pypi.python.org/packages/source/r/recaptcha-client/
distname		recaptcha-client-${version}

checksums           md5     74228180f7e1fb76c4d7089160b0d919 \
                    sha1    661317355af7a2985c9011b6efa026b7178e9917 \
                    rmd160  7dffe66b7fd37f5be2a7d7b2bf24c3978f46c8e9

python.versions		25

if {${name} ne ${subport}} {
    depends_build       port:py${python.version}-setuptools
    depends_lib-append	port:py${python.version}-crypto
    post-destroot {
        xinstall -m 644 ${worksrcpath}/build/lib/recaptcha/__init__.py ${destroot}${python.pkgd}/recaptcha/
    }
    livecheck.type  none
} else {
    livecheck.type  regex
    livecheck.url   ${homepage}
    livecheck.regex "recaptcha-client&amp;version=(\\d+(\\.\\d+)*)"
}
