{% set build = 1 %}
{% set version = '2.0.0' %}
{% set md5 = '4f7d8126d7367c239fd67615680990e3' %}
{% set mpi = (environ.get('MPI') or 'mpich') if not win else 'msmpi' %}
{% set mpi_version = {'mpich':'>=3.1', 'openmpi':'>=1.8'}.get(mpi,'') %}

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

about:
  home: https://bitbucket.org/mpi4py/
  summary: 'Python bindings for MPI'
  license: 'BSD (https://bitbucket.org/mpi4py/mpi4py/src/master/LICENSE.rst)'

source:
  fn: mpi4py-{{version}}.tar.gz
  url: https://bitbucket.org/mpi4py/mpi4py/downloads/mpi4py-{{version}}.tar.gz
  {%if md5%}md5: {{md5}}{%endif%}

requirements:
  build:
    - python
    - {{mpi}} {{mpi_version}} # [not win]
  run:
    - python
    - {{mpi}} {{mpi_version}} # [not win]

build:
  number: {{build}}
  string: py{{py}}_{{mpi}}_{{build}}
  script: python setup.py install

test:
  imports:
    - mpi4py
    - mpi4py.rc
    - mpi4py.dl # [not win]
    - mpi4py.MPI

{% set build = 2 %}
{% set version = '2.0.0' %}
{% set md5 = '4f7d8126d7367c239fd67615680990e3' %}
{% set mpi = (environ.get('MPI') or 'mpich') if not win else 'msmpi' %}
{% set mpi_version = {'mpich':'>=3.1', 'openmpi':'>=1.8'}.get(mpi,'') %}

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

about:
  home: https://bitbucket.org/mpi4py/
  summary: 'Python bindings for MPI'
  license: 'BSD (https://bitbucket.org/mpi4py/mpi4py/src/master/LICENSE.rst)'

source:
  fn: mpi4py-{{version}}.tar.gz
  url: https://bitbucket.org/mpi4py/mpi4py/downloads/mpi4py-{{version}}.tar.gz
  {%if md5%}md5: {{md5}}{%endif%}

requirements:
  build:
    - python
    - {{mpi}} {{mpi_version}} # [not win]
  run:
    - python
    - {{mpi}} {{mpi_version}} # [not win]

build:
  number: {{build}}
  string: py{{py}}_{{mpi}}_{{build}}
  script: python setup.py install

test:
  imports:
    - mpi4py
    - mpi4py.rc
    - mpi4py.dl # [not win]
    - mpi4py.MPI

Update mpi4py recipe (bump build)
conda: Update mpi4py recipe (bump build)
