[137886] users/mojca/ports/python
Lawrence Velázquez
larryv at macports.org
Mon Jun 22 13:05:50 PDT 2015
Please consider using the new "pypi" fetch group and livecheck type. For example:
http://trac.macports.org/browser/trunk/dports/python/py-vcversioner/Portfile?rev=137886 <http://trac.macports.org/browser/trunk/dports/python/py-vcversioner/Portfile?rev=137886>
Also, you should use Tcl's "file attributes" command instead of shelling out to "chmod".
vq
> On Jun 22, 2015, at 2:15 PM, mojca at macports.org wrote:
>
> Revision
> 137886 <https://trac.macports.org/changeset/137886>Author
> mojca at macports.org <mailto:mojca at macports.org>Date
> 2015-06-22 11:15:47 -0700 (Mon, 22 Jun 2015)
> Log Message
>
> mojca/geomagpy: preliminary package
> Added Paths
>
> users/mojca/ports/python/py-GeomagPy/
> users/mojca/ports/python/py-GeomagPy/Portfile <x-msg://31/#usersmojcaportspythonpyGeomagPyPortfile>
> users/mojca/ports/python/py-GeomagPy/files/
> users/mojca/ports/python/py-GeomagPy/files/patch-gui-xmagpy.py.diff <x-msg://31/#usersmojcaportspythonpyGeomagPyfilespatchguixmagpypydiff>
> users/mojca/ports/python/py-GeomagPy/files/patch-setup.py.diff <x-msg://31/#usersmojcaportspythonpyGeomagPyfilespatchsetuppydiff>
> Diff
>
> <>Added: users/mojca/ports/python/py-GeomagPy/Portfile (0 => 137886)
>
> --- users/mojca/ports/python/py-GeomagPy/Portfile (rev 0)
> +++ users/mojca/ports/python/py-GeomagPy/Portfile 2015-06-22 18:15:47 UTC (rev 137886)
> @@ -0,0 +1,56 @@
> +# -*- 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
> +# $Id$
> +
> +PortSystem 1.0
> +PortGroup python 1.0
> +
> +name py-GeomagPy
> +version 0.1.328
> +platforms darwin
> +license GPL-3
> +maintainers mojca openmaintainer
> +
> +description Geomagnetic analysis tools.
> +long_description ${description}
> +
> +homepage http://pypi.python.org/pypi/GeomagPy/ <http://pypi.python.org/pypi/GeomagPy/>
> +master_sites https://pypi.python.org/packages/source/G/GeomagPy <https://pypi.python.org/packages/source/G/GeomagPy>
> +distname GeomagPy-0.1.328
> +
> +checksums rmd160 c43f289f3a3bb6285427f5c6c2e0a54e4195ade3 \
> + sha256 1863f3b9ce17390342e1f4f3bb2bba42f38c702e3ebd19425af5334459bc17e4
> +
> +python.versions 27 34
> +
> +# TODO:
> +# - provide a separate +gui option that is enabled by default
> +# - spacepy might be missing
> +if {${name} ne ${subport}} {
> + # TODO: mysql
> + depends_build-append \
> + port:py${python.version}-setuptools
> + depends_run-append \
> + port:py${python.version}-numpy \
> + port:py${python.version}-scipy \
> + port:py${python.version}-netcdf4 \
> + port:py${python.version}-pexpect \
> + port:py${python.version}-wxpython-3.0
> +
> + patchfiles patch-gui-xmagpy.py.diff \
> + patch-setup.py.diff
> +
> + post-patch {
> + reinplace "s|/usr/bin/env python|${python.bin}|" ${worksrcpath}/magpy/gui/xmagpy.py
> + system "chmod +x ${worksrcpath}/magpy/gui/xmagpy.py"
> + delete ${worksrcpath}/bin/example.py
> + }
> +
> + post-destroot {
> + ln -s ${python.pkgd}/magpy/gui/xmagpy.py ${destroot}${prefix}/bin/xmagpy-${python.branch}
> + }
> +
> + livecheck.type none
> +} else {
> + livecheck.type regex
> + livecheck.url ${master_sites}
> +}
> Property changes on: users/mojca/ports/python/py-GeomagPy/Portfile
> ___________________________________________________________________
> <>Added: svn:keywords
> <>Added: svn:eol-style
> <>Added: users/mojca/ports/python/py-GeomagPy/files/patch-gui-xmagpy.py.diff (0 => 137886)
>
> --- users/mojca/ports/python/py-GeomagPy/files/patch-gui-xmagpy.py.diff (rev 0)
> +++ users/mojca/ports/python/py-GeomagPy/files/patch-gui-xmagpy.py.diff 2015-06-22 18:15:47 UTC (rev 137886)
> @@ -0,0 +1,30 @@
> +--- magpy/gui/xmagpy.py.orig
> ++++ magpy/gui/xmagpy.py
> +@@ -1,25 +1,7 @@
> +-import sys
> +-from socket import gethostname
> ++#! /usr/bin/env python
> +
> +-try:
> +- from magpy.gui.magpy_gui import *
> +-except:
> ++from magpy.gui.magpy_gui import *
> +
> +- planet = gethostname()
> +- leonplanets = ['Earth', 'uranus', 'saturn']
> +-
> +- if planet == 'zagll1':
> +- magpypath = '/home/rachel/Software/MagPyDev/magpy/trunk/src/'
> +- elif planet in leonplanets:
> +- magpypath = '/home/leon/Software/magpy/trunk/src/'
> +- elif planet == 'Venus':
> +- magpypath = '/home/leon/Software/magpy/'
> +- else:
> +- magpypath = '/home/leon/Software/magpy/trunk/src/'
> +-
> +- sys.path.append(magpypath)
> +- from magpy.gui.magpy_gui import *
> +-
> + app = wx.App(redirect=False)
> + frame = MainFrame(None,-1,"")
> + frame.Show()
> <>Added: users/mojca/ports/python/py-GeomagPy/files/patch-setup.py.diff (0 => 137886)
>
> --- users/mojca/ports/python/py-GeomagPy/files/patch-setup.py.diff (rev 0)
> +++ users/mojca/ports/python/py-GeomagPy/files/patch-setup.py.diff 2015-06-22 18:15:47 UTC (rev 137886)
> @@ -0,0 +1,11 @@
> +--- setup.py.orig
> ++++ setup.py
> +@@ -11,7 +11,7 @@ setup(
> + author='R. Leonhardt, R. Bailey',
> + author_email='roman.leonhardt at zamg.ac.at <mailto:author_email='roman.leonhardt at zamg.ac.at>',
> + packages=['magpy', 'magpy.opt', 'magpy.examples', 'magpy.lib', 'magpy.acquisition', 'magpy.collector', 'magpy.gui'],
> +- scripts=['bin/example.py'],
> ++ scripts=[],
> + url='http://pypi.python.org/pypi/GeomagPy/' <http://pypi.python.org/pypi/GeomagPy/'>,
> + license='LICENSE.txt',
> + description='Geomagnetic analysis tools.',
> _______________________________________________
> macports-changes mailing list
> macports-changes at lists.macosforge.org <mailto:macports-changes at lists.macosforge.org>
> https://lists.macosforge.org/mailman/listinfo/macports-changes <https://lists.macosforge.org/mailman/listinfo/macports-changes>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-dev/attachments/20150622/7f51cbae/attachment.html>
More information about the macports-dev
mailing list