source: trunk/dports/python/py-ipython/Portfile @ 100728

Last change on this file since 100728 was 100728, checked in by stromnov@…, 8 years ago

py-ipython: update to version 0.13.1

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 6.4 KB
Line 
1# -*- 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
2# $Id: Portfile 100728 2012-12-21 09:18:11Z stromnov@macports.org $
3
4PortSystem          1.0
5PortGroup           python 1.0
6PortGroup           select 1.0
7
8set realname        ipython
9
10name                py-${realname}
11version             0.13.1
12revision            0
13categories          python
14license             BSD
15platforms           darwin
16supported_archs     noarch
17
18maintainers         akitada openmaintainer
19
20description         An enhanced Interactive Python shell
21long_description    Provide an interactive shell superior to Python's default. \
22                    Serve as an embeddable, ready to use interpreter for your own programs. \
23                    Offer a flexible framework which can be used as the base environment for \
24                    other systems with Python as the underlying language.  \
25                    Allow interactive testing of threaded graphical toolkits.
26
27homepage            http://ipython.org
28master_sites        http://archive.ipython.org/release/${version}
29distname            ${realname}-${version}
30
31checksums           rmd160  9e798d6853064da4a10a807aac0980f14b35ab32 \
32                    sha256  3bbf1095c4fd1fbf0a0871d9e26571a1ce3c4113d83ee3b688fa58e7e917f8c0
33
34python.versions     24 25 26 27 31 32 33
35
36subport py24-${realname} {
37    version             0.9.1
38    revision            4
39    master_sites        http://archive.ipython.org/release/${version}
40    distname            ${realname}-${version}
41    checksums           md5     8a1bd1a9be272f4ddf4de99e5c1ad0dc \
42                        sha1    2d069416b31ed03eb1cad36f84ef2337362ac6a9 \
43                        rmd160  3d522f80290caa72e1c4fc60b2d56369c8c66eba
44}
45
46subport py25-${realname} {
47    version             0.10.2
48    revision            2
49    master_sites        http://archive.ipython.org/release/${version}
50    distname            ${realname}-${version}
51    checksums           md5     dda59bfc6e256ce786c4bc4aadb220a4 \
52                        sha1    d45b97b0f458fd517cb2bfa9ebb3c671c46a21c0 \
53                        rmd160  365a4eb9b534df1a9aa8717f173e9a032224ea01
54}
55
56if {$subport != "py31-${realname}" && $subport != "py32-${realname}" && $subport != "py33-${realname}" && $subport != $name} {
57    variant scientific description "Use ScientificPython to provide physical quantities support" {
58        depends_lib-append      port:py${python.version}-scientific
59    }
60    default_variants        +scientific
61}
62
63if {$subport == "py26-${realname}" || $subport == "py27-${realname}"} {
64    variant pyqt4 conflicts pyside requires parallel description "Support for the Qt console using pyqt4" {
65        depends_lib-append      port:py${python.version}-pyqt4 \
66                                port:py${python.version}-pygments
67    }
68    variant pyside conflicts pyqt4 requires parallel description "Support for the Qt console using pyside" {
69        depends_lib-append      port:py${python.version}-pyside \
70                                port:py${python.version}-pygments
71    }
72}
73
74if {$subport != "py24-${realname}" && $subport != "py25-${realname}"} {
75    variant parallel description "Support for parallel computing" {
76        depends_lib-append      port:py${python.version}-zmq
77    }
78    variant notebook requires parallel description "Support for IPython HTML notebook" {
79        depends_lib-append      port:py${python.version}-tornado
80    }
81}
82
83if {$subport != $name} {
84
85    post-destroot {
86        if {$subport == "py24-${realname}"} {
87            foreach f {ipython pycolor} {
88                move ${destroot}${prefix}/share/man/man1/${f}.1.gz \
89                     ${destroot}${prefix}/share/man/man1/${f}-${python.branch}.1.gz
90            }
91            move ${destroot}${prefix}/share/doc/${realname} ${destroot}${prefix}/share/doc/${subport}
92        } elseif {$subport == "py25-${realname}"} {
93            foreach f {ipcluster ipcontroller ipengine ipython ipython-wx ipythonx irunner pycolor} {
94                move ${destroot}${prefix}/share/man/man1/${f}.1.gz \
95                     ${destroot}${prefix}/share/man/man1/${f}-${python.branch}.1.gz
96            }
97            move ${destroot}${prefix}/share/doc/${realname} ${destroot}${prefix}/share/doc/${subport}
98        } elseif {$subport == "py26-${realname}" || $subport == "py27-${realname}"} {
99            # Since IPython 0.13, the man pages are no longer gzipped, so to ensure
100            # that ipython_select works correctly, we gzip the man pages.
101            set gzip [findBinary gzip ${portutil::autoconf::gzip_path}]
102            foreach f {ipcluster ipcontroller ipengine iplogger ipython irunner pycolor} {
103                system "$gzip -9vf ${destroot}${python.prefix}/share/man/man1/${f}.1"
104                file attributes ${destroot}${python.prefix}/share/man/man1/${f}.1.gz -permissions 00444
105                ln -s ${python.prefix}/share/man/man1/${f}.1.gz ${destroot}${prefix}/share/man/man1/${f}-${python.branch}.1.gz
106            }
107            depends_build-append port:gzip
108        } elseif {$subport == "py31-${realname}" || $subport == "py32-${realname}" || $subport == "py33-${realname}"} {
109            # IPython does not appear to install man pages with Python 3. If this
110            # works again in future, the man pages may have to be gzipped as for
111            # Python 2.6 and 2.7. In addition, the man pages should be added back
112            # to files/python31 and files/python32.
113            # foreach f {ipcluster ipcontroller ipengine iplogger ipython irunner pycolor} {
114            #    ln -s ${python.prefix}/share/man/man1/${f}.1.gz ${destroot}${prefix}/share/man/man1/${f}3-${python.branch}.1.gz
115            # }
116        }
117    }
118
119    depends_lib-append      port:py${python.version}-readline \
120                            port:py${python.version}-distribute
121    depends_run             port:ipython_select
122    test.run                no
123
124    select.group            ${realname}
125    select.file             ${filespath}/${realname}${python.version}
126
127    notes "
128To make the Python ${python.branch} version of IPython the one that is run\
129when you execute the commands without a version suffix, e.g. 'ipython', run:
130
131port select --set ${select.group} [file tail ${select.file}]
132"
133}
134
135if {$subport == "py24-${realname}" || $subport == "py25-${realname}"} {
136    livecheck.type          none
137} else {
138    livecheck.type          regex
139    livecheck.url           http://pypi.python.org/packages/source/i/ipython/
140    livecheck.regex         ${realname}-(\\d+(?:\\.\\d+)*)
141}
Note: See TracBrowser for help on using the repository browser.