# -*- 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-theano-pymc
python.rootname     Theano-PyMC
version             1.1.2
revision            0

categories-append   devel
platforms           darwin
supported_archs     noarch
license             BSD
maintainers         {reneeotten @reneeotten} openmaintainer

description         Optimizing compiler for evaluating mathematical expressions on CPUs and GPUs.
long_description    ${description}

homepage            https://github.com/pymc-devs/Theano-PyMC

checksums           rmd160  b5b36cbda77dada32128025796350809c132e97c \
                    sha256  5da6c2242ea72a991c8446d7fe7d35189ea346ef7d024c890397011114bf10fc \
                    size    1810180

python.versions     36 37 38 39

if {${name} ne ${subport}} {
    if {${python.version} in "36 37 38"} {
        conflicts       py${python.version}-theano
    }

    depends_build-append \
                    port:py${python.version}-filelock \
                    port:py${python.version}-numpy \
                    port:py${python.version}-scipy \
                    port:py${python.version}-setuptools

    if {${python.version} == 36} {
        version     1.0.11
        revision    0
        checksums   rmd160  261d19d27852c2fcc69544ea99c009eec4cd2f1a \
                    sha256  1fcf4df33e2310f76f34fc50ee8932cdbe501064774ec4577a471d0a6cc0cb28 \
                    size    2776793

        depends_build-delete \
                    port:py${python.version}-filelock
    }

    # move "tests" inside "theano" directory, remove "bin" directory
    post-destroot {
        file delete -force ${destroot}${python.pkgd}/bin
        file copy ${destroot}${python.pkgd}/tests ${destroot}${python.pkgd}/theano
        file delete -force ${destroot}${python.pkgd}/tests
    }

    livecheck.type  none
}
