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

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

py-ipython: fix livecheck

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 6.5 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 100726 2012-12-21 08:44:31Z 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
12revision            1
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  3ef3a81fe7aa3aa5512eb56ee9a748ac3749a805 \
32                    sha256  a435cc21921817bdeb5ed91e406fc58f8af1d44f8208dd8a4bc691c9c48d3a19
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 parallel description "Support for parallel computing" {
65        depends_lib-append      port:py${python.version}-zmq
66    }
67    variant pyqt4 conflicts pyside requires parallel description "Support for the Qt console using pyqt4" {
68        depends_lib-append      port:py${python.version}-pyqt4 \
69                                port:py${python.version}-pygments
70    }
71    variant pyside conflicts pyqt4 requires parallel description "Support for the Qt console using pyside" {
72        depends_lib-append      port:py${python.version}-pyside \
73                                port:py${python.version}-pygments
74    }
75    variant notebook requires parallel description "Support for IPython HTML notebook" {
76        depends_lib-append      port:py${python.version}-tornado
77    }
78}
79
80if {$subport != $name} {
81
82    post-destroot {
83        if {$subport == "py24-${realname}"} {
84            foreach f {ipython pycolor} {
85                move ${destroot}${prefix}/share/man/man1/${f}.1.gz \
86                     ${destroot}${prefix}/share/man/man1/${f}-${python.branch}.1.gz
87            }
88            move ${destroot}${prefix}/share/doc/${realname} ${destroot}${prefix}/share/doc/${subport}
89        } elseif {$subport == "py25-${realname}"} {
90            foreach f {ipcluster ipcontroller ipengine ipython ipython-wx ipythonx irunner pycolor} {
91                move ${destroot}${prefix}/share/man/man1/${f}.1.gz \
92                     ${destroot}${prefix}/share/man/man1/${f}-${python.branch}.1.gz
93            }
94            move ${destroot}${prefix}/share/doc/${realname} ${destroot}${prefix}/share/doc/${subport}
95        } elseif {$subport == "py26-${realname}" || $subport == "py27-${realname}"} {
96            # Since IPython 0.13, the man pages are no longer gzipped, so to ensure
97            # that ipython_select works correctly, we gzip the man pages.
98            set gzip [findBinary gzip ${portutil::autoconf::gzip_path}]
99            foreach f {ipcluster ipcontroller ipengine iplogger ipython irunner pycolor} {
100                system "$gzip -9vf ${destroot}${python.prefix}/share/man/man1/${f}.1"
101                file attributes ${destroot}${python.prefix}/share/man/man1/${f}.1.gz -permissions 00444
102                ln -s ${python.prefix}/share/man/man1/${f}.1.gz ${destroot}${prefix}/share/man/man1/${f}-${python.branch}.1.gz
103            }
104            depends_build-append port:gzip
105        } elseif {$subport == "py31-${realname}" || $subport == "py32-${realname}" || $subport == "py33-${realname}"} {
106            # IPython does not appear to install man pages with Python 3. If this
107            # works again in future, the man pages may have to be gzipped as for
108            # Python 2.6 and 2.7. In addition, the man pages should be added back
109            # to files/python31 and files/python32.
110            # foreach f {ipcluster ipcontroller ipengine iplogger ipython irunner pycolor} {
111            #    ln -s ${python.prefix}/share/man/man1/${f}.1.gz ${destroot}${prefix}/share/man/man1/${f}3-${python.branch}.1.gz
112            # }
113        }
114    }
115
116    depends_lib-append      port:py${python.version}-readline \
117                            port:py${python.version}-distribute
118    depends_run             port:ipython_select
119    test.run                no
120
121    select.group            ${realname}
122    select.file             ${filespath}/${realname}${python.version}
123
124    notes "
125To make the Python ${python.branch} version of IPython the one that is run\
126when you execute the commands without a version suffix, e.g. 'ipython', run:
127
128port select --set ${select.group} [file tail ${select.file}]
129"
130}
131
132if {$subport == "py33-${realname}"} {
133    # https://github.com/ipython/ipython/issues/2343
134    # It has been fixed for ipython > 0.13
135    patchfiles-append       ipython33-version.diff
136}
137
138if {$subport == "py24-${realname}" || $subport == "py25-${realname}"} {
139    livecheck.type          none
140} else {
141    livecheck.type          regex
142    livecheck.url           http://pypi.python.org/packages/source/i/ipython/
143    livecheck.regex         ${realname}-(\\d+(?:\\.\\d+)*)
144}
Note: See TracBrowser for help on using the repository browser.