# -*- 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-rpy2
version             3.3.5
revision            0
categories-append   science
platforms           darwin
license             {MPL-1.1 LGPL-2.1+}

python.versions     27 35 36 37 38

maintainers         {stromnov @stromnov} openmaintainer

description         A simple and efficient access to R from Python

long_description    rpy2 is a redesign and rewrite of rpy. It is providing a \
                    low-level interface to R, a proposed high-level interface, \
                    including wrappers to graphical libraries, as well as R-like \
                    structures and functions.

homepage            http://rpy.sourceforge.net/rpy2.html

checksums           rmd160  b9af4796f7dfebede41abef1b2387f2a1c5a4169 \
                    sha256  d2b1fb0e22924b08ba11acf07b93cec1842296c005e142834008bba25b3643af \
                    size    174054

if {${name} ne ${subport}} {
    depends_lib-append  port:py${python.version}-cffi \
                        port:py${python.version}-pytest \
                        port:py${python.version}-jinja2 \
                        port:py${python.version}-tz \
                        port:py${python.version}-simplegeneric \
                        port:py${python.version}-tzlocal

    if {${python.version} eq 27} {
        version             2.8.6
        revision            0

        distname            ${python.rootname}-${version}

        checksums           rmd160  0ff07cd76a5b9d0b109651b785de9f5f276121d4 \
                            sha256  004d13734a7b9a85cbc1e7a93ec87df741e28db1273ab5b0d9efaac04a9c5f98 \
                            size    191192

        depends_lib-append  port:py${python.version}-singledispatch \
                            port:py${python.version}-six

        depends_lib-delete  port:py${python.version}-cffi \
                            port:py${python.version}-pytest \
                            port:py${python.version}-jinja2 \
                            port:py${python.version}-simplegeneric
    }

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

    # To continue using your custom R installation instead of MacPorts' R,
    # you have to remove this dependency line and make sure that your R
    # is in MacPorts' binpath, see your macports.conf for details.
    depends_lib-append  port:R

    livecheck.type      none
}

subport py35-${python.rootname} {
    replaced_by py36-${python.rootname}
    PortGroup obsolete 1.0
}
