# -*- 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             4.0.2
revision            0

categories-append   devel
platforms           darwin
license             BSD
maintainers         {mps @Schamschula} openmaintainer
description         Python binding for xxHash
long_description    {*}${description}
homepage            https://github.com/ifduyue/python-xxhash

checksums           rmd160  f72d3c35661f7e0e335a8cc124bbeac4f5c5d344 \
                    sha256  af3d1b3cfa5280e84d8968e9f30c9eca75781db4915eb6d6acb0dd4fc93e0f47 \
                    size    101549

python.versions     310 311 312 313 314 315

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
}
