# -*- 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-srsly
epoch               1
# Don't upgrade past py-spaCy's highest supported version.
github.setup        explosion srsly 2.4.8 v
# Change github.tarball_from to 'releases' or 'archive' next update
github.tarball_from tarball
revision            0

checksums           rmd160  7cd493af5fbfa3b7f33967f56472f655bba50a4f \
                    sha256  5f6231c8735e2c537ed5c13884df61596f00762ca88362048aedeaa7c342f823 \
                    size    235404

license             MIT

maintainers         {jonesc @cjones051073} openmaintainer

description         Modern high-performance serialization utilities for Python
long_description    {*}${description}

python.versions     39 310 311 312

if {${name} ne ${subport}} {
    # Not yet compatible with Cython 3
    depends_build-append \
        port:py${python.version}-cython-compat
    set compat_path [string replace ${python.pkgd} 0 [string length ${python.prefix}]-1 ${prefix}/lib/py${python.version}-cython-compat]
    build.env-append    PYTHONPATH=${compat_path}

    depends_lib-append \
        port:py${python.version}-numpy

    # objToJSON.c:122: error: ‘TypeContext’ has no member named ‘longValue’
    compiler.blacklist-append \
                    *gcc-4.0 *gcc-4.2
}

# Exclude pre-release candidates
github.livecheck.regex {([0-9.]+)}
