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

Last change on this file was 153621, checked in by eborisch@…, 14 months ago

py-spyder-devel: Update to 3.0.0

  • 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 153621 2016-10-06 03:30:06Z ryandesign@macports.org $
3
4PortSystem          1.0
5PortGroup           github 1.0
6
7github.setup        spyder-ide spyder 3.0.0 v
8name                py-spyder-devel
9revision            0
10# Preference on mailing list is to use small numbers for epoch.
11# This is already a date code, so sticking with dates.
12epoch               20161005
13
14PortGroup           python 1.0
15
16python.versions     27 34 35
17
18categories-append   devel
19platforms           darwin
20maintainers         eborisch openmaintainer
21license             MIT
22homepage            http://packages.python.org/spyder/
23description         Spyder is the Scientific PYthon Development EnviRonment
24long_description    ${description}. \
25                    Spyder provides a powerful interactive development \
26                    environment for the Python language with advanced \
27                    editing, interactive testing, debugging and introspection \
28                    features as well as a numerical computing environment \
29                    thanks to the support of IPython (enhanced interactive \
30                    Python interpreter) and popular Python libraries such as \
31                    NumPy (linear algebra), SciPy (signal and image \
32                    processing) or matplotlib (interactive 2D/3D plotting) \
33                    development environment with advanced editing, \
34                    interactive testing, debugging and introspection features.
35
36supported_archs     noarch
37
38#pyNN-scipy doesn't build universal
39universal_variant   no
40
41if {${name} ne ${subport}} {
42    checksums \
43        rmd160  4d068d854ca1c97987e72591c8f523b2adc85bd1 \
44        sha256  779f48bfc227694388f17fdb9931938fb25c1fc1e98c0a0527a03060e555d9ad
45
46    conflicts           py${python.version}-spyder
47
48    # Will *work* with either/both under the hood, but for dependencies,
49    # provide variants to determine what we label depends_lib.
50
51    # Set the pylint executable name
52    set LINT_BIN_NAME   pylint-${python.branch}
53    set WINPDB_BIN_NAME winpdb-${python.branch}
54    patchfiles          patch-widgets-pylintgui.py.diff \
55                        spyderlib_baseconfig.py.diff \
56                        spyderlib_plugins_editor.py.diff \
57                        spyderlib_start_app.py.diff \
58                        spyderlib_spyder.py.diff \
59                        spyderlib_utils_programs.py.diff
60
61    post-patch {
62        reinplace "s|@@WINPDB_BIN_NAME@@|${WINPDB_BIN_NAME}|g" \
63            ${worksrcpath}/spyder/plugins/editor.py
64        reinplace "s|@@LINT_BIN_NAME@@|${LINT_BIN_NAME}|g" \
65            ${worksrcpath}/spyder_pylint/widgets/pylintgui.py
66        reinplace "s|\"assistant\"|\"Assistant\"|g" \
67            ${worksrcpath}/spyder/app/mainwindow.py
68        reinplace "s|\"linguist\"|\"Linguist\"|g" \
69            ${worksrcpath}/spyder/app/mainwindow.py
70        reinplace "s|\"designer\"|\"Designer\"|g" \
71            ${worksrcpath}/spyder/app/mainwindow.py
72        reinplace "s|@@PREFIX@@|${prefix}|g" \
73            ${worksrcpath}/spyder/app/mainwindow.py
74        reinplace "s|@@APPS_DIR@@|${applications_dir}/Qt5|g" \
75            ${worksrcpath}/spyder/utils/programs.py
76    }
77
78    # Bare minimum
79    depends_lib-append  \
80        port:py${python.version}-sphinx \
81        port:py${python.version}-zmq \
82        port:py${python.version}-qtpy \
83        port:py${python.version}-qtawesome \
84        port:py${python.version}-pickleshare \
85        port:py${python.version}-path \
86        port:py${python.version}-pyqt5
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    # These add very little to the install time
106    if {![ variant_isset tiny ]} {
107        depends_lib-append \
108            port:py${python.version}-pylint \
109            path:${python.pkgd}/pep8:py${python.version}-pep8 \
110            port:py${python.version}-pyflakes \
111            port:py${python.version}-rope \
112            port:py${python.version}-psutil \
113            port:py${python.version}-jedi
114    }
115
116    # These add substantially to the install time
117    if {![ variant_isset small ] &&
118        ![ variant_isset tiny  ] } {
119        depends_lib-append \
120            path:${python.pkgd}/h5py/__init__.py:py${python.version}-h5py \
121            port:py${python.version}-qtconsole \
122            port:py${python.version}-matplotlib \
123            port:py${python.version}-scipy \
124            port:py${python.version}-nbconvert \
125            port:py${python.version}-pandas \
126            port:py${python.version}-sympy
127    }
128
129    variant docs description {Include python and Qt offline documentation.} {
130        depends_lib-append  port:qt5-docs
131        depends_lib-append  port:py${python.version}-htmldocs
132    }
133
134    variant pil description {
135           Support image objects in editor through PIL or Pillow (many dependencies.)
136    } {
137        depends_lib-append \
138            path:${python.pkgd}/PIL:py${python.version}-Pillow
139    }
140
141    post-extract {
142      fs-traverse f ${worksrcpath} {
143        touch $f
144      }
145    }
146   
147    post-destroot {
148        if {${python.version} == ${python.default_version}} {
149          ln -s ${python.prefix}/bin/spyder ${destroot}${prefix}/bin/
150        }
151
152        system -W ${destroot}${prefix} \
153            "find . -name *.png -print0 | xargs -0 gm mogrify -strip"
154       
155        delete \
156          ${destroot}${prefix}/bin/spyder_win_post_install.py-${python.branch}
157        delete ${destroot}${python.prefix}/bin/spyder_win_post_install.py
158
159        file mkdir ${destroot}${prefix}/share/doc/${subport}
160        copy ${worksrcpath}/LICENSE \
161            ${destroot}${prefix}/share/doc/${subport}
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}
Note: See TracBrowser for help on using the repository browser.