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 152193 2016-08-31 20:59:10Z sean@macports.org $ |
---|
3 | |
---|
4 | PortSystem 1.0 |
---|
5 | PortGroup python 1.0 |
---|
6 | PortGroup mpi 1.0 |
---|
7 | |
---|
8 | name py-netcdf4 |
---|
9 | version 1.2.4 |
---|
10 | revision 1 |
---|
11 | categories-append science |
---|
12 | platforms darwin |
---|
13 | maintainers sean \ |
---|
14 | fastmail.fm:jswhit \ |
---|
15 | openmaintainer |
---|
16 | license MIT |
---|
17 | |
---|
18 | description Python/numpy interface to netCDF |
---|
19 | long_description netCDF version 4 has many features not found in \ |
---|
20 | earlier versions of the library and is implemented \ |
---|
21 | on top of HDF5. This module can read and write files \ |
---|
22 | in both the new netCDF 4 and the old netCDF \ |
---|
23 | 3 format, and can create files that are readable by \ |
---|
24 | HDF5 clients. |
---|
25 | homepage http://code.google.com/p/netcdf4-python/ |
---|
26 | |
---|
27 | master_sites pypi:n/netCDF4 |
---|
28 | distname netCDF4-${version} |
---|
29 | |
---|
30 | checksums rmd160 1127a3aeb794ea69a1ed9d340f7bbda240648500 \ |
---|
31 | sha256 a6737eef106b75fe99b4b60e596666f86aeedc086c0037863382c1967a945351 |
---|
32 | |
---|
33 | mpi.enforce_variant netcdf |
---|
34 | mpi.setup |
---|
35 | |
---|
36 | patchfiles-append patch-hdf5path.diff |
---|
37 | |
---|
38 | build.env-append USE_NCCONFIG=1 |
---|
39 | destroot.env-append USE_NCCONFIG=1 |
---|
40 | |
---|
41 | python.versions 26 27 33 34 35 |
---|
42 | |
---|
43 | if {${name} ne ${subport}} { |
---|
44 | depends_lib-append port:netcdf \ |
---|
45 | port:py${python.version}-numpy \ |
---|
46 | port:py${python.version}-cython |
---|
47 | |
---|
48 | post-patch { |
---|
49 | reinplace -W ${worksrcpath} "s,@@PREFIX@@,${prefix}," setup.py |
---|
50 | } |
---|
51 | |
---|
52 | pre-configure { |
---|
53 | # py-netcdf4's setup.py uses nc-config for flags and libs but not compiler |
---|
54 | configure.cc {*}[exec ${prefix}/bin/nc-config --cc] |
---|
55 | } |
---|
56 | |
---|
57 | livecheck.type none |
---|
58 | } else { |
---|
59 | livecheck.type regex |
---|
60 | livecheck.url https://pypi.python.org/pypi/netCDF4 |
---|
61 | livecheck.regex >netCDF4-(.*)${extract.suffix}< |
---|
62 | } |
---|