# -*- 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-dopamine-rl
version             3.1.10
revision            0
categories-append   devel
platforms           {darwin any}
license             Apache-2
maintainers         {ijackson @JacksonIsaac} openmaintainer
supported_archs     noarch

description         A framework for flexible Reinforcement Learning research

long_description    Dopamine is a research framework for fast \
                    prototyping of reinforcement learning \
                    algorithms. It aims to fill the need for a \
                    small, easily grokked codebase in which users \
                    can freely experiment with wild ideas \
                    (speculative research).

homepage            https://github.com/google/dopamine

distname            dopamine_rl-${version}

checksums           rmd160  16b0e3d6039feac08ddd712d6a1187c866cf5740 \
                    sha256  fb78e84a2791bee78de9fe6fbb404febe9153f971dbab4be37b33f42d1d24d12 \
                    size    81678

python.versions     39

if {${name} ne ${subport}} {
    depends_build-append \
                    path:bin/cmake:cmake

    depends_lib-append  \
                    port:py${python.version}-setuptools \
                    port:zlib

    # Fix permissions
    post-extract {
        fs-traverse d_or_f ${worksrcpath} {
            if { [file isfile ${d_or_f}] } {
                file attributes ${d_or_f} -permissions o+r
            } elseif { [file isdirectory ${d_or_f}] } {
                file attributes ${d_or_f} -permissions o+rx
            }
        }
    }
}
