# -*- 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-cython-compat
python.rootname     Cython
version             0.29.37
categories-append   devel
license             Apache-2

python.versions     27 310 311 312

maintainers         {jmr @jmroot} openmaintainer

description         Older version of Cython for compatibility

long_description    This is an older version of Cython for the use of \
                    ports that are not compatible with the current \
                    version as provided by the py-cython port.

homepage            http://www.cython.org/

dist_subdir         py-cython
checksums           md5 d9a1e8416f2278857a189347858ed9d0 \
                    rmd160 01c3b60adadde9c16d961b9e907f9089a7b3ed4c \
                    sha256 f813d4a6dd94adee5d4ff266191d1d95bf6d4164a4facc535422c021b2504cfb

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

    # https://github.com/macports/macports-ports/commit/760996927a0a2b5c0d9871670155d64f840dff8e#commitcomment-74373855
    compiler.blacklist-append *gcc-3.* *gcc-4.*

    if {${python.pep517}} {
        destroot.args   --prefix ${prefix}/lib/${subport}
    } else {
        destroot.destdir    --prefix=${prefix}/lib/${subport} --root=${destroot}
    }

    livecheck.type      none
}

livecheck.url https://pypi.org/simple/Cython/
livecheck.regex {(0\.[0-9]+\.[0-9]+)}
