{% set name = "fitsio" %}
{% set version = "1.1.4" %}
{% set sha256 = "59c281648ea8fe50ed557857b201eacb21671b83ae60956a7e22c2a7e2a82b9d" %}

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

source:
  fn: {{ name }}-{{ version }}.tar.gz
  url: https://pypi.io/packages/source/{{ name[0] }}/{{ name }}/{{ name }}-{{ version }}.tar.gz
  sha256: {{ sha256 }}

build:
  number: 0
  skip: true  # [win]

requirements:
  build:
    - python                                 # [build_platform != target_platform]
    - cross-python_{{ target_platform }}     # [build_platform != target_platform]
    - numpy                                  # [build_platform != target_platform]
    - libtool  # [unix]
    - {{ compiler('c') }}
  host:
    - python
    - pip
    - numpy
    - bzip2
    - libcurl

  run:
    - python
    - {{ pin_compatible('numpy') }}
    - bzip2
    - setuptools  # the test modules now use pkg_resources

test:
  imports:
    - fitsio
  commands:
    - python -c "import fitsio; fitsio.test.test()"

about:
  home: https://github.com/esheldon/fitsio
  license: GPL-2.0-only
  license_file:
    - LICENSE.txt
    - LICENSE_cfitsio.txt
  summary: A python library to read from and write to FITS files.
  description: |
    This is a python extension written in c and python. Data are read into
    numerical python arrays. A version of cfitsio is bundled with this package,
    there is no need to install your own, nor will this conflict with a
    version you have installed.
  doc_url: https://github.com/esheldon/fitsio
  dev_url: https://github.com/esheldon/fitsio

extra:
  recipe-maintainers:
    - beckermr
