# -*- 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-hypy
python.rootname     Hypy
version             1.0.1
revision            0

categories-append   textproc
license             LGPL-2.1
maintainers         nomaintainer

description         Fulltext search interface for Python applications
long_description    Hypy is a fulltext search interface for Python \
                    applications. Use it to index and search your \
                    documents from Python code.

homepage            https://github.com/corydodt/Hypy

checksums           rmd160  e80e489f990c9cb01acb5ee22240c530aac08e9c \
                    sha256  706a8516835898d2f8d0260b49547b7d9b021f3825369f21d7c53edecfaaacf4 \
                    size    41140

python.versions     312

if {${name} ne ${subport}} {
    depends_lib-append \
                    port:py${python.version}-six \
                    port:hyperestraier

    patchfiles      patch-setup.py.diff
    post-patch {
       reinplace "s|@@PREFIX@@|${prefix}|g" ${worksrcpath}/setup.py
    }

    # test only work after installing the port first; likely due to the use
    # of pkg_resources in _version.py
    test.run        yes

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