# -*- 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
python.rootname     git_review
version             2.5.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  c2fd7d2c48873e5cde271d2d5029551aee8e4561 \
                    sha256  1bcffaef02848a5a3b066e8268c7d700a77cbd8b2e56b128d30f60cd431cf0a8 \
                    size    72645

python.default_version \
                    314

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
}
