# -*- 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-xxhash
version             3.4.1
categories-append   devel
platforms           darwin
license             BSD
maintainers         nomaintainer

description         Python binding for xxHash
long_description    {*}${description}

homepage            https://github.com/ifduyue/python-xxhash

checksums           rmd160  96dcf51c9bf1e0fa7bf2df170d9831469948af07 \
                    sha256  0379d6cf1ff987cd421609a264ce025e74f346e3e145dd106c0cc2e3ec3f99a9 \
                    size    84220

python.versions     39 310 311

if {${name} ne ${subport}} {
    depends_build-append \
                    port:py${python.version}-setuptools_scm

    depends_lib-append \
                    port:xxhashlib

    build.env-append \
                    XXHASH_LINK_SO=1

    pre-test {
        # See https://docs.pytest.org/en/stable/pythonpath.html
        delete ${test.dir}/${test.target}/__init__.py
    }

    test.run        yes
}
