Ticket #58445: Portfile

File Portfile, 6.1 KB (added by reneeotten (Renee Otten), 6 years ago)
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
3PortSystem          1.0
4PortGroup           github 1.0
5PortGroup           python 1.0
6PortGroup           qt5 1.0
7PortGroup           active_variants 1.1
8PortGroup           select 1.0
9
10github.setup        spyder-ide spyder 3.3.4 v
11name                py-spyder
12revision            0
13# Preference on mailing list is to use small numbers for epoch.
14# This is already a date code, so sticking with dates.
15epoch               20111202
16
17python.versions     27 34 35 36 37
18
19categories-append   devel
20platforms           darwin
21maintainers         {reneeotten @reneeotten} openmaintainer
22license             MIT
23homepage            https://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
39checksums           rmd160  e1b1c4ecbbc6aa200968ba4c6f0c4331b54dfe73 \
40                    sha256  bec0a1a0c3cb0ebbc1ad2004cfea782ab5cfd217cd30d1f40235439638d5af33 \
41                    size    3946713
42
43if {${name} ne ${subport}} {
44    require_active_variants py${python.version}-qtpy qt5
45
46    conflicts       py${python.version}-spyder-devel
47
48    depends_run-append \
49        port:spyder_select
50
51    depends_lib-append \
52        port:py${python.version}-chardet \
53        port:py${python.version}-cloudpickle \
54        port:py${python.version}-codestyle \
55        port:py${python.version}-jedi \
56        port:py${python.version}-keyring \
57        port:py${python.version}-nbconvert \
58        port:py${python.version}-numpydoc \
59        port:py${python.version}-pickleshare \
60        port:py${python.version}-psutil \
61        port:py${python.version}-pyflakes \
62        port:py${python.version}-pygments \
63        port:py${python.version}-pylint \
64        port:py${python.version}-pyqt5 \
65        port:py${python.version}-pyqt5-webengine \
66        port:py${python.version}-qtawesome \
67        port:py${python.version}-qtconsole \
68        port:py${python.version}-qtpy \
69        port:py${python.version}-rope \
70        port:py${python.version}-sphinx \
71        port:py${python.version}-spyder-kernels \
72        port:py${python.version}-zmq
73
74    variant small description "Remove all optional dependencies." {}
75
76    variant webkit description "Use QtWebKit; only recommended for systems that do not support QtWebEngine" {
77        depends_lib-delete \
78            port:py${python.version}-pyqt5-webengine \
79
80        require_active_variants py${python.version}-pyqt5 webkit
81    }
82
83    variant no_anti_alias description "Use non-anti-aliased fonts in editor." {
84        patchfiles-append   patch-spyder_utils_syntaxhighlighters.py.diff
85    }
86
87    if {![ variant_isset small ]} {
88        depends_lib-append \
89            port:py${python.version}-matplotlib \
90            port:py${python.version}-scipy \
91            port:py${python.version}-numpy \
92            port:py${python.version}-pandas \
93            port:py${python.version}-sympy \
94            port:py${python.version}-cython
95    }
96
97    variant docs description "Include offline Python and Qt documentation." {
98        depends_lib-append  port:py${python.version}-htmldocs \
99                            port:qt5-docs
100    }
101
102    variant pil description "Support image objects in editor through PIL or Pillow." {
103        depends_lib-append \
104            path:${python.pkgd}/PIL:py${python.version}-Pillow
105    }
106
107    if {${os.major} <= 13} {
108        default_variants +webkit
109    }
110
111    set WINPDB_BIN_NAME     winpdb-${python.branch}
112    patchfiles-append       patch-spyder_config_base.py.diff \
113                            patch-spyder_plugins_editor.py.diff \
114                            patch-spyder_app_start.py.diff \
115                            patch-spyder_app_mainwindow.py.diff \
116                            patch-spyder_utils_programs.py.diff
117
118    post-patch {
119        reinplace "s|@@WINPDB_BIN_NAME@@|${WINPDB_BIN_NAME}|g" \
120            ${worksrcpath}/spyder/plugins/editor.py
121        reinplace "s|\"assistant\"|\"Assistant\"|g" \
122            ${worksrcpath}/spyder/app/mainwindow.py
123        reinplace "s|\"linguist\"|\"Linguist\"|g" \
124            ${worksrcpath}/spyder/app/mainwindow.py
125        reinplace "s|\"designer\"|\"Designer\"|g" \
126            ${worksrcpath}/spyder/app/mainwindow.py
127        reinplace "s|@@PREFIX@@|${prefix}|g" \
128            ${worksrcpath}/spyder/app/mainwindow.py
129        reinplace "s|@@APPS_DIR@@|${applications_dir}/Qt5|g" \
130            ${worksrcpath}/spyder/utils/programs.py
131    }
132
133    post-destroot {
134        delete \
135          ${destroot}${prefix}/bin/spyder_win_post_install.py-${python.branch}
136        delete ${destroot}${python.prefix}/bin/spyder_win_post_install.py
137
138        set docdir ${prefix}/share/doc/${subport}
139        xinstall -d ${destroot}${docdir}
140        xinstall -m 0644 -W ${worksrcpath} AUTHORS.txt Announcements.md LICENSE.txt \
141            CHANGELOG.md CONTRIBUTING.md README.md RELEASE.md TROUBLESHOOTING.md \
142            ${destroot}${docdir}
143    }
144
145    select.group    spyder
146    select.file     ${filespath}/spyder-${python.version}
147
148    notes "
149To make the Python ${python.branch} version of spyder the one that is run \
150when you execute the commands without a version suffix, e.g. 'spyder', run:
151
152sudo port select --set ${select.group} [file tail ${select.file}]
153"
154
155    livecheck.type  none
156} else {
157    github.livecheck.regex (3\\.\\d+\.\\d+)
158}