source: trunk/dports/python/py-obspy/Portfile

Last change on this file was 151214, checked in by petr@…, 16 months ago

py-obspy: remove conflict with py-obspy-devel

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 3.8 KB
Line 
1# -*- 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
2# $Id: Portfile 151214 2016-08-10 16:13:48Z ryandesign@macports.org $
3
4PortSystem          1.0
5PortGroup           python 1.0
6PortGroup           select 1.0
7
8set _name           obspy
9set _n              [string index ${_name} 0]
10
11name                py-${_name}
12version             1.0.2
13categories-append   science
14platforms           darwin
15license             LGPL-3
16
17maintainers         petr openmaintainer
18
19description         Python framework for processing seismological data
20
21long_description    \
22    ObsPy is an open-source project dedicated to provide a Python framework \
23    for processing seismological data. It provides support for file formats \
24    and signal processing routines which allow the manipulation, analysis \
25    and visualization of seismological time series. The goal of the ObsPy \
26    project is to facilitate rapid application development for seismology.
27
28homepage            http://www.obspy.org/
29
30use_zip             yes
31distname            ${_name}-${version}
32master_sites        pypi:${_n}/${_name}/
33
34checksums           md5     b345b2cb5b136addd1d18012bfbd129b \
35                    rmd160  be379d314d9a0fcf05c40c7c99212ee57e646b5a \
36                    sha256  37d563e36a44a5309b2f53b394d7391d49c8a62b0e8d0f0d13f54ea4e2943230
37
38python.versions     27 34 35
39
40if {${name} ne ${subport}} {
41    # py-scipy is not universal
42    universal_variant       no
43
44    depends_build-append    port:py${python.version}-setuptools \
45                            port:py${python.version}-numpy
46
47    depends_lib-append      port:py${python.version}-decorator \
48                            port:py${python.version}-future \
49                            port:py${python.version}-lxml \
50                            port:py${python.version}-matplotlib \
51                            port:py${python.version}-numpy \
52                            port:py${python.version}-scipy \
53                            port:py${python.version}-requests \
54                            port:py${python.version}-sqlalchemy
55
56    # soft dependencies added for simplicity
57    depends_lib-append      port:py${python.version}-gdal \
58                            port:py${python.version}-geographiclib
59
60    # Note: Required for post-installation testing only
61    depends_run-append      port:py${python.version}-flake8 \
62                            port:py${python.version}-flake8-pep8-naming \
63                            port:py${python.version}-pyproj
64
65    # Python 3.3+: mock is available as unittest.mock
66    if { ${python.version} < 33 } {
67        depends_run-append  port:py${python.version}-mock
68    }
69
70    # add manpages
71    depends_build-append    port:help2man
72
73    post-build {
74        set libarch [glob -tail -directory ${worksrcpath}/build lib.*]
75        set libsrc build/${libarch}/obspy/lib
76        set libtgt ${worksrcpath}/obspy/lib
77
78        # hack: link to built libraries to make scripts (and help2man) work
79        foreach l [glob -tail -directory ${worksrcpath}/${libsrc} *.so] {
80            ln -s ../../${libsrc}/${l} ${libtgt}/.
81        }
82
83        system -W ${worksrcpath} "${build.cmd} build_man"
84    }
85    post-destroot {
86        system -W ${worksrcpath} "${destroot.cmd} install_man  ${destroot.destdir}"
87    }
88
89    # port select
90    depends_run-append  port:${_name}_select
91
92    select.group    ${_name}
93    select.file     ${filespath}/${_name}${python.version}
94
95    notes-append "
96To make this Python ${python.branch} version of ObsPy the default \
97(i.e, use its script by their default names, e.g. obspy-runtests, etc.), run:
98
99sudo port select --set ${select.group} [file tail ${select.file}]
100    "
101
102    livecheck.type  none
103} else {
104    livecheck.type  regex
105    livecheck.url   https://pypi.python.org/pypi/${_name}/json
106    livecheck.regex "\"${_name}-(\[.\\d\]+)\\${extract.suffix}\""
107}
Note: See TracBrowser for help on using the repository browser.