# -*- 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-jsonpickle
version             2.0.0
revision            0

categories-append   textproc
platforms           darwin
supported_archs     noarch
license             BSD
maintainers         nomaintainer

description         Python library for serializing any arbitrary \
                    object graph into JSON.
long_description    ${description} It can take almost any Python \
                    object and turn the object into JSON. Additionally, \
                    it can reconstitute the object back into Python.

homepage            https://jsonpickle.github.com

checksums           rmd160  864a0b871cf6d73243d8ad53c27171407ec9fe3a \
                    sha256  0be49cba80ea6f87a168aa8168d717d00c6ca07ba83df3cec32d3b30bfe6fb9a \
                    size    110336

python.versions     37 38 39

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

    post-destroot {
        set docdir ${prefix}/share/doc/${subport}
        xinstall -d ${destroot}${docdir}
        xinstall -m 0644 -W ${worksrcpath} README.rst CHANGES.rst \
            LICENSE ${destroot}${docdir}
    }

    if {${python.version} < 38} {
        depends_build-append \
                    port:py${python.version}-importlib-metadata
    }

    depends_test-append \
                    port:py${python.version}-pytest

    test.run        yes
    test.cmd        py.test-${python.branch}
    test.args       -o addopts=''
    test.target
    test.env        PYTHONPATH=${worksrcpath}/build/lib

    livecheck.type  none
}
