<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[152537] trunk/dports/python/py-magpy</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="https://trac.macports.org/changeset/152537">152537</a></dd>
<dt>Author</dt> <dd>mojca@macports.org</dd>
<dt>Date</dt> <dd>2016-09-11 22:24:28 -0700 (Sun, 11 Sep 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>py-magpy: bugfixes, optional runtime dependencies</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkdportspythonpymagpyPortfile">trunk/dports/python/py-magpy/Portfile</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li>trunk/dports/python/py-magpy/files/</li>
<li><a href="#trunkdportspythonpymagpyfilespatchmagpyguidialogclaespydiff">trunk/dports/python/py-magpy/files/patch-magpy-gui-dialogclaes.py.diff</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkdportspythonpymagpyPortfile"></a>
<div class="modfile"><h4>Modified: trunk/dports/python/py-magpy/Portfile (152536 => 152537)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/python/py-magpy/Portfile        2016-09-12 05:17:35 UTC (rev 152536)
+++ trunk/dports/python/py-magpy/Portfile        2016-09-12 05:24:28 UTC (rev 152537)
</span><span class="lines">@@ -5,9 +5,10 @@
</span><span class="cx"> PortGroup           python 1.0
</span><span class="cx"> PortGroup           github 1.0
</span><span class="cx"> 
</span><del>-github.setup        geomagpy magpy b5882f5
</del><ins>+github.setup        geomagpy magpy 511d1f2
</ins><span class="cx"> name                py-magpy
</span><span class="cx"> version             0.3.1
</span><ins>+revision            1
</ins><span class="cx"> platforms           darwin
</span><span class="cx"> license             GPL-3
</span><span class="cx"> maintainers         mojca openmaintainer
</span><span class="lines">@@ -15,29 +16,29 @@
</span><span class="cx"> description         Geomagnetic analysis tools.
</span><span class="cx"> long_description    ${description}
</span><span class="cx"> 
</span><del>-checksums           rmd160  1c18138ade91255207943c2d9199bcac18b1eb73 \
-                    sha256  ab87e66336827cd734363e9d88dba49784f15590bc9c8e04ebef99ba1c4640c0
</del><ins>+checksums           rmd160  9bd4d5c48cbad3b52276038b2c851174806592fe \
+                    sha256  9181cd92deb05a14611e0d144575360bc012f93ee61a19df59d79efd7195c394
</ins><span class="cx"> 
</span><span class="cx"> python.versions     27 35
</span><span class="cx"> 
</span><span class="cx"> # TODO:
</span><del>-# - add a port py-spacepy
</del><span class="cx"> # - add a port py-autobahn
</span><del>-# - properly enable and test MySQL
</del><span class="cx"> if {${name} ne ${subport}} {
</span><del>-    # TODO: mysql
</del><span class="cx">     depends_build-append \
</span><span class="cx">                     port:py${python.version}-setuptools
</span><del>-    # mysql and scipy are optional
-    # xmagpy needs py-wxpython-3.0
-    # py-matplotlib is often needed
</del><span class="cx">     depends_run-append \
</span><span class="cx">                     port:py${python.version}-numpy \
</span><span class="cx">                     port:py${python.version}-netcdf4 \
</span><span class="cx">                     port:py${python.version}-pexpect
</span><del>-                    # port:py${python.version}-scipy \
-                    # port:py${python.version}-mysql
</del><ins>+    # optional
+    depends_run-append \
+                    port:py${python.version}-mysql \
+                    port:py${python.version}-matplotlib \
+                    port:py${python.version}-scipy \
+                    port:py${python.version}-wxpython-3.0
</ins><span class="cx"> 
</span><ins>+    patchfiles      patch-magpy-gui-dialogclaes.py.diff
+
</ins><span class="cx">     post-patch {
</span><span class="cx">         reinplace &quot;s|/usr/bin/env python|${python.bin}|&quot; ${worksrcpath}/magpy/gui/xmagpy.py
</span><span class="cx">     }
</span></span></pre></div>
<a id="trunkdportspythonpymagpyfilespatchmagpyguidialogclaespydiff"></a>
<div class="addfile"><h4>Added: trunk/dports/python/py-magpy/files/patch-magpy-gui-dialogclaes.py.diff (0 => 152537)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/python/py-magpy/files/patch-magpy-gui-dialogclaes.py.diff                                (rev 0)
+++ trunk/dports/python/py-magpy/files/patch-magpy-gui-dialogclaes.py.diff        2016-09-12 05:24:28 UTC (rev 152537)
</span><span class="lines">@@ -0,0 +1,366 @@
</span><ins>+https://github.com/geomagpy/magpy/issues/29
+
+--- magpy/gui/dialogclasses.py.orig
++++ magpy/gui/dialogclasses.py
+@@ -113,7 +113,7 @@ class OpenWebAddressDialog(wx.Dialog):
+             self.getFavsComboBox.Append(elem)

+     def OnClose(self, e):
+-        self.Destroy()
++        self.Close(True)


+ class LoadDataDialog(wx.Dialog):
+@@ -193,7 +193,7 @@ class LoadDataDialog(wx.Dialog):
+         self.closeButton.Bind(wx.EVT_BUTTON, self.OnClose)

+     def OnClose(self, e):
+-        self.Destroy()
++        self.Close(True)


+ class ExportDataDialog(wx.Dialog):
+@@ -335,7 +335,7 @@ class ExportDataDialog(wx.Dialog):
+         self.filenameTextCtrl.SetValue(self.filename)

+     def OnClose(self, e):
+-        self.Destroy()
++        self.Close(True)

+ class ExportModifyNameDialog(wx.Dialog):
+     &quot;&quot;&quot;
+@@ -418,7 +418,7 @@ class ExportModifyNameDialog(wx.Dialog):
+         self.closeButton.Bind(wx.EVT_BUTTON, self.OnClose)

+     def OnClose(self, e):
+-        self.Destroy()
++        self.Close(True)

+ class DatabaseConnectDialog(wx.Dialog):
+     &quot;&quot;&quot;
+@@ -485,7 +485,7 @@ class DatabaseConnectDialog(wx.Dialog):
+         self.closeButton.Bind(wx.EVT_BUTTON, self.OnClose)

+     def OnClose(self, e):
+-        self.Destroy()
++        self.Close(True)


+ class DatabaseContentDialog(wx.Dialog):
+@@ -543,7 +543,7 @@ class DatabaseContentDialog(wx.Dialog):
+         self.closeButton.Bind(wx.EVT_BUTTON, self.OnClose)

+     def OnClose(self, e):
+-        self.Destroy()
++        self.Close(True)


+ class OptionsInitDialog(wx.Dialog):
+@@ -668,7 +668,7 @@ class OptionsInitDialog(wx.Dialog):
+         self.closeButton.Bind(wx.EVT_BUTTON, self.OnClose)

+     def OnClose(self, e):
+-        self.Destroy()
++        self.Close(True)


+ class OptionsDIDialog(wx.Dialog):
+@@ -827,7 +827,7 @@ class OptionsDIDialog(wx.Dialog):
+         self.closeButton.Bind(wx.EVT_BUTTON, self.OnClose)

+     def OnClose(self, e):
+-        self.Destroy()
++        self.Close(True)

+ # ###################################################
+ #    Stream page
+@@ -931,7 +931,7 @@ class StreamExtractValuesDialog(wx.Dialog):
+         self.closeButton.Bind(wx.EVT_BUTTON, self.OnClose)

+     def OnClose(self, e):
+-        self.Destroy()
++        self.Close(True)


+ class StreamSelectKeysDialog(wx.Dialog):
+@@ -992,7 +992,7 @@ class StreamSelectKeysDialog(wx.Dialog):
+         self.closeButton.Bind(wx.EVT_BUTTON, self.OnClose)

+     def OnClose(self, e):
+-        self.Destroy()
++        self.Close(True)


+ class StreamPlotOptionsDialog(wx.Dialog):
+@@ -1051,7 +1051,7 @@ class StreamPlotOptionsDialog(wx.Dialog):
+         self.closeButton.Bind(wx.EVT_BUTTON, self.OnClose)

+     def OnClose(self, e):
+-        self.Destroy()
++        self.Close(True)


+ class StreamFlagOutlierDialog(wx.Dialog):
+@@ -1121,7 +1121,7 @@ class StreamFlagOutlierDialog(wx.Dialog):
+         self.closeButton.Bind(wx.EVT_BUTTON, self.OnClose)

+     def OnClose(self, e):
+-        self.Destroy()
++        self.Close(True)


+ class StreamFlagRangeDialog(wx.Dialog):
+@@ -1275,7 +1275,7 @@ class StreamFlagRangeDialog(wx.Dialog):
+             pass

+     def OnClose(self, e):
+-        self.Destroy()
++        self.Close(True)

+     def SetValue(self):
+             self.UpperLimitTextCtrl.Enable()
+@@ -1370,7 +1370,7 @@ class StreamFlagSelectionDialog(wx.Dialog):
+         self.closeButton.Bind(wx.EVT_BUTTON, self.OnClose)

+     def OnClose(self, e):
+-        self.Destroy()
++        self.Close(True)


+ class StreamLoadFlagDialog(wx.Dialog):
+@@ -1433,14 +1433,14 @@ class StreamLoadFlagDialog(wx.Dialog):
+         self.loadFileButton.Bind(wx.EVT_BUTTON, self.OnLoadFile)

+     def OnClose(self, e):
+-        self.Destroy()
++        self.Close(True)

+     def OnLoadDB(self, e):
+         self.flaglist = db2flaglist(self.db, self.sensorid)
+         dlg = wx.MessageDialog(self, &quot;Flags for {} loaded from DB!\nFLAGS table contained {} inputs\n&quot;.format(self.sensorid,len(self.flaglist)),&quot;FLAGS obtained from DB&quot;, wx.OK|wx.ICON_INFORMATION)
+         dlg.ShowModal()
+         dlg.Destroy()
+-        self.Destroy()
++        self.Close(True)

+     def OnLoadFile(self, e):
+         openFileDialog = wx.FileDialog(self, &quot;Open&quot;, &quot;&quot;, &quot;&quot;, 
+@@ -1453,7 +1453,7 @@ class StreamLoadFlagDialog(wx.Dialog):
+         except:
+             self.flaglist = [] 
+         openFileDialog.Destroy()
+-        self.Destroy()
++        self.Close(True)


+ class StreamSaveFlagDialog(wx.Dialog):
+@@ -1515,14 +1515,14 @@ class StreamSaveFlagDialog(wx.Dialog):
+         self.saveFileButton.Bind(wx.EVT_BUTTON, self.OnSaveFile)

+     def OnClose(self, e):
+-        self.Destroy()
++        self.Close(True)

+     def OnSaveDB(self, e):
+         flaglist2db(self.db, self.flaglist)
+         dlg = wx.MessageDialog(self, &quot;Flags stored in connected DB!\nFLAGS table extended with {} inputs\n&quot;.format(len(self.flaglist)),&quot;FLAGS added to DB&quot;, wx.OK|wx.ICON_INFORMATION)
+         dlg.ShowModal()
+         dlg.Destroy()
+-        self.Destroy()
++        self.Close(True)

+     def OnSaveFile(self, e):
+         saveFileDialog = wx.FileDialog(self, &quot;Save As&quot;, &quot;&quot;, &quot;&quot;, 
+@@ -1533,7 +1533,7 @@ class StreamSaveFlagDialog(wx.Dialog):
+         saveFileDialog.Destroy()
+         print (flagname)
+         saveflags(self.flaglist,flagname)
+-        self.Destroy()
++        self.Close(True)

+ # ###################################################
+ #    Meta page
+@@ -1648,7 +1648,7 @@ class MetaDataDialog(wx.Dialog):
+         self.closeButton.Bind(wx.EVT_BUTTON, self.OnClose)

+     def OnClose(self, e):
+-        self.Destroy()
++        self.Close(True)

+     def AppendLabel(self, key,label):
+         from magpy.lib.magpy_formats import IAFMETA, IAGAMETA, IMAGCDFMETA
+@@ -1739,7 +1739,7 @@ class AnalysisFitDialog(wx.Dialog):
+         self.closeButton.Bind(wx.EVT_BUTTON, self.OnClose)

+     def OnClose(self, e):
+-        self.Destroy()
++        self.Close(True)


+ class AnalysisFilterDialog(wx.Dialog):
+@@ -1826,7 +1826,7 @@ class AnalysisFilterDialog(wx.Dialog):
+         self.closeButton.Bind(wx.EVT_BUTTON, self.OnClose)

+     def OnClose(self, e):
+-        self.Destroy()
++        self.Close(True)


+ class AnalysisOffsetDialog(wx.Dialog):
+@@ -1931,7 +1931,7 @@ class AnalysisOffsetDialog(wx.Dialog):
+         self.closeButton.Bind(wx.EVT_BUTTON, self.OnClose)

+     def OnClose(self, e):
+-        self.Destroy()
++        self.Close(True)

+     def OnChangeRange(self, e):
+         val = self.offsetRadioBox.GetStringSelection()
+@@ -2003,7 +2003,7 @@ class AnalysisRotationDialog(wx.Dialog):
+         self.closeButton.Bind(wx.EVT_BUTTON, self.OnClose)

+     def OnClose(self, e):
+-        self.Destroy()
++        self.Close(True)


+ class AnalysisBaselineDialog(wx.Dialog):
+@@ -2089,7 +2089,7 @@ class AnalysisBaselineDialog(wx.Dialog):
+         self.parameterButton.Bind(wx.EVT_BUTTON, self.OnParameter)

+     def OnClose(self, e):
+-        self.Destroy()
++        self.Close(True)

+     def OnParameter(self, e):
+         # open fit dlg
+@@ -2177,7 +2177,7 @@ class LoadDIDialog(wx.Dialog):
+         self.loadRemoteButton.Bind(wx.EVT_BUTTON, self.OnLoadDIRemote)

+     def OnClose(self, e):
+-        self.Destroy()
++        self.Close(True)

+     def OnLoadDIFiles(self,e):
+         self.difiledirname = ''
+@@ -2186,7 +2186,7 @@ class LoadDIDialog(wx.Dialog):
+         if dlg.ShowModal() == wx.ID_OK:
+             self.pathlist = dlg.GetPaths()
+         dlg.Destroy()
+-        self.Destroy()
++        self.Close(True)

+     def OnLoadDIDB(self,e):
+         #self.dirname = ''
+@@ -2195,7 +2195,7 @@ class LoadDIDialog(wx.Dialog):
+         if dlg.ShowModal() == wx.ID_OK:
+             self.pathlist = dlg.GetPaths()
+         dlg.Destroy()
+-        self.Destroy()
++        self.Close(True)

+     def OnLoadDIRemote(self,e):
+         self.dirname = ''
+@@ -2204,7 +2204,7 @@ class LoadDIDialog(wx.Dialog):
+         if dlg.ShowModal() == wx.ID_OK:
+             self.pathlist = dlg.GetPaths()
+         dlg.Destroy()
+-        self.Destroy()
++        self.Close(True)


+ class DefineVarioDialog(wx.Dialog):
+@@ -2267,7 +2267,7 @@ class DefineVarioDialog(wx.Dialog):
+         self.loadFileButton.Bind(wx.EVT_BUTTON, self.OnDefineVario)

+     def OnClose(self, e):
+-        self.Destroy()
++        self.Close(True)

+     def OnDefineVario(self,e):
+         dialog = wx.DirDialog(None, &quot;Choose a directory with variometer data:&quot;,self.variopath,style=wx.DD_DEFAULT_STYLE | wx.DD_NEW_DIR_BUTTON)
+@@ -2337,7 +2337,7 @@ class DefineScalarDialog(wx.Dialog):
+         self.loadFileButton.Bind(wx.EVT_BUTTON, self.OnDefineScalar)

+     def OnClose(self, e):
+-        self.Destroy()
++        self.Close(True)


+     def OnDefineScalar(self,e):
+@@ -2423,7 +2423,7 @@ class DISetParameterDialog(wx.Dialog):
+         self.closeButton.Bind(wx.EVT_BUTTON, self.OnClose)

+     def OnClose(self, e):
+-        self.Destroy()
++        self.Close(True)



+@@ -3508,7 +3508,7 @@ class AGetMARCOSDialog(wx.Dialog):
+         self.closeButton.Bind(wx.EVT_BUTTON, self.OnClose)

+     def OnClose(self, e):
+-        self.Destroy()
++        self.Close(True)

+ class BGetMARCOSDialog(wx.Dialog):
+     &quot;&quot;&quot;
+@@ -3564,7 +3564,7 @@ class BGetMARCOSDialog(wx.Dialog):
+         self.closeButton.Bind(wx.EVT_BUTTON, self.OnClose)

+     def OnClose(self, e):
+-        self.Destroy()
++        self.Close(True)


+ class AGetMARTASDialog(wx.Dialog):
+@@ -3634,10 +3634,10 @@ class AGetMARTASDialog(wx.Dialog):
+         self.addButton.Bind(wx.EVT_BUTTON, self.OnAdd)

+     def OnClose(self, e):
+-        self.Destroy()
++        self.Close(True)

+     def OnAdd(self, e):
+-        self.Destroy()
++        self.Close(True)

+ class MultiStreamDialog(wx.Dialog):
+     &quot;&quot;&quot;
+@@ -3761,7 +3761,7 @@ class MultiStreamDialog(wx.Dialog):
+             exec('self.'+name+'KeyButton.Bind(wx.EVT_BUTTON, partial( self.OnGetKeys, name = idx ) )')

+     def OnClose(self, e):
+-        self.Destroy()
++        self.Close(True)

+     def OnGetKeys(self, e, name):
+         print (&quot;Stream&quot;, name)
+@@ -3810,7 +3810,7 @@ class MultiStreamDialog(wx.Dialog):
+             #self.streamlist.append(self.result)
+             #self.streamkeylist.append(self.result._get_key_headers())
+             #
+-            self.Destroy()
++            self.Close(True)
+         else:
+             dlg = wx.MessageDialog(self, &quot;Merge requires two records\n&quot;
+                             &quot; - not less, not more\n&quot;,
+@@ -3836,7 +3836,7 @@ class MultiStreamDialog(wx.Dialog):
+             self.result = subtractStreams(substreamlist[0],substreamlist[1])
+             self.resultkeys = self.result._get_key_headers()
+             self.modify = True
+-            self.Destroy()
++            self.Close(True)
+         else:
+             dlg = wx.MessageDialog(self, &quot;Subtract requires two records\n&quot;
+                             &quot; - not less, not more\n&quot;,
+@@ -3875,7 +3875,7 @@ class MultiStreamDialog(wx.Dialog):
+             self.result = joinStreams(substreamlist[0],substreamlist[1])
+             self.resultkeys = self.result._get_key_headers()
+             self.modify = True
+-            self.Destroy()
++            self.Close(True)
+         else:
+             dlg = wx.MessageDialog(self, &quot;Subtract requires two records\n&quot;
+                             &quot; - not less, not more\n&quot;,
</ins></span></pre>
</div>
</div>

</body>
</html>