{% set data = load_file_data(RECIPE_DIR + '/../pyproject.toml') %}
{% set name = data['project']['name'] %}

package:
  name: {{ name }}
  version: {{ data['project']['version'] }}

source:
  path: ..

build:
  noarch: python
  number: {{ environ.get('BOB_BUILD_NUMBER', 0) }}
  run_exports:
    - {{ pin_subpackage(data['project']['name']) }}
  script:
    - "{{ PYTHON }} -m pip install {{ SRC_DIR }} -vv"

requirements:
  host:
    - python {{ python }}
    - setuptools {{ setuptools }}
    - pip {{ pip }}
    - bob
    - h5py {{ h5py }}
    - numpy {{ numpy }}
    - pillow {{ pillow }}
    - imageio {{ imageio }}
    - click {{ click }}
  run:
    - python
    - setuptools
    - bob
    - {{ pin_compatible('numpy') }}
    - {{ pin_compatible('pillow') }}
    - {{ pin_compatible('imageio') }}
    - {{ pin_compatible('h5py') }}
    - {{ pin_compatible('click') }}

test:
  source_files:
    - tests
  imports:
    - {{ name.replace('-','_') }}
  commands:
    - conda inspect linkages -p $PREFIX {{ name }}  # [not win]
    - conda inspect objects -p $PREFIX {{ name }}  # [osx]

about:
  home: {{ data['project']['urls']['homepage'] }}
  summary: {{ data['project']['description'] }}
  license: {{ data['project']['license']['text'] }}
  license_family: BSD
