{% set name = "grpcio" %}
{% set version = "1.12.1" %}
{% set file_ext = "tar.gz" %}
{% set hash_type = "sha256" %}
{% set hash_value = "f14faadfd09aa8526536cd2149e274563f45b767fca1736ccc53803a6af3f90e" %}

package:
  name: {{ name|lower }}
  version: {{ version }}

source:
  fn: {{ name }}-{{ version }}.{{ file_ext }}
  url: https://pypi.io/packages/source/{{ name[0] }}/{{ name }}/{{ name }}-{{ version }}.{{ file_ext }}
  {{ hash_type }}: {{ hash_value }}
  patches:
    - set_109_deployment_target.patch  # [osx and py35]

build:
  number: 0
  # protobuf does not support Visual C++ 2008, skip windows py27
  skip: True  # [win and vc<10]

requirements:
  build:
    - {{ compiler('c') }}
    - {{ compiler('cxx') }}
  host:
    - python
    - setuptools
    - six >=1.5.2
    - futures >=2.2.0   # [py27]
    - enum34 >=1.0.4    # [py27]
    - pkg-config        # [osx]
    - zlib              # [osx]
  run:
    - python
    - setuptools
    - six >=1.5.2
    - futures >=2.2.0   # [py27]
    - enum34 >=1.0.4    # [py27]

test:
  imports:
    - grpc
    - grpc._cython
    - grpc._cython._cygrpc
    - grpc.beta
    - grpc.framework
    - grpc.framework.common
    - grpc.framework.foundation
    - grpc.framework.interfaces
    - grpc.framework.interfaces.base
    - grpc.framework.interfaces.face
  commands:
    - conda inspect linkages -p $PREFIX grpcio  # [linux]

about:
  home: https://grpc.io
  license: Apache Software License
  license_family: APACHE
  summary: HTTP/2-based RPC framework
