# -*- 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.0.1
revision            0
epoch               1

categories-append   lang
platforms           darwin
supported_archs     noarch
maintainers         {snc @nerdling} 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  a753503d9042e9a32943504aa5e876178c2e6e60 \
                    sha256  84196357aa3566d64ad123d7a3c67b0e597a115c4934b097580e5ce220b91531 \
                    size    876312

python.versions     27 35 36 37 38 39 310

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

    if {${python.version} <= 35} {
        version     2.4.7
        checksums   rmd160  2dbbca645985bb7f4b4d7a36b6ba3958302adfb9 \
                    sha256  c203ec8783bf771a155b207279b9bccb8dea02d8f0c9e5f8ead507bc3246ecc1 \
                    size    649718
    }

    test.run        yes
    test.cmd        ${python.bin} -m unittest
    test.target
    test.env        PYTHONPATH=${worksrcpath}/build/lib

    livecheck.type  none
}
