{% set version = "3.8.0" %}

package:
  name: pytables
  version: {{ version }}

source:
  url: https://pypi.io/packages/source/t/tables/tables-{{ version }}.tar.gz
  sha256: 34f3fa2366ce20b18f1df573a77c1d27306ce1f2a41d9f9eff621b5192ea8788
  patches:
    - patches/use_system_blosc2.patch
    - patches/0001-Don-t-copy-blosc2-in-the-package.patch

build:
  number: 3
  entry_points:
    - ptdump = tables.scripts.ptdump:main
    - ptrepack = tables.scripts.ptrepack:main
    - pt2to3 = tables.scripts.pt2to3:main
    - pttree = tables.scripts.pttree:main
  skip: true  # [py<38]
  # c-blosc2 is currently not available for s390x
  skip: true  # [s390x]
  ignore_run_exports:
    - lzo     # [win]

requirements:
  build:
    - {{ compiler('c') }}
    - {{ compiler('cxx') }}
    - patch  # [unix]
    - m2-patch  # [win]
  host:
    - python
    - pip
    - setuptools
    - wheel
    - numpy 1.19  # [py<310]
    - numpy 1.21  # [py==310]
    - numpy 1.23  # [py>=311]
    - packaging 23.0
    - py-cpuinfo 8.0.0
    - cython 0.29.33
    - blosc 1.21.3
    - c-blosc2 2.8.0
    - hdf5 1.12.1
    - lzo 2.10
    - bzip2 1.0.8
  run:
    - python
    - {{ pin_compatible('numpy') }}
    - numexpr >=2.6.2
    - blosc
    - c-blosc2
    - py-cpuinfo
    - hdf5
    - lzo
    - bzip2
    - packaging

test:
  requires:
    - mock
    - pip
    - setuptools
    - py-cpuinfo
  commands:
  # pip check raises a false alarm for blosc2, which isn't needed at this time.
  # c-blosc2 has been added in its place.
    - pip check || cmd /K "exit /b 0"  # [win]
    - pip check || true  # [unix]
    - pt2to3 -h
    - ptdump -h
    - ptrepack -h
    - pttree -h

about:
  home: https://www.pytables.org
  license: BSD-3-Clause
  license_family: BSD
  license_file: LICENSE.txt
  summary: 'Brings together Python, HDF5 and NumPy to easily handle large amounts of data.'
  description: |
    PyTables is a package for managing hierarchical datasets and designed to
    efficiently and easily cope with extremely large amounts of data. PyTables
    is built on top of the HDF5 library, using the Python language and the
    NumPy package.
  doc_url: https://www.pytables.org/
  dev_url: https://github.com/PyTables/PyTables

extra:
  recipe-maintainers:
    - msarahan
    - ocefpaf
    - tomkooij
    - scopatz
