-
-
Notifications
You must be signed in to change notification settings - Fork 25
/
meta.yaml
104 lines (94 loc) · 2.91 KB
/
meta.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
{% set version = "1.6.5" %}
{% set build = 1 %}
# recipe-lint fails if mpi is undefined
{% set mpi = mpi or 'nompi' %}
{% if mpi == "nompi" %}
# prioritize nompi via build number
{% set build = build + 100 %}
{% endif %}
package:
name: netcdf4
version: {{ version }}
source:
url: https://pypi.io/packages/source/n/netCDF4/netCDF4-{{ version }}.tar.gz
sha256: 824881d0aacfde5bd982d6adedd8574259c85553781e7b83e0ce82b890bfa0ef
build:
skip: true # [(win and vc<14) or (win and mpi != 'nompi')]
number: {{ build }}
# add build string so packages can depend on
# mpi or nompi variants explicitly:
# `netcdf4 * mpi_mpich_*` for mpich
# `netcdf4 * mpi_*` for any mpi
# `netcdf4 * nompi_*` for no mpi
{% if mpi != 'nompi' %}
{% set mpi_prefix = "mpi_" + mpi %}
{% else %}
{% set mpi_prefix = "nompi" %}
{% endif %}
string: {{ mpi_prefix }}_py{{ CONDA_PY }}h{{ PKG_HASH }}_{{ build }}
entry_points:
- ncinfo = netCDF4.utils:ncinfo
- nc4tonc3 = netCDF4.utils:nc4tonc3
- nc3tonc4 = netCDF4.utils:nc3tonc4
requirements:
build:
- python # [build_platform != target_platform]
- cross-python_{{ target_platform }} # [build_platform != target_platform]
- cython # [build_platform != target_platform]
- numpy # [build_platform != target_platform]
- {{ compiler('c') }}
- {{ stdlib("c") }}
host:
- python
- pip
- numpy
- cython >=0.19
- cftime >=1.0.1
# need to list hdf5 and libnetcdf twice to get version pinning from conda_build_config
# and build pinning from {{ mpi_prefix }}
- hdf5
- hdf5 * {{ mpi_prefix }}_*
- libnetcdf
- libnetcdf * {{ mpi_prefix }}_*
- {{ mpi }} # [mpi != 'nompi']
- mpi4py # [mpi != 'nompi']
- zlib
run:
- python
- setuptools
- certifi
- cftime
# the 'nompi' build should work with both non-MPI and MPI variants of the
# following libs
- hdf5 # [mpi == 'nompi']
- libnetcdf # [mpi == 'nompi']
- hdf5 * {{ mpi_prefix }}_* # [mpi != 'nompi']
- libnetcdf * {{ mpi_prefix }}_* # [mpi != 'nompi']
- {{ mpi }} # [mpi != 'nompi']
- mpi4py # [mpi != 'nompi']
- openssh # [mpi == 'openmpi']
test:
files:
- parallel_test.py # [mpi != 'nompi']
imports:
- netCDF4
- cftime
commands:
- ncinfo -h
- nc4tonc3 -h
- nc3tonc4 -h
- mpirun -np 4 python parallel_test.py # [mpi == 'mpich']
- mpirun --oversubscribe -np 4 python parallel_test.py # [mpi == 'openmpi']
about:
home: http://github.com/Unidata/netcdf4-python
license: MIT
license_file: LICENSE
summary: Provides an object-oriented python interface to the netCDF version 4 library
dev_url: https://github.com/Unidata/netcdf4-python
doc_url: https://unidata.github.io/netcdf4-python
extra:
recipe-maintainers:
- ocefpaf
- pelson
- dopplershift
- xylar