{% set name = "pywr" %}
{% set version = "1.0.0" %}

{% if os.environ.get("FEATURE_OLDGLIBC", "0") == "1" %}
{% set OLDGLIBC = 1 %}
{% else %}
{% set OLDGLIBC = 0 %}
{% endif %}

{% if os.environ.get("BUILD_DOC", "0") == "1" %}
{% set BUILD_DOC = 1 %}
{% else %}
{% set BUILD_DOC = 0 %}
{% endif %}

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

source:
  path: ../

build:
  number: 0

  script_env:
    - FEATURE_OLDGLIBC [linux]
    - BUILD_DOC

  features:
    - vc9  # [win and py27]
    - vc10  # [win and py34]
    - vc14  # [win and (py35 or py36)]
  {% if OLDGLIBC %}
    - oldglibc
  {% endif %}


requirements:
  build:
    - python
    - vc 9  # [win and py27]
    - vc 10  # [win and py34]
    - vc 14  # [win and (py35 or py36)]
    - setuptools
    - numpy 1.8.*  # [not (win and (py35 or py36))]
    - numpy 1.9.*  # [win and py35]
    - numpy 1.11.*  # [win and py36]
    - cython
    - glpk
    - lp_solve
    - future
    - packaging
    - wheel
    {% if OLDGLIBC %}
    - oldglibc
    {% endif %}
  run:
    - python
    - vc 9  # [win and py27]
    - vc 10  # [win and py34]
    - vc 14  # [win and (py35 or py36)]
    - numpy >=1.8  # [not (win and (py35 or py36))]
    - numpy >=1.9  # [win and py35]
    - numpy >=1.11  # [win and py36]
    - pandas
    - networkx
    - glpk
    - lp_solve
    - pytables
    # Fix pytables on windows. See https://github.com/conda-forge/pytables-feedstock/issues/31#issuecomment-410695814
    - snappy  # [win]
    - xlrd
    - scipy
    - future
    - packaging
    - jupyter
    - matplotlib
    {% if OLDGLIBC %}
    - oldglibc
    {% endif %}

test:
  requires:
    - pytest
    - nbconvert
    - pygmo
    - platypus-opt
    {% if BUILD_DOC %}
    - sphinx
    - sphinx_rtd_theme
    - numpydoc
    {% endif %}

  source_files:
    - tests/*
    {% if BUILD_DOC %}
    - docs/*
    {% endif %}

about:
  home: https://github.com/pywr/pywr
  license: GPL
  license_file: LICENSE.txt
  summary: Water resource model written in Python
