[82279] trunk/dports/python/py-spyder
eborisch at macports.org
eborisch at macports.org
Thu Aug 11 14:47:32 PDT 2011
Revision: 82279
http://trac.macports.org/changeset/82279
Author: eborisch at macports.org
Date: 2011-08-11 14:47:32 -0700 (Thu, 11 Aug 2011)
Log Message:
-----------
py-spyder: More fixes; enabled launching help, Qt apps, and python documentation from menus.
Modified Paths:
--------------
trunk/dports/python/py-spyder/Portfile
Added Paths:
-----------
trunk/dports/python/py-spyder/Files/spyderlib_spyder.py.diff
trunk/dports/python/py-spyder/Files/spyderlib_utils_programs.py.patch
Added: trunk/dports/python/py-spyder/Files/spyderlib_spyder.py.diff
===================================================================
--- trunk/dports/python/py-spyder/Files/spyderlib_spyder.py.diff (rev 0)
+++ trunk/dports/python/py-spyder/Files/spyderlib_spyder.py.diff 2011-08-11 21:47:32 UTC (rev 82279)
@@ -0,0 +1,23 @@
+--- 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 @@
+ return osp.join(doc_path, python_chm[0])
+ else:
+ vinf = sys.version_info
+- doc_path = '/usr/share/doc/python%d.%d/html' % (vinf[0], vinf[1])
++ 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'))
Added: trunk/dports/python/py-spyder/Files/spyderlib_utils_programs.py.patch
===================================================================
--- trunk/dports/python/py-spyder/Files/spyderlib_utils_programs.py.patch (rev 0)
+++ trunk/dports/python/py-spyder/Files/spyderlib_utils_programs.py.patch 2011-08-11 21:47:32 UTC (rev 82279)
@@ -0,0 +1,15 @@
+--- 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 = "/Applications/MacPorts/Qt4/" + basename + ".app/Contents/MacOS/" + basename
++ if osp.isfile(abspath):
++ if get_path:
++ return abspath
++ else:
++ return True
+ return False
+
+ def run_program(name, args=[]):
Modified: trunk/dports/python/py-spyder/Portfile
===================================================================
--- trunk/dports/python/py-spyder/Portfile 2011-08-11 21:44:44 UTC (rev 82278)
+++ trunk/dports/python/py-spyder/Portfile 2011-08-11 21:47:32 UTC (rev 82279)
@@ -4,7 +4,7 @@
PortSystem 1.0
name py-spyder
version 2.0.12
-revision 2
+revision 3
PortGroup python 1.0
@@ -40,11 +40,21 @@
if {${subport} != ${name}} {
# Set the pylint executable name
set LINT_BIN_NAME pylint-${python.branch}
- patchfiles patch-widgets-pylintgui.py.diff
+ patchfiles patch-widgets-pylintgui.py.diff \
+ spyderlib_spyder.py.diff \
+ spyderlib_utils_programs.py.patch
post-patch {
reinplace "s|@@LINT_BIN_NAME@@|${LINT_BIN_NAME}|g" \
${worksrcpath}/spyderplugins/widgets/pylintgui.py
+ reinplace "s|\"assistant\"|\"Assistant\"|g" \
+ ${worksrcpath}/spyderlib/spyder.py
+ reinplace "s|\"linguist\"|\"Linguist\"|g" \
+ ${worksrcpath}/spyderlib/spyder.py
+ reinplace "s|\"designer\"|\"Designer\"|g" \
+ ${worksrcpath}/spyderlib/spyder.py
+ reinplace "s|@@PREFIX@@|${prefix}|g" \
+ ${worksrcpath}/spyderlib/spyder.py
}
depends_lib-append port:py${python.version}-pyqt4 \
@@ -54,7 +64,8 @@
port:py${python.version}-sphinx \
port:py${python.version}-pyflakes \
port:py${python.version}-ipython \
- port:py${python.version}-rope
+ port:py${python.version}-rope \
+ port:py${python.version}-htmldocs
if {${python.version} == ${python.default_version}} {
post-destroot {
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20110811/629809c6/attachment.html>
More information about the macports-changes
mailing list