# -*- 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 100726 2012-12-21 08:44:31Z stromnov@macports.org $ PortSystem 1.0 PortGroup python 1.0 PortGroup select 1.0 set realname ipython name py-${realname} version 0.13 revision 1 categories python license BSD platforms darwin supported_archs noarch maintainers akitada openmaintainer 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.org master_sites http://archive.ipython.org/release/${version} distname ${realname}-${version} checksums rmd160 3ef3a81fe7aa3aa5512eb56ee9a748ac3749a805 \ sha256 a435cc21921817bdeb5ed91e406fc58f8af1d44f8208dd8a4bc691c9c48d3a19 python.versions 24 25 26 27 31 32 33 subport py24-${realname} { version 0.9.1 revision 4 master_sites http://archive.ipython.org/release/${version} distname ${realname}-${version} checksums md5 8a1bd1a9be272f4ddf4de99e5c1ad0dc \ sha1 2d069416b31ed03eb1cad36f84ef2337362ac6a9 \ rmd160 3d522f80290caa72e1c4fc60b2d56369c8c66eba } subport py25-${realname} { version 0.10.2 revision 2 master_sites http://archive.ipython.org/release/${version} distname ${realname}-${version} checksums md5 dda59bfc6e256ce786c4bc4aadb220a4 \ sha1 d45b97b0f458fd517cb2bfa9ebb3c671c46a21c0 \ rmd160 365a4eb9b534df1a9aa8717f173e9a032224ea01 } if {$subport != "py31-${realname}" && $subport != "py32-${realname}" && $subport != "py33-${realname}" && $subport != $name} { variant scientific description "Use ScientificPython to provide physical quantities support" { depends_lib-append port:py${python.version}-scientific } default_variants +scientific } if {$subport == "py26-${realname}" || $subport == "py27-${realname}"} { variant parallel description "Support for parallel computing" { depends_lib-append port:py${python.version}-zmq } variant pyqt4 conflicts pyside requires parallel description "Support for the Qt console using pyqt4" { depends_lib-append port:py${python.version}-pyqt4 \ port:py${python.version}-pygments } variant pyside conflicts pyqt4 requires parallel description "Support for the Qt console using pyside" { depends_lib-append port:py${python.version}-pyside \ port:py${python.version}-pygments } variant notebook requires parallel description "Support for IPython HTML notebook" { depends_lib-append port:py${python.version}-tornado } } if {$subport != $name} { post-destroot { if {$subport == "py24-${realname}"} { foreach f {ipython 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/${realname} ${destroot}${prefix}/share/doc/${subport} } elseif {$subport == "py25-${realname}"} { 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/${realname} ${destroot}${prefix}/share/doc/${subport} } elseif {$subport == "py26-${realname}" || $subport == "py27-${realname}"} { # Since IPython 0.13, the man pages are no longer gzipped, so to ensure # that ipython_select works correctly, we gzip the man pages. set gzip [findBinary gzip ${portutil::autoconf::gzip_path}] foreach f {ipcluster ipcontroller ipengine iplogger ipython irunner pycolor} { system "$gzip -9vf ${destroot}${python.prefix}/share/man/man1/${f}.1" file attributes ${destroot}${python.prefix}/share/man/man1/${f}.1.gz -permissions 00444 ln -s ${python.prefix}/share/man/man1/${f}.1.gz ${destroot}${prefix}/share/man/man1/${f}-${python.branch}.1.gz } depends_build-append port:gzip } elseif {$subport == "py31-${realname}" || $subport == "py32-${realname}" || $subport == "py33-${realname}"} { # IPython does not appear to install man pages with Python 3. If this # works again in future, the man pages may have to be gzipped as for # Python 2.6 and 2.7. In addition, the man pages should be added back # to files/python31 and files/python32. # foreach f {ipcluster ipcontroller ipengine iplogger ipython irunner pycolor} { # ln -s ${python.prefix}/share/man/man1/${f}.1.gz ${destroot}${prefix}/share/man/man1/${f}3-${python.branch}.1.gz # } } } depends_lib-append port:py${python.version}-readline \ port:py${python.version}-distribute depends_run port:ipython_select test.run no select.group ${realname} select.file ${filespath}/${realname}${python.version} 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}] " } if {$subport == "py33-${realname}"} { # https://github.com/ipython/ipython/issues/2343 # It has been fixed for ipython > 0.13 patchfiles-append ipython33-version.diff } if {$subport == "py24-${realname}" || $subport == "py25-${realname}"} { livecheck.type none } else { livecheck.type regex livecheck.url http://pypi.python.org/packages/source/i/ipython/ livecheck.regex ${realname}-(\\d+(?:\\.\\d+)*) }