[116934] trunk/dports/python/py-obspy

macsforever2000 at macports.org macsforever2000 at macports.org
Mon Feb 10 13:07:25 PST 2014


Revision: 116934
          https://trac.macports.org/changeset/116934
Author:   macsforever2000 at macports.org
Date:     2014-02-10 13:07:25 -0800 (Mon, 10 Feb 2014)
Log Message:
-----------
py-obspy: Update to version 0.9.0. Add dependency on py-flake8. (#42438)

Modified Paths:
--------------
    trunk/dports/python/py-obspy/Portfile
    trunk/dports/python/py-obspy/files/patch-setup.py.diff

Modified: trunk/dports/python/py-obspy/Portfile
===================================================================
--- trunk/dports/python/py-obspy/Portfile	2014-02-10 21:06:33 UTC (rev 116933)
+++ trunk/dports/python/py-obspy/Portfile	2014-02-10 21:07:25 UTC (rev 116934)
@@ -4,49 +4,63 @@
 PortSystem          1.0
 PortGroup           python 1.0
 
+set _name           obspy
+set _n              [string index ${_name} 0]
+
 name                py-obspy
-version             0.8.4
-revision            2
+version             0.9.0
 categories-append   science
 platforms           darwin
+license             LGPL-3
+
 maintainers         bo.ingv.it:Peter.Danecek openmaintainer
 
-license             LGPL-3
-
 description         Python framework for processing seismological data
 
-long_description    ObsPy is an open-source project dedicated to provide a Python \
-                    framework for processing seismological data. It provides \
-                    support for file formats and signal processing routines \
-                    which allow the manipulation, analysis and visualization \
-                    of seismological time series. The goal of the ObsPy project is \
-                    to facilitate rapid application development for seismology.
+long_description    \
+    This port provides a development snapshot of the ObsPy package. \
+    ObsPy is an open-source project dedicated to provide a Python framework \
+    for processing seismological data. It provides support for file formats \
+    and signal processing routines which allow the manipulation, analysis \
+    and visualization of seismological time series. The goal of the ObsPy \
+    project is to facilitate rapid application development for seismology.
 
-homepage            http://obspy.org/
+homepage            http://www.obspy.org/
 
 use_zip             yes
-distname            obspy-${version}
-master_sites        https://pypi.python.org/packages/source/o/obspy/
+distname            ${_name}-${version}
+master_sites        https://pypi.python.org/packages/source/${_n}/${_name}/
 
-checksums           md5     9da79d3a0604d433085ad4dc0e430100 \
-                    rmd160  4a5b6e486304cd4e0a96d94ddc8bf88eb0a6f574 \
-                    sha256  6e9e0a5c0e673ae41d64ca265d4abdadf2b83a60ff27c516a8dbb0e2b38965cf
+checksums           md5     f720f675e66e8b2b6518e41b9ab9ada4 \
+                    rmd160  b58932bc76e1bd21a2280d78aa868c767e3491b1 \
+                    sha256  91367c7d1b63a4289b4a0ee84d49978d7523776da10629aa40a3aab197fad5e7
 
 python.versions     26 27
 
 if {${name} ne ${subport}} {
-    depends_build-append    port:py${python.version}-setuptools
+    depends_build-append    port:py${python.version}-numpy
+    # Note: setuptools required only for developers
+
     depends_lib-append      port:py${python.version}-numpy \
                             port:py${python.version}-scipy \
                             port:py${python.version}-lxml \
                             port:py${python.version}-suds \
-                            port:py${python.version}-sqlalchemy
+                            port:py${python.version}-sqlalchemy \
+                            port:py${python.version}-matplotlib
 
+    # Note: Required for post-installation testing only
+    depends_run-append      port:py${python.version}-flake8 \
+                            port:py${python.version}-nose \
+                            port:py${python.version}-mock
+
     # py-scipy is not universal
     universal_variant       no
 
+    # Note: temporary workaround for numpy.distutils behaviour
     patchfiles              patch-setup.py.diff
 
+    # Check if and how to use compiler portgroup ...
+    #
     set gcc_versions {4.3 4.4 4.5 4.6 4.7 4.8 4.9}
     set default_fortran_variant +gcc48
 
@@ -86,11 +100,14 @@
             depends_build-append port:gcc${ver_no_dot}
 
             configure.fc  ${prefix}/bin/gfortran-mp-${ver}
-            compiler.library_path ${prefix}/lib/gcc${ver_no_dot}
+            configure.f77 ${prefix}/bin/gfortran-mp-${ver}
+            configure.f90 ${prefix}/bin/gfortran-mp-${ver}
         }
     }
+
+    livecheck.type  none
+} else {
+    livecheck.type  regex
+    livecheck.url   [lindex ${master_sites} 0]
+    livecheck.regex ">${_name}-(\\d+(\\.\\d+)+)\\${extract.suffix}<"
 }
-
-livecheck.type      regex
-livecheck.url       ${master_sites}
-livecheck.regex     ">obspy-(\\d+\\.\\d+\\.\\d+)\\.zip<"

Modified: trunk/dports/python/py-obspy/files/patch-setup.py.diff
===================================================================
--- trunk/dports/python/py-obspy/files/patch-setup.py.diff	2014-02-10 21:06:33 UTC (rev 116933)
+++ trunk/dports/python/py-obspy/files/patch-setup.py.diff	2014-02-10 21:07:25 UTC (rev 116934)
@@ -1,30 +1,35 @@
 --- setup.orig.py
 +++ setup.py
-@@ -27,7 +27,6 @@
- from distutils.unixccompiler import UnixCCompiler
- from setuptools import find_packages, setup
- from setuptools.extension import Extension
--import distribute_setup
- import glob
- import os
- import platform
-@@ -370,8 +369,8 @@
-             # otherwise we just use the original compile method
-             UnixCCompiler.linker_so = None
-             return self._original_compile(obj, src, *args, **kwargs)
--        UnixCCompiler.linker_so = ["gfortran"]
--        self.compiler_so = ["gfortran"]
-+        UnixCCompiler.linker_so = [os.environ.get("FC")]
-+        self.compiler_so = [os.environ.get("FC")]
-         cc_args = ['-c', '-fno-underscoring']
-         cc_args.append('-fPIC')
-         try:
-@@ -629,8 +628,6 @@
+@@ -434,7 +434,10 @@
+     libname = _get_lib_name("tau")
+     files = glob.glob(os.path.join(path, "*.f"))
+     # compiler specific options
+-    kwargs = {'libraries': []}
++    # 2014-02-10, petr -- modification needed below
++    kwargs = {}
++    kwargs.update({'libraries': []})
++    kwargs.update({'extra_link_args': []})
+     # XXX: The build subdirectory is difficult to determine if installed
+     # via pypi or other means. I could not find a reliable way of doing it.
+     new_interface_path = os.path.join("build", libname + os.extsep + "pyf")
+@@ -452,6 +455,20 @@
+     # gfortran the option -lgcov is required
+     if os.environ.get('OBSPY_C_COVERAGE', ""):
+         kwargs['libraries'].append('gcov')
++
++    # 2014-02-10, petr -- workaround for unexpected numpy.distutils behaviour
++    #   This hot fix is needed for Macports. Macports sets `LDFLAGS` via
++    #   `Python Portgroup` to control build architecture setings.
++    #   For Fortran extentions this causes the default link arguments to be
++    #   canceled, which does not correspond to C bevavior. The fix below adds
++    #   these arguments manually.
++    #
++    #   Should probably be adressed in numpy.distutils.
++    #
++    if platform.system() == 'Darwin':
++        kwargs['extra_link_args'].append('-bundle')
++        kwargs['extra_link_args'].append('-undefined dynamic_lookup')
++
+     config.add_extension(libname, files, **kwargs)
  
- 
- def setupPackage(gfortran=True, ccompiler=True):
--    # automatically install distribute if the user does not have it installed
--    distribute_setup.use_setuptools()
-     # use lib2to3 for Python 3.x
-     if sys.version_info[0] == 3:
-         convert2to3()
+     add_data_files(config)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20140210/9afe0e8d/attachment-0001.html>


More information about the macports-changes mailing list