# -*- 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
# $Id: Portfile 119966 2014-05-12 10:21:45Z stromnov@macports.org $

PortSystem          1.0
PortGroup           python 1.0
PortGroup           github 1.0

github.setup        paramiko paramiko 1.14.0 v

# paramiko 1.12+ requires py-ecdsa (available only for py27 subport)
if {[lsearch {"py24-paramiko" "py25-paramiko" "py26-paramiko"} ${subport}] != -1} {
    github.setup        paramiko paramiko 1.11.2 v
}

name                py-paramiko
categories-append   net security
platforms           darwin
license             LGPL-2.1+
supported_archs     noarch

python.versions     24 25 26 27 33 34

maintainers         stromnov openmaintainer

description         Native Python SSHv2 protocol library

long_description    This is a library for making SSH2 connections (client \
                    or server).  Emphasis is on using SSH2 as an alternative \
                    to SSL for making secure connections between python \
                    scripts.  All major ciphers and hash methods are \
                    supported.  SFTP client and server mode are both \
                    supported too.

checksums           rmd160  a45fe51106ea6b8803dc494f319c3536734eddfe \
                    sha256  9373597b508f6a485e5808014832eaee0242469242f09e4f4a96fe2aa31136ae

if {${name} ne ${subport}} {
    if {${name} ne ${subport} && [lsearch {24 25 26} ${python.version}] != -1} {
        checksums           rmd160  b5a2ffbc616d4e15b1633ca8aa8fdd471c44834b \
                            sha256  0e68b55bf7e4ee252a9fc0798db827b9235c44e5fff7f6db932300a60258e732
    } else {
        depends_lib-append  port:py${python.version}-ecdsa
    }

    depends_lib-append  port:py${python.version}-crypto
    livecheck.type      none
}
