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

name                py-apsw
github.setup        rogerbinns apsw 3.31.1-r1
revision            0

platforms           darwin
license             zlib
maintainers         nomaintainer

description         Another Python SQLite wrapper
long_description    APSW is a Python wrapper for the SQLite embedded relational database engine.

checksums           rmd160  fa6aa67333c8b15c8efc86198ebae77484662d40 \
                    sha256  1bef78e18d396506eb0149d86119f3451c586adbc72466262e0c754781823340 \
                    size    308278

python.versions     27 35 36 37 38

if {${name} ne ${subport}} {
    depends_lib-append \
                    port:sqlite3

    pre-test {
        test.env    PYTHONPATH=[glob -nocomplain ${worksrcpath}/build/lib*]
    }

    test.run        yes
    test.cmd        ${python.bin} setup.py
    test.target     test

    post-destroot {
        xinstall -m 0755 -d ${destroot}${prefix}/share/doc/${subport}
        xinstall -m 0644 -W ${worksrcpath} LICENSE README.rst \
                ${destroot}${prefix}/share/doc/${subport}
    }

    livecheck.type  none
}
