{% set name = "google-api-core" %}
{% set version = "1.25.1" %}

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

source:
  url: https://pypi.org/packages/source/{{ name[0] }}/{{ name }}/{{ name }}-{{ version }}.tar.gz
  sha256: 0e152ec37b8481d1be1258d95844a5a7031cd3d83d7c7046d9e9b2d807042440

build:
  number: 0
  noarch: python

requirements:
  host:
    - python
    - pip >=18.1
    - setuptools >=34.0.0

outputs:
  - name: {{ name }}
    build:
      noarch: python
      script: {{ PYTHON }} -m pip install . -vv --no-deps
    requirements:
      host:
        - python
        - pip
      run:
        - python
        - googleapis-common-protos >=1.6.0,<2.0dev
        - protobuf >=3.12.0
        - google-auth >=1.21.1,<2.0dev
        - requests >=2.18.0,<3.0.0dev
        - setuptools >=40.3.0
        - six >=1.13.0
        - pytz
    test:
      requires:
        - python
        - pip
      imports:
        - google.auth
        - google.auth.credentials
        - google.auth.transport.requests
        - google.longrunning
        - google.longrunning.operations_pb2
        - google.protobuf
        - google.rpc
        - google.api_core
        - google.api_core.exceptions
        - google.api_core.future
        - google.api_core.future.base
        - google.api_core.future.polling
        - google.api_core.general_helpers
        - google.api_core.page_iterator
        - google.api_core.protobuf_helpers
        - google.api_core.retry
        - google.api_core.timeout
      commands:
        - python -m pip check

  - name: {{ name }}-grpc
    requirements:
      host:
        - python
        - grpcio >=1.29.0,<2.0dev
      run:
        - {{ pin_subpackage(name, min_pin='x.x', max_pin='x.x') }}
        - grpcio >=1.29.0
    test:
      requires:
        - python
        - pip
      imports:
        - google.api_core
      commands:
        - python -m pip check
    about:
      home: https://github.com/googleapis/python-api-core
      license: Apache-2.0
      license_family: APACHE
      summary: Core Library for Google Client Libraries with grpc

  - name: {{ name }}-grpcio-gcp
    requirements:
      host:
        - python
        - grpcio-gcp >=0.2.2
      run:
        - {{ pin_subpackage(name, min_pin='x.x', max_pin='x.x') }}
        - grpcio-gcp
    test:
      requires:
        - python
        - pip
      imports:
        - google.api_core
        - grpc
      commands:
        - python -m pip check
    about:
      home: https://github.com/googleapis/python-api-core
      license: Apache-2.0
      license_family: APACHE
      summary: Core Library for Google Client Libraries with grpcio-gcp

  - name: {{ name }}-grpcgcp
    requirements:
      host:
        - python
      run:
        - {{ pin_subpackage(name + '-grpcio-gcp', min_pin='x.x', max_pin='x.x') }}
    test:
      requires:
        - python
        - pip
      imports:
        - google.api_core
        - grpc
        - grpc_gcp
      commands:
        - python -m pip check
    about:
      home: https://github.com/googleapis/python-api-core
      license: Apache-2.0
      license_family: APACHE
      summary: Core Library for Google Client Libraries with grpcio-gcp

about:
  home: https://github.com/googleapis/python-api-core
  license: Apache-2.0
  license_family: APACHE
  license_file: LICENSE
  summary: Core Library for Google Client Libraries
  description: |
    Core Library for Google Client Libraries
    -------------------------

    This package does not include the grpc, grpcio-gcp or grpcgcp extra requirements.

    This library is not meant to stand-alone. Instead it defines
    common helpers used by all Google API clients. For more information, see the
    [documentation](https://googleapis.dev/python/google-api-core/latest/index.html).

    Supported Python Versions
    -------------------------
    Python >= 3.5

    Deprecated Python Versions
    --------------------------
    Python == 2.7
    - Python 2.7 support will be removed on January 1, 2020.
    - protobuf does not support Visual C++ 2008, windows py27 package not available

  doc_url: https://googleapis.dev/python/google-api-core/latest/index.html
  dev_url: https://github.com/googleapis/python-api-core

extra:
  recipe-maintainers:
    - BrentDorsey
    - leahecole
    - parthea
    - tswast
