{% set version = "4.3.post1" %}

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

source:
  url: https://pypi.io/packages/source/a/astropy/astropy-{{ version }}.tar.gz
  sha256: 1b9f976f32675ae715bd38fcfb3540fcf01f6be1d75266c39b6fb085adac9410

build:
  detect_binary_files_with_prefix: false
  entry_points:
    - fits2bitmap = astropy.visualization.scripts.fits2bitmap:main
    - fitscheck = astropy.io.fits.scripts.fitscheck:main
    - fitsdiff = astropy.io.fits.scripts.fitsdiff:main
    - fitsheader = astropy.io.fits.scripts.fitsheader:main
    - fitsinfo = astropy.io.fits.scripts.fitsinfo:main
    - samp_hub = astropy.samp.hub_script:hub_script
    - volint = astropy.io.votable.volint:main
    - wcslint = astropy.wcs.wcslint:main
  number: 1
  script: {{ PYTHON }} -m pip install . -vv
  skip: true  # [py<37]

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') }}
  host:
    - python
    - pip
    - setuptools
    - jinja2
    - cython
    - setuptools_scm
    - extension-helpers
    - numpy 1.17.*  # [py<39 and build_platform == target_platform and python_impl == 'cpython']
    - numpy         # [py>=39 or build_platform != target_platform or  python_impl == 'pypy']
  run:
    - python
    - {{ pin_compatible("numpy") }}
    - numpy >=1.17
    - pyerfa
    - pyyaml >=3.13
    - importlib-metadata

test:
  requires:
    - pytest-astropy
  commands:
    - fits2bitmap --help
    - fitscheck --help
    - fitsdiff --help
    - fitsheader --help
    - fitsinfo --help
    - samp_hub --help
    - volint --help
    - wcslint --help
  imports:
    - astropy

about:
  home: http://www.astropy.org/
  license: BSD-3-Clause
  license_file: LICENSE.rst
  summary: Community-developed Python Library for Astronomy
  description: |
    The Astropy Project is a community effort to develop a single package for
    Astronomy in Python. It contains core functionality and common tools
    needed for performing astronomy and astrophysics research with Python.
  doc_url: http://docs.astropy.org/en/stable/
  dev_url: https://github.com/astropy/astropy

extra:
  recipe-maintainers:
    - astrofrog-conda-forge
    - mwcraig
    - bsipocz
