source: trunk/dports/python/py-spyder/Portfile

Last change on this file was 145593, checked in by petr@…, 22 months ago

py-pep8* dependents: default to py??-pep8 again, use path style dependency for the transition, #50576.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 6.6 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 145593 2016-02-10 18:53:23Z ryandesign@macports.org $
3
4PortSystem          1.0
5PortGroup           github 1.0
6PortGroup           python 1.0
7
8github.setup        spyder-ide spyder 2.3.8 v
9name                py-spyder
10revision            0
11# Preference on mailing list is to use small numbers for epoch.
12# This is already a date code, so sticking with dates.
13epoch               20111202
14
15
16python.versions     27 34 35
17
18PortGroup           qt4 1.0
19categories-append   devel
20platforms           darwin
21maintainers         eborisch openmaintainer
22license             MIT
23homepage            http://packages.python.org/spyder/
24description         Spyder is the Scientific PYthon Development EnviRonment
25long_description    ${description}. \
26                    Spyder provides a powerful interactive development \
27                    environment for the Python language with advanced \
28                    editing, interactive testing, debugging and introspection \
29                    features as well as a numerical computing environment \
30                    thanks to the support of IPython (enhanced interactive \
31                    Python interpreter) and popular Python libraries such as \
32                    NumPy (linear algebra), SciPy (signal and image \
33                    processing) or matplotlib (interactive 2D/3D plotting) \
34                    development environment with advanced editing, \
35                    interactive testing, debugging and introspection features.
36
37supported_archs     noarch
38
39#pyNN-scipy doesn't build universal
40universal_variant   no
41
42if {${name} ne ${subport}} {
43    checksums \
44        rmd160  e230ce207106cf50fe83aebae46eb635ebb69baa \
45        sha256  6d1962aa5cac21a499e4d5fbea40a872f2b30517f7134af7d3b6be4f75ad8319
46
47    conflicts           py${python.version}-spyder-devel
48   
49    # Set the pylint executable name
50    set LINT_BIN_NAME   pylint-${python.branch}
51    set WINPDB_BIN_NAME winpdb-${python.branch}
52    patchfiles          patch-widgets-pylintgui.py.diff \
53                        spyderlib_baseconfig.py.diff \
54                        spyderlib_plugins_editor.py.diff \
55                        spyderlib_start_app.py.diff \
56                        spyderlib_spyder.py.diff \
57                        spyderlib_utils_programs.py.diff
58
59    post-patch {
60        reinplace "s|@@WINPDB_BIN_NAME@@|${WINPDB_BIN_NAME}|g" \
61            ${worksrcpath}/spyderlib/plugins/editor.py
62        reinplace "s|@@LINT_BIN_NAME@@|${LINT_BIN_NAME}|g" \
63            ${worksrcpath}/spyderplugins/widgets/pylintgui.py
64        reinplace "s|\"assistant\"|\"Assistant\"|g" \
65            ${worksrcpath}/spyderlib/spyder.py
66        reinplace "s|\"linguist\"|\"Linguist\"|g" \
67            ${worksrcpath}/spyderlib/spyder.py
68        reinplace "s|\"designer\"|\"Designer\"|g" \
69            ${worksrcpath}/spyderlib/spyder.py
70        reinplace "s|@@PREFIX@@|${prefix}|g" \
71            ${worksrcpath}/spyderlib/spyder.py
72        reinplace "s|@@APPS_DIR@@|${applications_dir}|g" \
73            ${worksrcpath}/spyderlib/utils/programs.py
74        reinplace "s|Ctrl\+I|Cmd+I|" \
75            ${worksrcpath}/spyderlib/plugins/inspector.py
76        # Windows newlines in the file cause compile() (in 2.6) to choke
77        reinplace "s|\r||g" \
78            ${worksrcpath}/doc/conf.py
79    }
80
81    # Can use either py*-pyqt4 or py*-pyqt4-devel.
82    # Bare minimum
83    depends_lib-append  \
84        path:share/py${python.version}-sip/PyQt4:py${python.version}-pyqt4 \
85        port:py${python.version}-sphinx \
86        port:py${python.version}-zmq
87
88    depends_build-append \
89        port:GraphicsMagick
90   
91    variant tiny description {
92        Remove all optional dependencies for quickest install. Dependencies\
93        are detected/enabled at runtime and may be installed separately.
94    } conflicts small {}
95
96    variant small description {
97        Remove most optional dependencies for quicker install. Dependencies\
98        are detected/enabled at runtime and may be installed separately.
99    } conflicts tiny {}
100   
101    variant no_anti_alias description {Use non-anti-aliased fonts in editor.} {
102        patchfiles-append   no_AA.diff
103    }
104
105    variant optimized description {Create .pyo files. Fails on BuildBot.} {
106    }
107
108    # These add very little to the install time
109    if {![ variant_isset tiny ]} {
110        depends_lib-append \
111            port:py${python.version}-htmldocs \
112            port:py${python.version}-pylint \
113            path:${python.pkgd}/pep8:py${python.version}-pep8 \
114            port:py${python.version}-pyflakes \
115            port:py${python.version}-rope \
116            port:py${python.version}-psutil
117    }
118
119    # These add substantially to the install time
120    if {![ variant_isset small ] &&
121        ![ variant_isset tiny  ] } {
122        depends_lib-append \
123            path:${python.pkgd}/h5py/__init__.py:py${python.version}-h5py \
124            port:py${python.version}-qtconsole \
125            port:py${python.version}-matplotlib \
126            port:py${python.version}-scipy
127    }
128
129    variant pil description {
130       Support image objects in editor through PIL or Pillow (many dependencies.)
131    } {
132        depends_lib-append \
133            path:${python.pkgd}/PIL:py${python.version}-Pillow
134    }
135
136    post-extract {
137      fs-traverse f ${worksrcpath} {
138        touch $f
139      }
140    }
141   
142    post-destroot {
143        if {${python.version} == ${python.default_version}} {
144          ln -s ${python.prefix}/bin/spyder ${destroot}${prefix}/bin/
145        }
146
147        system -W ${destroot}${prefix} \
148            "find . -name *.png -print0 | xargs -0 gm mogrify -strip"
149       
150        if {[variant_isset optimized]} {
151            set OPTCMD    [concat "HOME=${destroot}/tmp/spyder "  \
152                           "PYTHONPATH=${destroot}${python.pkgd} "  \
153                           "./spyder --optimize"]
154           
155            file mkdir ${destroot}/tmp/spyder
156            system "cd ${destroot}${python.prefix}/bin && ${OPTCMD}"
157            delete ${destroot}/tmp/spyder
158        }
159        delete \
160          ${destroot}${prefix}/bin/spyder_win_post_install.py-${python.branch}
161        delete ${destroot}${python.prefix}/bin/spyder_win_post_install.py
162    }
163
164    if {${python.version} == ${python.default_version}} {
165        set EXENAME   "'spyder'    "
166    } else {
167        set EXENAME   "'spyder-${python.branch}'"
168    }
169   
170    notes \
171"
172##############################################################
173### Spyder is launched from the terminal with ${EXENAME} ###
174##############################################################"
175    livecheck.type      none
176}
177# Only match against 2.x series for now.
178livecheck.regex         "archive/v(2\[^\"\]+).tar.gz"
Note: See TracBrowser for help on using the repository browser.