# -*- 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

PortSystem          1.0
PortGroup           python 1.0

name                py-google-api
set realname        google-api-python-client
version             1.6.7

python.versions     27 34 35 36 37

categories-append   www devel
maintainers         nomaintainer
license             Apache-2 MIT
description         client library for accessing the Plus, Moderator, and many \
                    other Google APIs
long_description    ${description}

platforms           darwin
supported_archs     noarch

homepage            https://pypi.python.org/pypi/${realname}
master_sites        pypi:g/${realname}/
distname            ${realname}-${version}

checksums           rmd160  d50870fbecb85b293d85cea4952f51b3195bad06 \
                    sha256  05583a386e323f428552419253765314a4b29828c3cee15be735f9ebfa5aebf2 \
                    size    51899

if {${name} ne ${subport}} {
    depends_build           port:py${python.version}-setuptools
    depends_lib-append      port:py${python.version}-httplib2 \
                            port:py${python.version}-six \
                            port:py${python.version}-uritemplate \
                            port:py${python.version}-oauth2client

    post-destroot {
        delete ${destroot}${python.pkgd}/uritemplate
        delete ${destroot}${python.pkgd}/oauth2client

        set egg-info ${destroot}${python.pkgd}/google_api_python_client-${version}-py${python.branch}.egg-info
        foreach d [glob -dir ${egg-info} *] {
            file attributes ${d} -permissions 0644
        }

        xinstall -d -m 555 ${destroot}${prefix}/share/examples
    }
    livecheck.type  none
} else {
    livecheck.type      pypi
    livecheck.name      ${realname}
}