# -*- 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-pyzstd
version             0.16.2
revision            0

license             BSD
maintainers         nomaintainer

description         Python bindings to Zstandard (zstd) compression library, the API is similar to Python's bz2/lzma/zlib module.
long_description    ${description}

homepage            https://github.com/animalize/pyzstd

checksums           rmd160  65054a36c6416e8ca7db9a9f209d943da9c370f2 \
                    sha256  179c1a2ea1565abf09c5f2fd72f9ce7c54b2764cf7369e05c0bfd8f1f67f63d2 \
                    size    789505

patchfiles-append   patch-setuptools_no_version.diff

python.versions     39 310 311 312 313

if {${name} ne ${subport}} {
    # https://github.com/Rogdham/pyzstd/issues/22
    if {[string match *gcc-4.* ${configure.compiler}]} {
        patchfiles-append \
                    patch-no-flto.diff
    }

    test.run        yes
}
