# -*- 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-parsing
python.rootname     pyparsing
version             3.2.3
revision            0
epoch               2

categories-append   lang
platforms           {darwin any}
supported_archs     noarch
maintainers         {reneeotten @reneeotten} openmaintainer
license             MIT

description         alternative approach to creating parsers in python

long_description    The parsing module is an alternative approach to creating \
                    and executing simple grammars, vs. the traditional \
                    lex/yacc approach, or the use of regular expressions. The \
                    parsing module provides a library of classes that client \
                    code uses to construct the grammar directly in Python code.

homepage            https://github.com/pyparsing/pyparsing/

checksums           rmd160  d290b94d5af269eee949593e03fc3f157b1be673 \
                    sha256  b9c13f1ab8b3b542f72e28f634bad4de758ab3ce4546e4301970ad6fa77c38be \
                    size    1088608

python.versions     27 35 36 37 38 39 310 311 312 313

if {${name} ne ${subport}} {
    if {${python.version} <= 35} {
        version     2.4.7
        checksums   rmd160  2dbbca645985bb7f4b4d7a36b6ba3958302adfb9 \
                    sha256  c203ec8783bf771a155b207279b9bccb8dea02d8f0c9e5f8ead507bc3246ecc1 \
                    size    649718
        depends_build-append \
                    port:py${python.version}-setuptools
    } else {
        if {${python.version} <= 38} {
            version     3.1.4
            checksums   rmd160  b9c5d15d75f99c63de72dd620b5e4921a88a8aeb \
                        sha256  f86ec8d1a83f11977c9a6ea7598e8c27fc5cddfa5b07ea2241edbbde1d7bc032 \
                        size    900231
        }

        python.pep517   yes
        python.pep517_backend   flit
    }

    if {${python.version} == 36} {
        # break circular dependency with py36-build
        python.add_dependencies no
        depends_build-append   port:py36-bootstrap-modules
        depends_lib-append     port:python${python.version}
        build.env-append    PYTHONPATH=${prefix}/share/py36-bootstrap-modules
        build.args      --skip-dependency-check
        destroot.env-append PYTHONPATH=${prefix}/share/py36-bootstrap-modules
    }

    test.run        yes
    python.test_framework unittest

    livecheck.type  none
}