{% set version = "1.36.1" %}

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

source:
  url: https://pypi.io/packages/source/g/grpcio/grpcio-{{ version }}.tar.gz
  sha256: a66ea59b20f3669df0f0c6a3bd57b985e5b2d1dcf3e4c29819bb8dc232d0fd38
  patches:
    - 0001-Monkey-patch-distutils.ccompiler.spawn-to-elide-std-.patch
    - 0002-windows-ssl-lib-names.patch
    - 0001-fix-win-setup.patch
    - 0001-fix-win-commands.patch
    - fix_sysroot.patch

build:
  number: 1
  skip: true  # [python_impl == 'pypy']

requirements:
  build:
    - python                                 # [build_platform != target_platform]
    # - cross-python_{{ target_platform }}     # [build_platform != target_platform]
    - cython                                 # [build_platform != target_platform]
    - {{ compiler('c') }}
    - {{ compiler('cxx') }}
  host:
    - python
    - pip
    - setuptools
    - cython
    - six >=1.5.2
    - zlib
    - coverage
    - openssl
    - c-ares            # [unix]
    - pthread-stubs     # [linux]
  run:
    - python
    - cython
    - setuptools
    - six >=1.5.2
    - zlib
    - coverage
    - openssl
    - {{ pin_compatible("c-ares") }}  # [unix]

test:
  requires:
    - pip
  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:
    - python -m pip check

about:
  home: https://grpc.io
  license: Apache-2.0
  license_file: LICENSE
  license_family: APACHE
  summary: HTTP/2-based RPC framework
  dev_url: https://pypi.org/project/grpcio/

extra:
  recipe-maintainers:
    - ocefpaf
    - jcrist
    - bollwyvl
    - tswast
