Changeset 145259 for trunk/dports/python


Ignore:
Timestamp:
Jan 29, 2016, 11:52:42 PM (3 years ago)
Author:
eborisch@…
Message:

py-spyder-devel: Move to github; update to 3.0.0b2; add +qt5 variant.

Location:
trunk/dports/python/py-spyder-devel
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/dports/python/py-spyder-devel/Portfile

    r143295 r145259  
    33
    44PortSystem          1.0
     5PortGroup           github 1.0
     6
     7github.setup        spyder-ide spyder 3.0.0b2 v
    58name                py-spyder-devel
    6 version             2.3.4
    79revision            0
    810# Preference on mailing list is to use small numbers for epoch.
     
    1416python.versions     27 34 35
    1517
    16 PortGroup           qt4 1.0
    1718categories-append   devel
    1819platforms           darwin
     
    3334                    interactive testing, debugging and introspection features.
    3435
    35 master_sites        https://bitbucket.org/spyder-ide/spyderlib/downloads
    36 distname            spyder-${version}
    37 use_zip             yes
    3836supported_archs     noarch
    3937
     
    4341if {${name} ne ${subport}} {
    4442    checksums \
    45         rmd160  dd274f122189fe5f2e4a7c7c34799bc13e6a88c6 \
    46         sha256  da4b13d6faed3e8810c0418f8274b26fde4f265ea4f93bee154af128a755c184
     43        rmd160  e35eed3debe141c610346a5fb2fd0a2e49c2361d \
     44        sha256  60353e331547f2a1c4bec31df487525e3cac04a4f942f86dc650a32a6d000afa
    4745
    4846    conflicts           py${python.version}-spyder
    49    
     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    variant qt5 description {Default to Qt5 GUI.} {
     52        depends_lib-delete  port:py${python.version}-pyqt4
     53        depends_lib-append  port:py${python.version}-pyqt5
     54    }
     55
    5056    # Set the pylint executable name
    5157    set LINT_BIN_NAME   pylint-${python.branch}
     
    6268            ${worksrcpath}/spyderlib/plugins/editor.py
    6369        reinplace "s|@@LINT_BIN_NAME@@|${LINT_BIN_NAME}|g" \
    64             ${worksrcpath}/spyderplugins/widgets/pylintgui.py
     70            ${worksrcpath}/spyplugins/ui/pylint/widgets/pylintgui.py
    6571        reinplace "s|\"assistant\"|\"Assistant\"|g" \
    6672            ${worksrcpath}/spyderlib/spyder.py
     
    7177        reinplace "s|@@PREFIX@@|${prefix}|g" \
    7278            ${worksrcpath}/spyderlib/spyder.py
    73         reinplace "s|@@APPS_DIR@@|${applications_dir}|g" \
    74             ${worksrcpath}/spyderlib/utils/programs.py
    7579        reinplace "s|Ctrl\+I|Cmd+I|" \
    7680            ${worksrcpath}/spyderlib/plugins/inspector.py
    77         # Windows newlines in the file cause compile() (in 2.6) to choke
    78         reinplace "s|\r||g" \
    79             ${worksrcpath}/doc/conf.py
    80     }
    81 
    82     # Can use either py*-pyqt4 or py*-pyqt4-devel.
     81        reinplace -E "s|IPython\.qt(\.console)?|qtconsole|g" \
     82            ${worksrcpath}/spyderlib/config/ipython.py \
     83            ${worksrcpath}/spyderlib/plugins/ipythonconsole.py \
     84            ${worksrcpath}/spyderlib/widgets/ipython.py
     85        if {[variant_isset qt5]} {
     86            reinplace "s|@@APPS_DIR@@|${applications_dir}/Qt5|g" \
     87                ${worksrcpath}/spyderlib/utils/programs.py
     88            reinplace -E "/setdefault/s/pyqt/pyqt5/" spyderlib/qt/__init__.py
     89        } else {
     90            reinplace "s|@@APPS_DIR@@|${applications_dir}/Qt4|g" \
     91                ${worksrcpath}/spyderlib/utils/programs.py
     92        }
     93    }
     94
    8395    # Bare minimum
    8496    depends_lib-append  \
    85         path:share/py${python.version}-sip/PyQt4:py${python.version}-pyqt4 \
    8697        port:py${python.version}-sphinx \
    87         port:py${python.version}-zmq
     98        port:py${python.version}-zmq \
     99        port:py${python.version}-qtpy \
     100        port:py${python.version}-qtawesome \
     101        port:py${python.version}-pickleshare \
     102        port:py${python.version}-path \
     103        port:py${python.version}-pyqt4
    88104
    89105    depends_build-append \
     
    104120    }
    105121
    106     variant optimized description {Create .pyo files. Fails on BuildBot.} {
    107     }
    108 
    109122    # These add very little to the install time
    110123    if {![ variant_isset tiny ]} {
    111124        depends_lib-append \
    112             port:py${python.version}-htmldocs \
    113125            port:py${python.version}-pylint \
    114126            path:${python.pkgd}/pep8:py${python.version}-pep8-157 \
    115127            port:py${python.version}-pyflakes \
    116             port:py${python.version}-rope
     128            port:py${python.version}-rope \
     129            port:py${python.version}-psutil
     130        # Until spyder supports jedi >= 0.9.0, this doesn't do anything
     131        #    port:py${python.version}-jedi
    117132    }
    118133
     
    122137        depends_lib-append \
    123138            path:${python.pkgd}/h5py/__init__.py:py${python.version}-h5py \
    124             port:py${python.version}-ipython \
     139            port:py${python.version}-qtconsole \
    125140            port:py${python.version}-matplotlib \
    126             port:py${python.version}-scipy
     141            port:py${python.version}-scipy \
     142            port:py${python.version}-nbconvert \
     143            port:py${python.version}-pandas \
     144            port:py${python.version}-sympy
     145    }
     146
     147    variant docs description {Include python and Qt offline documentation.} {
     148        if {[variant_isset qt5]} {
     149            depends_lib-append  port:qt5-docs
     150        }
     151        depends_lib-append  port:py${python.version}-htmldocs
    127152    }
    128153
     
    148173            "find . -name *.png -print0 | xargs -0 gm mogrify -strip"
    149174       
    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         }
    159175        delete \
    160176          ${destroot}${prefix}/bin/spyder_win_post_install.py-${python.branch}
    161177        delete ${destroot}${python.prefix}/bin/spyder_win_post_install.py
     178
     179        file mkdir ${destroot}${prefix}/share/doc/${subport}
     180        copy ${worksrcpath}/LICENSE \
     181            ${destroot}${prefix}/share/doc/${subport}
    162182    }
    163183
     
    173193### Spyder is launched from the terminal with ${EXENAME} ###
    174194##############################################################"
     195    livecheck.type      none
     196} else {
     197    livecheck.type      regex
     198    livecheck.url       https://bitbucket.org/spyder-ide/spyderlib/downloads
     199    livecheck.regex     spyder-(\[0-9\]+(\.\[0-9betarc]+)*)\.zip
    175200}
    176 
    177 livecheck.type      regex
    178 livecheck.url       https://bitbucket.org/spyder-ide/spyderlib/downloads
    179 livecheck.regex     spyder-(\[0-9\]+(\.\[0-9betarc]+)*)\.zip
  • trunk/dports/python/py-spyder-devel/files/patch-widgets-pylintgui.py.diff

    r87015 r145259  
    1 --- spyderplugins/widgets/pylintgui.py.orig     2011-09-08 08:45:35.000000000 -0500
    2 +++ spyderplugins/widgets/pylintgui.py  2011-09-08 08:46:52.000000000 -0500
    3 @@ -40,7 +40,7 @@
    4                                            is_module_or_package)
     1--- spyplugins/ui/pylint/widgets/pylintgui.py.orig      2015-06-23 09:49:01.000000000 -0500
     2+++ spyplugins/ui/pylint/widgets/pylintgui.py   2015-06-23 09:49:31.000000000 -0500
     3@@ -40,14 +40,8 @@
    54 _ = get_translation("p_pylint", dirname="spyderplugins")
    65 
    7 -PYLINT_PATH = programs.find_program('pylint')
     6 
     7-PYLINT = 'pylint'
     8-if PY3:
     9-    if programs.find_program('pylint3'):
     10-        PYLINT = 'pylint3'
     11-    elif programs.find_program('python3-pylint'):
     12-        PYLINT = 'python3-pylint'
     13-
     14-PYLINT_PATH = programs.find_program(PYLINT)
     15+PYLINT = '@@LINT_BIN_NAME@@'
    816+PYLINT_PATH = programs.find_program('@@LINT_BIN_NAME@@')
    917 
    1018 
    11  #TODO: display results on 3 columns instead of 1: msg_id, lineno, message
     19 def get_pylint_version():
  • trunk/dports/python/py-spyder-devel/files/spyderlib_baseconfig.py.diff

    r112932 r145259  
    1 --- spyderlib/baseconfig.py.orig        2013-10-21 08:43:46.000000000 -0500
    2 +++ spyderlib/baseconfig.py     2013-10-21 08:44:24.000000000 -0500
    3 @@ -60,7 +60,9 @@
    4  #==============================================================================
    5  # Spyder settings dir
     1--- spyderlib/config/base.py.orig       2015-06-23 10:06:48.000000000 -0500
     2+++ spyderlib/config/base.py    2015-06-23 10:08:03.000000000 -0500
     3@@ -21,6 +21,7 @@
     4 import sys
     5 
     6 # Local imports
     7+from spyderlib import __version__
     8 from spyderlib.utils import encoding
     9 from spyderlib.py3compat import (is_unicode, TEXT_TYPES, INT_TYPES, PY3,
     10                                  to_text_string, is_text_string)
     11@@ -72,7 +73,9 @@
     12 # updates in version (required when we change APIs by Linux
     13 # packagers)
    614 if TEST is None:
    7 -    SUBFOLDER = '.spyder%s' % __version__.split('.')[0]
     15-    SUBFOLDER = '.spyder'
    816+    SUBFOLDER = '.spyder%s-%s%s' % (__version__.split('.')[0],
    917+                                    sys.version_info[0],
  • trunk/dports/python/py-spyder-devel/files/spyderlib_start_app.py.diff

    r112962 r145259  
    1 --- spyderlib/start_app.py.orig 2013-11-04 09:51:03.000000000 -0600
    2 +++ spyderlib/start_app.py      2013-11-04 09:55:55.000000000 -0600
    3 @@ -8,6 +8,15 @@
     1--- spyderlib/start_app.py-orig 2013-10-14 12:43:43.000000000 -0500
     2+++ spyderlib/start_app.py      2013-10-14 12:45:50.000000000 -0500
     3@@ -7,6 +7,9 @@
     4 import atexit
    45 import random
    5  import sys
    66 
    7 +# Make sure LANG isn't set to 'UTF-8' (without en_US. prefix)
    87+if os.environ.get('LANG') == 'UTF-8':
    9 +    os.environ['LANG'] = 'en_US.UTF-8'
    10 +
    11 +# Modified to support MacPorts' buildbot environment
    12 +username = os.environ.get('USER')
    13 +if not username:
    14 +    os.environ['USER'] = 'NO_USER_ENV'
     8+  os.environ['LANG'] = 'en_US.UTF-8'
    159+
    1610 # Local imports
  • trunk/dports/python/py-spyder-devel/files/spyderlib_utils_programs.py.diff

    r102537 r145259  
    11--- spyderlib/utils/programs.py.orig    2011-10-12 11:06:09.000000000 -0500
    22+++ spyderlib/utils/programs.py 2011-10-12 11:07:28.000000000 -0500
    3 @@ -20,6 +20,10 @@
     3@@ -20,6 +20,11 @@
    44         abspath = osp.join(path, basename)
    55         if osp.isfile(abspath):
    66             return abspath
    7 +        else:
    8 +            abspath = "@@APPS_DIR@@/Qt4/" + basename + ".app/Contents/MacOS/" + basename
    9 +            if osp.isfile(abspath):
    10 +                return abspath
     7+    else:
     8+        abspath = "@@APPS_DIR@@/" + basename + ".app/Contents/MacOS/" + basename
     9+        if osp.isfile(abspath):
     10+            return abspath
     11+    return None
    1112 
    1213 
Note: See TracChangeset for help on using the changeset viewer.