# -*- coding: utf-8; mode: tcl; tab-width: 4; truncate-lines: t; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:et:sw=4:ts=4:sts=4
# $Id: Portfile 79391 2011-06-12 17:03:49Z singingwolfboy@macports.org $

PortSystem              1.0
PortGroup               python25 1.0
PortGroup               select 1.0

name                    py25-ipython
set my_name             ipython
version                 0.10.2
revision                0
categories              python
platforms               darwin
maintainers             nomaintainer
supported_archs         noarch

description             An enhanced Interactive Python shell
long_description        Provide an interactive shell superior to Python's default. \
                        Serve as an embeddable, ready to use interpreter for your own programs. \
                        Offer a flexible framework which can be used as the base environment for \
                        other systems with Python as the underlying language.  \
                        Allow interactive testing of threaded graphical toolkits.

homepage                http://ipython.scipy.org/
master_sites            ${homepage}dist/
distname                ${my_name}-${version}
checksums               md5     dda59bfc6e256ce786c4bc4aadb220a4 \
                        sha1    d45b97b0f458fd517cb2bfa9ebb3c671c46a21c0 \
                        rmd160  365a4eb9b534df1a9aa8717f173e9a032224ea01

use_parallel_build      yes

depends_run             port:ipython_select

test.run                no

post-destroot {
    foreach f {ipcluster ipcontroller ipengine iptest ipython ipython-wx ipythonx irunner pycolor} {
        move ${destroot}${prefix}/bin/${f} ${destroot}${prefix}/bin/${f}${python.branch}
    }
    foreach f {ipcluster ipcontroller ipengine ipython ipython-wx ipythonx irunner pycolor} {
        move ${destroot}${prefix}/share/man/man1/${f}.1.gz \
            ${destroot}${prefix}/share/man/man1/${f}${python.branch}.1.gz
    }
    move ${destroot}${prefix}/share/doc/${my_name} ${destroot}${prefix}/share/doc/${name}
}

select.group            $my_name
select.file             ${filespath}/${my_name}[string map {. ""} ${python.branch}]

notes \
"To make the Python ${python.branch} version of IPython the one that is run
when you execute the commands without a version suffix, e.g. 'ipython',
run:
    port select --set ${select.group} [file tail ${select.file}]"

variant scientific description "Use ScientificPython to provide physical quantities support" {
    depends_lib-append      port:py25-scientific
}

default_variants        +scientific

livecheck.type          regex
livecheck.url           ${master_sites}?C=M&O=D
livecheck.regex         ${my_name}-(\\d+(?:\\.\\d+)*)
