# Copyright (c) 2018, NVIDIA CORPORATION.

# Usage:
#   conda build -c nvidia -c rapidsai -c conda-forge -c defaults .
{% 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('.')[1] %}
{% set cuda_version='.'.join(environ.get('CUDA', '9.2').split('.')[:2]) %}
package:
  name: libcugraph
  version: {{ version }}

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

build:
  number: {{ GIT_DESCRIBE_NUMBER }}
  string: cuda{{ cuda_version }}_{{ GIT_DESCRIBE_HASH }}_{{ GIT_DESCRIBE_NUMBER }}
  script_env:
    - CC
    - CXX
    - CUDAHOSTCXX
    - PARALLEL_LEVEL
    - VERSION_SUFFIX

requirements:
  build:
    - cmake>=3.12.4
    - libcudf={{ minor_version }}
    - cudatoolkit {{ cuda_version }}.*
    - boost-cpp>=1.66
    - libcypher-parser
    - nccl>=2.7
    - ucx-py {{ minor_version }}
    - ucx-proc=*=gpu
  run:
    - libcudf={{ minor_version }}
    - {{ pin_compatible('cudatoolkit', max_pin='x.x') }}
    - nccl>=2.7
    - ucx-py {{ minor_version }}
    - ucx-proc=*=gpu

#test:
#  commands:
#    - test -f $PREFIX/include/cugraph.h


about:
  home: http://rapids.ai/
  license: Apache-2.0
  license_file: ../../../LICENSE
  summary: libgraph library
