# -*- 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-smart_open
version             4.2.0
revision            0
categories-append   textproc
platforms           darwin
license             MIT
supported_archs     noarch

python.versions     27 35 36 37 38 39

maintainers         {stromnov @stromnov} openmaintainer

description         Utils for streaming large files (S3, HDFS, gzip, bz2...)
long_description    ${description}

homepage            https://github.com/RaRe-Technologies/smart_open

checksums           rmd160  8bcf0038b0b9b9b26932ea33e16b3d7fbc534a0b \
                    sha256  d9f5a0f173ccb9bbae528db5a3804f57145815774f77ef755b9b0f3b4b2a9dcb \
                    size    119585

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

    if {${python.version} <= 35} {
        version             1.10.1
        revision            0
        distname            ${python.rootname}-${version}
        checksums           rmd160  83609eda4fa2bac442ca87a7b3c3ffd08fd2324c \
                            sha256  c1a65a9b59e2d76626d81c483180733feb763570224239e4ea9ffd836651b131 \
                            size    92788

        if {${python.version} eq 27} {
            depends_lib-append  port:py${python.version}-bz2file
        }

        depends_lib-append  port:py${python.version}-boto3 \
                            port:py${python.version}-requests
    }

    livecheck.type      none
}
