# -*- 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                git-review
version             2.4.0
revision            0
platforms           {darwin any}
license             Apache-2
categories          devel python
maintainers         {gmail.com:herby.gillot @herbygillot} \
                    openmaintainer
supported_archs     noarch

homepage            http://docs.openstack.org/infra/git-review

description         Tool to submit code to Gerrit

long_description    {*}${description}. ${name} is a command-line tool for \
                    Git / Gerrit to submit a change or to fetch an existing \
                    one.

checksums           rmd160  cbbf4a45f9265734cf1b9b5a6f09c0990461a6f3 \
                    sha256  a350eaa9c269a1fe3177a5ffd4ae76f2b604e1af122eb0de08ab07252001722a \
                    size    70859

python.default_version      312

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

depends_lib-append  \
                    port:py${python.version}-requests \
                    port:py${python.version}-six

test.run            yes
test.env            PYTHONPATH=${worksrcpath}/build/lib
test.cmd            ${python.bin} -m git_review.cmd --help

post-destroot {
    # Install manpages to the MacPorts system prefix instead of Python's prefix
    copy {*}[glob ${destroot}${python.prefix}/share/man/man1/*] \
        ${destroot}${prefix}/share/man/man1/

    # Remove generated man directories from Python prefix
    file delete -force ${destroot}${python.prefix}/share/man
}
