# -*- 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           github 1.0
PortGroup           python 1.0

github.setup        libgit2 pygit2 1.21.0 v
github.tarball_from archive
name                py-pygit2
revision            0

categories-append   devel
license             {GPL-2 Permissive}
maintainers         {devans @dbevans} {mascguy @mascguy} openmaintainer
description         Python bindings for libgit2
long_description    Pygit2 is a set of Python bindings to the libgit2 shared \
                    library, libgit2 implements the core of Git.
homepage            https://www.pygit2.org/

checksums           rmd160  d5f503ffa3878e5d600ab02cf10213904c2953cd \
                    sha256  d2e82fc3dfd50ade667728bac34618e70e7d66b49d573b32a67f50a15f05b44f \
                    size    927526

python.versions     311 312 313 314 315

if {${name} ne ${subport}} {
    # Patch to allow use of any setuptools version; see details in patch
    patchfiles-append \
                    patch-pyproj-setuptools.diff

    # https://trac.macports.org/ticket/66256
    compiler.blacklist-append \
                    *gcc-4.*

    depends_lib-append \
                    path:lib/pkgconfig/libgit2.pc:libgit2 \
                    port:py${python.version}-cffi

    test.run        yes

    depends_test-append \
                    port:py${python.version}-pytest \
                    port:py${python.version}-pytest-cov
}
