[85912] trunk/dports/python

eborisch at macports.org eborisch at macports.org
Mon Oct 17 05:57:36 PDT 2011


Revision: 85912
          http://trac.macports.org/changeset/85912
Author:   eborisch at macports.org
Date:     2011-10-17 05:57:35 -0700 (Mon, 17 Oct 2011)
Log Message:
-----------
py-spyder-beta: New port of spyder-2.1 beta versions. Will merge back into py-spyder once 'released.'

Modified Paths:
--------------
    trunk/dports/python/py-spyder-beta/Portfile
    trunk/dports/python/py-spyder-beta/files/patch-widgets-pylintgui.py.diff
    trunk/dports/python/py-spyder-beta/files/spyderlib_spyder.py.diff
    trunk/dports/python/py-spyder-beta/files/spyderlib_utils_programs.py.diff
    trunk/dports/python/py-spyder-beta/files/spyderlib_widgets_sourcecode_codeeditor.py.diff

Added Paths:
-----------
    trunk/dports/python/py-spyder-beta/
    trunk/dports/python/py-spyder-beta/files/spyderlib_plugins_editor.py.diff

Removed Paths:
-------------
    trunk/dports/python/py-spyder-beta/files/spyderlib_plugins_externalconsole.py.diff
    trunk/dports/python/py-spyder-beta/files/spyderlib_widgets_editor.py.diff

Modified: trunk/dports/python/py-spyder-beta/Portfile
===================================================================
--- trunk/dports/python/py-spyder/Portfile	2011-10-13 18:07:27 UTC (rev 85428)
+++ trunk/dports/python/py-spyder-beta/Portfile	2011-10-17 12:57:35 UTC (rev 85912)
@@ -2,9 +2,9 @@
 # $Id$
 
 PortSystem          1.0
-name                py-spyder
-version             2.0.12
-revision            6
+name                py-spyder-beta
+version             2.1.0beta3
+#revision            7
 
 PortGroup           python 1.0
 
@@ -14,7 +14,7 @@
 PortGroup           qt4 1.0
 categories          python devel
 platforms           darwin
-maintainers         nomaintainer
+maintainers         eborisch openmaintainer
 license             MIT
 homepage            http://packages.python.org/spyder/
 description         development environment with advanced editing, \
@@ -32,20 +32,25 @@
 #pyNN-pyqt4 doesn't want to build universal
 universal_variant   no 
 
-checksums           md5     035852cfc6109541d72003111cf31bb3 \
-                    sha1    a592caf81f4c1f72d637a5269f5c60f8f43e57ee
+checksums           md5     03345a4e16840d063221ab944ebe2fef \
+                    sha1    e61a21a6a0d07273bfda1b177106fae71b517e58 \
+                    rmd160  254febed3349bf6651f762224552013af461baeb
 
 if {${subport} != ${name}} {
+    conflicts           port:py${python.version}-spyder
+    
     # Set the pylint executable name
     set LINT_BIN_NAME   pylint-${python.branch}
+    set WINPDB_BIN_NAME winpdb-${python.branch}
     patchfiles          patch-widgets-pylintgui.py.diff \
+                        spyderlib_plugins_editor.py.diff \
                         spyderlib_spyder.py.diff \
                         spyderlib_utils_programs.py.diff \
-                        spyderlib_widgets_sourcecode_codeeditor.py.diff \
-                        spyderlib_plugins_externalconsole.py.diff \
-                        spyderlib_widgets_editor.py.diff
+                        spyderlib_widgets_sourcecode_codeeditor.py.diff
 
     post-patch {
+        reinplace "s|@@WINPDB_BIN_NAME@@|${WINPDB_BIN_NAME}|g" \
+            ${worksrcpath}/spyderlib/plugins/editor.py
         reinplace "s|@@LINT_BIN_NAME@@|${LINT_BIN_NAME}|g" \
             ${worksrcpath}/spyderplugins/widgets/pylintgui.py
         reinplace "s|\"assistant\"|\"Assistant\"|g" \
@@ -68,12 +73,21 @@
                         port:py${python.version}-pyflakes \
                         port:py${python.version}-ipython \
                         port:py${python.version}-rope \
-                        port:py${python.version}-htmldocs
+                        port:py${python.version}-pil \
+                        port:py${python.version}-htmldocs \
+                        port:py${python.version}-h5py
 
-    if {${python.version} == ${python.default_version}} {
-        post-destroot {
+    post-destroot {
+        if {${python.version} == ${python.default_version}} {
           ln -s ${python.prefix}/bin/spyder ${destroot}${prefix}/bin/
         }
+        set OPTCMD    [concat "export HOME=${destroot}/tmp/spyder &&" \
+                       "export PYTHONPATH=${destroot}${python.pkgd} &&" \
+                       "./spyder --optimize"]
+        
+        file mkdir ${destroot}/tmp/spyder
+        system "cd ${destroot}${python.prefix}/bin && ${OPTCMD}"
+        file delete -force ${destroot}/tmp/spyder
     }
 }
 

Modified: trunk/dports/python/py-spyder-beta/files/patch-widgets-pylintgui.py.diff
===================================================================
--- trunk/dports/python/py-spyder/files/patch-widgets-pylintgui.py.diff	2011-10-13 18:07:27 UTC (rev 85428)
+++ trunk/dports/python/py-spyder-beta/files/patch-widgets-pylintgui.py.diff	2011-10-17 12:57:35 UTC (rev 85912)
@@ -1,23 +1,11 @@
---- spyderplugins/widgets/pylintgui.py.orig	2011-06-10 17:01:04.000000000 -0500
-+++ spyderplugins/widgets/pylintgui.py	2011-08-10 11:27:23.000000000 -0500
-@@ -42,7 +42,7 @@
- from spyderlib.utils.translations import get_translation
+--- spyderplugins/widgets/pylintgui.py.orig	2011-09-08 08:45:35.000000000 -0500
++++ spyderplugins/widgets/pylintgui.py	2011-09-08 08:46:52.000000000 -0500
+@@ -40,7 +40,7 @@
+                                           is_module_or_package)
  _ = get_translation("p_pylint", dirname="spyderplugins")
  
--PYLINT_PATH = programs.get_nt_program_name('pylint')
-+PYLINT_PATH = programs.get_nt_program_name('@@LINT_BIN_NAME@@')
+-PYLINT_PATH = programs.find_program('pylint')
++PYLINT_PATH = programs.find_program('@@LINT_BIN_NAME@@')
  
- def is_pylint_installed():
-     return programs.is_program_installed(PYLINT_PATH)
-@@ -353,7 +353,10 @@
-             i2 = line.find(':', i1+1)
-             if i2 == -1:
-                 continue
--            line_nb = line[i1+1:i2].strip()
-+            i3 = line.find(',', i1+1)
-+            if i3 == -1:
-+                continue
-+            line_nb = line[i1+1:i3].strip()
-             if not line_nb:
-                 continue
-             line_nb = int(line_nb)
+ 
+ #TODO: display results on 3 columns instead of 1: msg_id, lineno, message

Added: trunk/dports/python/py-spyder-beta/files/spyderlib_plugins_editor.py.diff
===================================================================
--- trunk/dports/python/py-spyder-beta/files/spyderlib_plugins_editor.py.diff	                        (rev 0)
+++ trunk/dports/python/py-spyder-beta/files/spyderlib_plugins_editor.py.diff	2011-10-17 12:57:35 UTC (rev 85912)
@@ -0,0 +1,11 @@
+--- spyderlib/plugins/editor.py.orig	2011-10-12 11:11:49.000000000 -0500
++++ spyderlib/plugins/editor.py	2011-10-12 11:12:53.000000000 -0500
+@@ -68,7 +68,7 @@
+     CONF.set('run', 'breakpoints', {})
+ 
+ 
+-WINPDB_PATH = programs.find_program('winpdb')
++WINPDB_PATH = programs.find_program('@@WINPDB_BIN_NAME@@')
+ 
+ 
+ class EditorConfigPage(PluginConfigPage):

Deleted: trunk/dports/python/py-spyder-beta/files/spyderlib_plugins_externalconsole.py.diff
===================================================================
--- trunk/dports/python/py-spyder/files/spyderlib_plugins_externalconsole.py.diff	2011-10-13 18:07:27 UTC (rev 85428)
+++ trunk/dports/python/py-spyder-beta/files/spyderlib_plugins_externalconsole.py.diff	2011-10-17 12:57:35 UTC (rev 85912)
@@ -1,13 +0,0 @@
---- spyderlib/plugins/externalconsole.py.orig	2011-08-16 10:18:36.000000000 -0500
-+++ spyderlib/plugins/externalconsole.py	2011-08-16 10:18:56.000000000 -0500
-@@ -326,8 +326,8 @@
-         
-         layout = QVBoxLayout()
-         self.tabwidget = Tabs(self, self.menu_actions)
--        if hasattr(self.tabwidget, 'setDocumentMode'):
--            self.tabwidget.setDocumentMode(True)
-+        #if hasattr(self.tabwidget, 'setDocumentMode'):
-+        #    self.tabwidget.setDocumentMode(True)
-         self.connect(self.tabwidget, SIGNAL('currentChanged(int)'),
-                      self.refresh_plugin)
-         self.connect(self.tabwidget, SIGNAL('move_data(int,int)'),

Modified: trunk/dports/python/py-spyder-beta/files/spyderlib_spyder.py.diff
===================================================================
--- trunk/dports/python/py-spyder/files/spyderlib_spyder.py.diff	2011-10-13 18:07:27 UTC (rev 85428)
+++ trunk/dports/python/py-spyder-beta/files/spyderlib_spyder.py.diff	2011-10-17 12:57:35 UTC (rev 85912)
@@ -1,6 +1,6 @@
---- spyderlib/spyder.py.orig	2011-08-11 13:54:43.000000000 -0500
-+++ spyderlib/spyder.py	2011-08-11 13:58:55.000000000 -0500
-@@ -101,9 +101,9 @@
+--- spyderlib/spyder.py.orig	2011-09-05 18:29:00.000000000 -0500
++++ spyderlib/spyder.py	2011-09-08 08:36:55.000000000 -0500
+@@ -142,7 +142,7 @@
              return osp.join(doc_path, python_chm[0])
      else:
          vinf = sys.version_info
@@ -8,16 +8,4 @@
 +        doc_path = '@@PREFIX@@/share/doc/python%d%d-doc' % (vinf[0], vinf[1])
      python_doc = osp.join(doc_path, "index.html")
      if osp.isfile(python_doc):
--        return python_doc
-+        return 'file://' + python_doc
-     
- def open_python_doc():
-@@ -651,6 +651,8 @@
-                     spyder_doc = osp.join(osp.dirname(__file__), os.pardir,
-                                           'build', 'lib', 'spyderlib', 'doc',
-                                           "index.html")
-+                else:
-+                    spyder_doc = "file://" + spyder_doc
-             doc_action = create_bookmark_action(self, spyder_doc,
-                                _("Spyder documentation"), shortcut="F1",
-                                icon=get_std_icon('DialogHelpButton'))
+         return python_doc

Modified: trunk/dports/python/py-spyder-beta/files/spyderlib_utils_programs.py.diff
===================================================================
--- trunk/dports/python/py-spyder/files/spyderlib_utils_programs.py.diff	2011-10-13 18:07:27 UTC (rev 85428)
+++ trunk/dports/python/py-spyder-beta/files/spyderlib_utils_programs.py.diff	2011-10-17 12:57:35 UTC (rev 85912)
@@ -1,15 +1,27 @@
---- spyderlib/utils/programs.py.orig	2011-08-11 14:41:11.000000000 -0500
-+++ spyderlib/utils/programs.py	2011-08-11 14:43:54.000000000 -0500
-@@ -29,6 +29,12 @@
-             else:
-                 return True
-     else:
-+        abspath = "@@APPS_DIR@@/Qt4/" + basename + ".app/Contents/MacOS/" + basename
-+        if osp.isfile(abspath):
-+            if get_path:
+--- spyderlib/utils/programs.py.orig	2011-10-12 11:06:09.000000000 -0500
++++ spyderlib/utils/programs.py	2011-10-12 11:07:28.000000000 -0500
+@@ -20,6 +20,10 @@
+         abspath = osp.join(path, basename)
+         if osp.isfile(abspath):
+             return abspath
++        else:
++            abspath = "@@APPS_DIR@@/Qt4/" + basename + ".app/Contents/MacOS/" + basename
++            if osp.isfile(abspath):
 +                return abspath
-+            else:
-+                return True
-         return False
+ 
+ 
+ def find_program(basename):
+@@ -48,7 +54,12 @@
+     from spyderlib.qt.QtGui import QDesktopServices
+     from spyderlib.qt.QtCore import QUrl
+     url = QUrl()
+-    url.setPath(filename)
++    if 'file:///' in filename[0:8]:
++      url = url.fromLocalFile(filename[7:])
++    elif osp.isfile(filename):
++      url = url.fromLocalFile(filename)
++    else:
++      url.setUrl(filename)
+     return QDesktopServices.openUrl(url)
      
- def run_program(name, args=[]):
+ def python_script_exists(package=None, module=None, get_path=False):

Deleted: trunk/dports/python/py-spyder-beta/files/spyderlib_widgets_editor.py.diff
===================================================================
--- trunk/dports/python/py-spyder/files/spyderlib_widgets_editor.py.diff	2011-10-13 18:07:27 UTC (rev 85428)
+++ trunk/dports/python/py-spyder-beta/files/spyderlib_widgets_editor.py.diff	2011-10-17 12:57:35 UTC (rev 85912)
@@ -1,13 +0,0 @@
---- spyderlib/widgets/editor.py.orig	2011-08-16 10:19:49.000000000 -0500
-+++ spyderlib/widgets/editor.py	2011-08-16 10:20:03.000000000 -0500
-@@ -562,8 +562,8 @@
-         self.tabs = BaseTabs(self, menu=self.menu, menu_use_tooltips=True,
-                              corner_widgets=corner_widgets)
-         self.tabs.set_close_function(self.close_file)
--        if hasattr(self.tabs, 'setDocumentMode'):
--            self.tabs.setDocumentMode(True)
-+        #if hasattr(self.tabs, 'setDocumentMode'):
-+        #    self.tabs.setDocumentMode(True)
-         self.connect(self.tabs, SIGNAL('currentChanged(int)'),
-                      self.current_changed)
-         layout.addWidget(self.tabs)

Modified: trunk/dports/python/py-spyder-beta/files/spyderlib_widgets_sourcecode_codeeditor.py.diff
===================================================================
--- trunk/dports/python/py-spyder/files/spyderlib_widgets_sourcecode_codeeditor.py.diff	2011-10-13 18:07:27 UTC (rev 85428)
+++ trunk/dports/python/py-spyder-beta/files/spyderlib_widgets_sourcecode_codeeditor.py.diff	2011-10-17 12:57:35 UTC (rev 85912)
@@ -1,24 +1,21 @@
---- spyderlib/widgets/sourcecode/codeeditor.py.orig	2011-06-10 17:01:04.000000000 -0500
-+++ spyderlib/widgets/sourcecode/codeeditor.py	2011-08-16 09:02:07.000000000 -0500
-@@ -1595,6 +1595,21 @@
+--- spyderlib/widgets/sourcecode/codeeditor.py.orig	2011-09-05 18:29:00.000000000 -0500
++++ spyderlib/widgets/sourcecode/codeeditor.py	2011-09-08 08:51:36.000000000 -0500
+@@ -2038,6 +2038,18 @@
+                     self.emit(SIGNAL('trigger_code_completion(bool)'), True)
          elif key == Qt.Key_Home and not ctrl:
              self.stdkey_home(shift)
-             event.accept()
 +        elif key == Qt.Key_Home:
 +            cursor = self.textCursor()
 +            cursor.movePosition(QTextCursor.Start)
 +            self.setTextCursor(cursor)
-+            event.accept()
 +        elif key == Qt.Key_End and not ctrl:
 +            cursor = self.textCursor()
 +            cursor.movePosition(QTextCursor.EndOfLine)
 +            self.setTextCursor(cursor)
-+            event.accept()
 +        elif key == Qt.Key_End:
 +            cursor = self.textCursor()
 +            cursor.movePosition(QTextCursor.End)
 +            self.setTextCursor(cursor)
-+            event.accept()
          elif text == '(' and not self.has_selected_text():
              self.hide_completion_widget()
              position = self.get_position('cursor')
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20111017/b6eec99d/attachment.html>


More information about the macports-changes mailing list