package:
  name: playwright
  version: "{{ environ.get('GIT_DESCRIBE_TAG') | replace('v', '') }}"

source:
  path: .

build:
  number: 0
  script: "{{ PYTHON }} -m pip install . --no-deps -vv"
  binary_relocation: False
  missing_dso_whitelist: "*"
  entry_points:
    - playwright = playwright.__main__:main

requirements:
  build:
    - python >=3.9                        # [build_platform != target_platform]
    - pip                                 # [build_platform != target_platform]
    - cross-python_{{ target_platform }}  # [build_platform != target_platform]
  host:
    - python >=3.9
    - wheel
    - pip
    - curl
    - setuptools_scm
  run:
    - python >=3.9
    # This should be the same as the dependencies in pyproject.toml
    - greenlet>=3.1.1,<4.0.0
    - pyee>=13,<14

test: # [build_platform == target_platform]
  files:
    - scripts/example_sync.py
    - scripts/example_async.py
  requires:
    - pip
  imports:
    - playwright
    - playwright.sync_api
    - playwright.async_api
  commands:
    - playwright --help
    - playwright install --with-deps
    - python scripts/example_sync.py
    - python scripts/example_async.py

about:
  home: https://github.com/microsoft/playwright-python
  license: Apache-2.0
  license_family: Apache
  license_file: LICENSE
  summary: Python version of the Playwright testing and automation library.
  description: |
    Playwright is a Python library to automate Chromium,
    Firefox and WebKit browsers with a single API. Playwright
    delivers automation that is ever-green, capable, reliable
    and fast.
  doc_url: https://playwright.dev/python/docs/intro/
  dev_url: https://github.com/microsoft/playwright-python
