# -*- 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           github 1.0
PortGroup           python 1.0

set real_name       param
name                py-${real_name}
github.setup        pyviz ${real_name} 1.9.2 v
revision            1
license             BSD
maintainers         {mps @Schamschula} openmaintainer
description         Param is a library providing Parameters.
long_description    ${description}: Python attributes extended to have features such as \
                    type and range checking, dynamically generated values, documentation \
                    strings, default values, etc., each of which is inherited from \
                    parent classes if not specified in a subclass.
platforms           darwin

checksums           rmd160  a951ea9af28dc94c1a1b0aec56b8c837e08a8b1d \
                    sha256  5d754eadeae93352c16a1e0a561376c37dea8ce8ce37136d8e4f9f8a7dedc56c \
                    size    123639

python.versions     36 37 38

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

    post-destroot {
        move ${destroot}${python.prefix}/lib/python${python.branch}/site-packages/param-None-py${python.branch}.egg-info \
            ${destroot}${python.prefix}/lib/python${python.branch}/site-packages/param-${version}-py${python.branch}.egg-info

        reinplace "s|None|${version}|g" \
            ${destroot}${python.prefix}/lib/python${python.branch}/site-packages/param-${version}-py${python.branch}.egg-info/PKG-INFO \
            ${destroot}${python.prefix}/lib/python${python.branch}/site-packages/param/.version
    }
}

github.livecheck.regex  {(\d\.\d+(\.\d+)?(?!a))}