{% set name = "googleapis-common-protos" %}
{% set version = "1.61.0" %}

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

source:
  url: https://pypi.io/packages/source/{{ name[0] }}/{{ name }}/googleapis-common-protos-{{ version }}.tar.gz
  sha256: 8a64866a97f6304a7179873a465d6eee97b7a24ec6cfd78e0f575e96b821240b

build:
  noarch: python
  number: 0

requirements:
  host:
    - python >=3.7
    - protobuf >=3.19.5,<5.0.0dev0,!=3.20.0,!=3.20.1,!=4.21.1,!=4.21.2,!=4.21.3,!=4.21.4,!=4.21.5

outputs:
  - name: {{ name }}
    build:
      noarch: python
      script: |
        rm -rf test MANIFEST.in
        {{ PYTHON }} -m pip install . -vv --no-deps --ignore-installed
    requirements:
      host:
        - python >=3.7
        - pip
        - protobuf >=3.19.5,<5.0.0dev0,!=3.20.0,!=3.20.1,!=4.21.1,!=4.21.2,!=4.21.3,!=4.21.4,!=4.21.5
      run:
        - python >=3.7
        - protobuf >=3.19.5,<5.0.0dev0,!=3.20.0,!=3.20.1,!=4.21.1,!=4.21.2,!=4.21.3,!=4.21.4,!=4.21.5
    test:
      imports:
        - google.api
        - google.api.annotations_pb2
        - google.api.auth_pb2
        - google.api.backend_pb2
        - google.api.billing_pb2
        - google.api.client_pb2
        - google.api.config_change_pb2
        - google.api.consumer_pb2
        - google.api.context_pb2
        - google.api.control_pb2
        - google.api.distribution_pb2
        - google.api.documentation_pb2
        - google.api.endpoint_pb2
        - google.api.field_behavior_pb2
        - google.api.http_pb2
        - google.api.httpbody_pb2
        - google.api.label_pb2
        - google.api.launch_stage_pb2
        - google.api.log_pb2
        - google.api.logging_pb2
        - google.api.metric_pb2
        - google.api.monitored_resource_pb2
        - google.api.monitoring_pb2
        - google.api.quota_pb2
        - google.api.resource_pb2
        - google.api.service_pb2
        - google.api.source_info_pb2
        - google.api.system_parameter_pb2
        - google.api.usage_pb2
        - google.longrunning
        - google.longrunning.operations_pb2
        - google.longrunning.operations_proto
        - google.longrunning.operations_proto_pb2
        - google.rpc
        - google.rpc.code_pb2
        - google.rpc.error_details_pb2
        - google.rpc.status_pb2
        - google.type
        - google.type.calendar_period_pb2
        - google.type.color_pb2
        - google.type.date_pb2
        - google.type.dayofweek_pb2
        - google.type.expr_pb2
        - google.type.fraction_pb2
        - google.type.latlng_pb2
        - google.type.money_pb2
        - google.type.postal_address_pb2
        - google.type.quaternion_pb2
        - google.type.timeofday_pb2
      commands:
        - pip check
      requires:
        - pip

  - name: {{ name }}-grpc
    build:
      noarch: python
    requirements:
      host:
        - python >=3.7
      run:
        - python >=3.7
        - {{ pin_subpackage(name, min_pin='x.x', max_pin='x.x') }}
        - grpcio >=1.44.0,<2.0.0dev0
    test:
      imports:
        - google.api
        - google.api.annotations_pb2
        - google.api.auth_pb2
        - google.api.backend_pb2
        - google.api.billing_pb2
        - google.api.client_pb2
        - google.api.config_change_pb2
        - google.api.consumer_pb2
        - google.api.context_pb2
        - google.api.control_pb2
        - google.api.distribution_pb2
        - google.api.documentation_pb2
        - google.api.endpoint_pb2
        - google.api.field_behavior_pb2
        - google.api.http_pb2
        - google.api.httpbody_pb2
        - google.api.label_pb2
        - google.api.launch_stage_pb2
        - google.api.log_pb2
        - google.api.logging_pb2
        - google.api.metric_pb2
        - google.api.monitored_resource_pb2
        - google.api.monitoring_pb2
        - google.api.quota_pb2
        - google.api.resource_pb2
        - google.api.service_pb2
        - google.api.source_info_pb2
        - google.api.system_parameter_pb2
        - google.api.usage_pb2
        - google.longrunning
        - google.longrunning.operations_grpc
        - google.longrunning.operations_grpc_pb2
        - google.longrunning.operations_pb2
        - google.longrunning.operations_proto
        - google.longrunning.operations_proto_pb2
        - google.rpc
        - google.rpc.code_pb2
        - google.rpc.error_details_pb2
        - google.rpc.status_pb2
        - google.type
        - google.type.calendar_period_pb2
        - google.type.color_pb2
        - google.type.date_pb2
        - google.type.dayofweek_pb2
        - google.type.expr_pb2
        - google.type.fraction_pb2
        - google.type.latlng_pb2
        - google.type.money_pb2
        - google.type.postal_address_pb2
        - google.type.quaternion_pb2
        - google.type.timeofday_pb2
      commands:
        - pip check
      requires:
        - pip

about:
  home: https://github.com/googleapis/python-api-common-protos
  license: Apache-2.0
  license_file: LICENSE
  license_family: APACHE
  summary: Common protobufs used in Google APIs
  description: |
    Google APIs common protos

    googleapis-common-protos contains the python classes generated from the 
    common protos in the https://github.com/googleapis/api-common-protos
    repository.

  doc_url: https://github.com/googleapis/python-api-common-protos/blob/main/README.md
  dev_url: https://github.com/googleapis/python-api-common-protos

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