{% set name = "h5py" %}
{% set version = "3.11.0" %}
{% set build = 0 %}

# mpi must be defined for conda-smithy lint
{% set mpi = mpi or 'nompi' %}

package:
  name: {{ name|lower }}
  version: {{ version }}

source:
  url: https://github.com/{{ name }}/{{ name }}/archive/{{ version }}.tar.gz
  sha256: 034ec21f28f2f2edc4542515a9ae45356a25bb459048acf9622e6b1143b3fae7

build:
  skip: True  # [py<38]
  number: {{ build }}

requirements:
  build:
    - {{ compiler("c") }}
  host:
    - python
    - cython >=0.29.15,<4
    - hdf5 1.12.1
    # The upstream source added compatibility to build with numpy 2.0
    # but it still can be done with numpy 1.x, see https://github.com/h5py/h5py/pull/2401
    - numpy {{ numpy }}
    - pip
    - pkgconfig
    - setuptools
    - wheel
  run:
    - python
    - hdf5  # exact pin handled through hdf5 run_exports
    - {{ pin_compatible('numpy') }}

test:
  imports:
    - h5py
    - h5py.tests
    - h5py.tests.data_files
    - h5py.tests.test_vds
  requires:
    - pip
    - pytest
    - pytest-mpi
    - curl
  commands:
    - pip check

about:
  home: https://www.h5py.org/
  license: BSD-3-Clause
  license_family: BSD
  license_file: licenses/license.txt
  description: Read and write HDF5 files from Python
  summary: Read and write HDF5 files from Python
  dev_url: https://github.com/h5py/h5py
  doc_url: https://docs.h5py.org

extra:
  recipe-maintainers:
    - jakirkham
    - tacaswell
    - ocefpaf
    - minrk
    - scopatz
