package:
  name: rank_filter
  version: {{ environ.get('GIT_DESCRIBE_TAG', '')[1:] }}{{ '+' + environ.get('GIT_DESCRIBE_NUMBER', '0') + '.' + environ.get('GIT_DESCRIBE_HASH', '0') if environ.get('GIT_DESCRIBE_NUMBER', '0') != '0' else "" }}

source:
  git_url: ..

build:
  script_env:
    - CC
    - CXX
    - CXX_FLAGS
    - CXX_LDFLAGS
    - USE_CYTHON

  string: np{{np if np else ""}}py{{py}}{{ "" if environ.get('USE_CYTHON', "true") == "true" else "_vg" }}

  detect_binary_files_with_prefix: true

requirements:
  build:
    - setuptools
    - cmake
    - patchelf >=0.8    # [linux]
    - boost
    - python
    - numpy x.x
    {{ "- cython" if environ.get('USE_CYTHON', "true") == "true" else "- vigra" }}
    
  run:
    - boost
    - python
    - numpy x.x
    {{ "" if environ.get('USE_CYTHON', "true") == "true" else "- vigra" }}

test:
  source_files:
    - tests

  imports:
    - rank_filter

  commands:
    - python -m unittest discover -s .

about:
  home: http://github.com/nanshe-org/rank_filter
  license: BSD 3-Clause
  license_file: LICENSE.txt
  summary: C++ boosted rank filter with Python bindings.

package:
  name: rank_filter
  version: {{ environ.get('GIT_DESCRIBE_TAG', '')[1:] }}{{ '+' + environ.get('GIT_DESCRIBE_NUMBER', '0') + '.' + environ.get('GIT_DESCRIBE_HASH', '0') if environ.get('GIT_DESCRIBE_NUMBER', '0') != '0' else "" }}

source:
  git_url: ..

build:
  script_env:
    - CC
    - CXX
    - CXX_FLAGS
    - CXX_LDFLAGS
    - USE_CYTHON

  string: np{{np if np else ""}}py{{py}}{{ "" if environ.get('USE_CYTHON', "true") == "true" else "_vg" }}

  detect_binary_files_with_prefix: true

requirements:
  build:
    - toolchain
    - setuptools
    - cmake
    - patchelf >=0.8    # [linux]
    - boost
    - python
    - numpy x.x
    {{ "- cython" if environ.get('USE_CYTHON', "true") == "true" else "- vigra" }}
    
  run:
    - boost
    - python
    - numpy x.x
    {{ "" if environ.get('USE_CYTHON', "true") == "true" else "- vigra" }}

test:
  source_files:
    - tests

  imports:
    - rank_filter

  commands:
    - python -m unittest discover -s .

about:
  home: http://github.com/nanshe-org/rank_filter
  license: BSD 3-Clause
  license_file: LICENSE.txt
  summary: C++ boosted rank filter with Python bindings.

Add `toolchain` as a `build` requirement.
Add `toolchain` as a `build` requirement.
