{% set name = "GalSim" %}
{% set version = "2.2.5" %}
{% set sha256 = "d0097e274a9cb1980a2a13bb208c810d151965ee39a92f4883b5529722149769" %}

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

source:
  url: https://github.com/Galsim-Developers/galsim/archive/v{{ version }}.tar.gz
  sha256: {{ sha256 }}
  patches:
    - 0001-remove-run-install-checks.patch
    - 0002-bypass-fmath-non-intel-cpus.patch
    - 0003-add-cross-compiling-and-scons-4.patch

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]
    - {{ compiler('cxx') }}
    - scons

  host:
    - python
    - numpy
    - pybind11 >=2.2
    - fftw
    - eigen >=3.3

  run:
    - python
    - {{ pin_compatible('numpy') }}
    - future >=0.15
    - astropy >=2.0
    - pybind11 >=2.2
    - eigen >=3.3
    - lsstdesc.coord >=1.0.5

test:
  imports:
    - galsim

about:
  home: https://github.com/GalSim-developers/GalSim
  license: BSD
  license_file: LICENSE
  summary: The modular galaxy image simulation toolkit
  description: |
    GalSim is open-source software for simulating images of astronomical objects
    (stars, galaxies) in a variety of ways. The bulk of the calculations are
    carried out in C++, and the user interface is in python. In addition, the
    code can operate directly on "config" files, for those users who prefer not
    to work in python. (http://adsabs.harvard.edu/abs/2015A%26C....10..121R)
  doc_url: https://github.com/GalSim-developers/GalSim/wiki
  dev_url: https://github.com/GalSim-developers/GalSim

extra:
  recipe-maintainers:
    - beckermr
    - rmjarvis
