# Copyright (c) 2018, 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('.')[1] %}
{% set py_version=environ.get('CONDA_PY', 36) %}
{% set cuda_version = '.'.join(environ.get('CUDA', '11.5').split('.')[:2]) %}

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

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

build:
  number: {{ GIT_DESCRIBE_NUMBER }}
  string: py{{ py_version }}_{{ GIT_DESCRIBE_HASH }}_{{ GIT_DESCRIBE_NUMBER }}
  script_env:
    - VERSION_SUFFIX
  ignore_run_exports_from:
    - {{ compiler('cuda') }}

requirements:
  build:
    - {{ compiler('c') }}
    - {{ compiler('cxx') }}
    - {{ compiler('cuda') }} {{ cuda_version }}
    - sysroot_{{ target_platform }} {{ sysroot_version }}
  host:
    - python
    - cython >=0.29,<0.30
    - cmake>=3.23.1
    - scikit-build>=0.13.1
    - setuptools
    - cudf {{ minor_version }}.*
    - rmm {{ minor_version }}.*
    - libcuspatial {{ version }}.*
  run:
    - python
    - cudf {{ minor_version }}.*
    - rmm {{ minor_version }}.*
    - gdal {{ gdal_version }}
    - geopandas >=0.11.0

test:            # [linux64]
  imports:       # [linux64]
    - cuspatial  # [linux64]

about:
  home: http://rapids.ai/
  license: Apache-2.0
  license_family: Apache
  license_file: LICENSE
  summary: cuSpatial GPU Spatial and Trajectory Data Management and Analytics Library

