{% set version = "1.46.3" %}

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

source:
  url: https://pypi.io/packages/source/g/grpcio/grpcio-{{ version }}.tar.gz
  sha256: 4b8fd8b1cd553635274b83cd984f0755e6779886eca53c1c71d48215962eb689
  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

build:
  number: 0
  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.6.0
    - zlib
    - openssl
    - c-ares            # [unix]
    - pthread-stubs     # [linux]
  run:
    - python
    - setuptools
    - six >=1.6.0
    - zlib
    - openssl
    - {{ pin_compatible("c-ares") }}  # [unix]
    - __osx >={{ MACOSX_DEPLOYMENT_TARGET|default("10.9") }}  # [osx and x86_64]

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
    - hmaarrfk
