# Copyright (c) 2021, NVIDIA CORPORATION.

{% set version = environ.get('GIT_DESCRIBE_TAG', '0.0.0.dev').lstrip('v') + environ.get('VERSION_SUFFIX', '') %}
{% set minor_version =  version.split('.')[0] + '.' + version.split('.')[2] %}
{% set py_version=environ.get('CONDA_PY', 37) %}
{% set python_version=environ.get('PYTHON_VER', '3.7') %}
{% set cuda_version='.'.join(environ.get('CUDA', '11.0').split('.')[:2]) %}
{% set cuda_major=cuda_version.split('.')[0] %}

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

source:
  git_url: ../../..

build:
  number: {{ GIT_DESCRIBE_NUMBER }}
  string: cuda_{{ cuda_major }}_py{{ py_version }}_{{ GIT_DESCRIBE_HASH }}_{{ GIT_DESCRIBE_NUMBER }}
  script_env:
    - CC
    - CXX
    - CUDAHOSTCXX

requirements:
  build:
    - cmake >=3.18.0
    - {{ compiler("c") }}
    - {{ compiler("cxx") }}
    - sysroot_linux-64 2.17
  host:
    - cudatoolkit {{ cuda_version }}.*
    - python {{ python_version }}.*
    - libcucim {{ version }}.*
    - click
    - cupy 9.*
    - numpy 1.17
    - scipy
    - scikit-image 0.18.1
  run:
    - {{ pin_compatible('cudatoolkit', max_pin='x', min_pin='x') }}
    - python {{ python_version }}.*
    - libcucim {{ version }}.*
    - click
    - cupy 9.*
    - {{ pin_compatible('numpy') }}
    - scipy
    - scikit-image 0.18.1
    # - openslide # skipping here but benchmark binary would needs openslide library
  # test:
  #   - openslide
  #   - pytest
  #   - pytest-cov

about:
  home: http://rapids.ai/
  license: Apache-2.0
  license_family: Apache
  license_file: LICENSE
  summary: cucim Python package
