# -*- 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

set _name           ipython-sql
set _n              [string index ${_name} 0]

name                py-${_name}
version             0.3.8
categories-append   databases
platforms           darwin
supported_archs     noarch
license             MIT

maintainers         {petr @petrrr} openmaintainer

description         RDBMS access via %%sql magic for IPython

long_description    \
    Introduces a %sql (or %%sql) magic. \
    Connect to a database, using SQLAlchemy connect strings, then issue SQL \
    commands within IPython or IPython Notebook.

homepage            https://github.com/catherinedevlin/ipython-sql

distname            ${_name}-${version}
master_sites        pypi:${_n}/${_name}/

checksums           md5     89080b1bd4f383006a07164673af5d0d \
                    rmd160  a38ae486a8844cbb8568d0f01a494fbee110c1ba \
                    sha256  62f3689f4e2b4071eb9fd743386f358bfca8f76c942d50abf306914580fc149d

python.versions     27 34 35 36

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

    depends_lib-append      port:py${python.version}-ipython \
                            port:py${python.version}-ipython_genutils \
                            port:py${python.version}-prettytable \
                            port:py${python.version}-sqlalchemy \
                            port:py${python.version}-sqlparse \
                            port:py${python.version}-six

    livecheck.type  none
} else {
    livecheck.type  regex
    livecheck.url   https://pypi.python.org/pypi/${_name}/json
    livecheck.regex "\"${_name}-(\[.\\d\]+)\\${extract.suffix}\""
}