From a82be11620f43cf2f53c6d4421346f1b96f71cd5 Mon Sep 17 00:00:00 2001 From: Max Schmitt Date: Wed, 13 Nov 2024 22:13:30 +0000 Subject: [PATCH] fixes --- .github/workflows/ci.yml | 1 + .pre-commit-config.yaml | 1 + conda_build_config.yaml | 3 ++ .../meta.yaml => meta.yaml | 15 +++++-- pytest-playwright/meta.yaml | 41 ------------------- 5 files changed, 17 insertions(+), 44 deletions(-) create mode 100644 conda_build_config.yaml rename pytest-playwright-asyncio/meta.yaml => meta.yaml (62%) delete mode 100644 pytest-playwright/meta.yaml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ed011d7..2de489d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -73,5 +73,6 @@ jobs: channels: microsoft,conda-forge - name: Prepare run: conda install conda-build conda-verify + - run: conda config --set channel_priority true - name: Build run: conda build . diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 4223982..a26a517 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -7,6 +7,7 @@ repos: - id: trailing-whitespace - id: end-of-file-fixer - id: check-yaml + exclude: meta.yaml - id: check-added-large-files - repo: https://github.com/psf/black rev: 24.10.0 diff --git a/conda_build_config.yaml b/conda_build_config.yaml new file mode 100644 index 0000000..4b06461 --- /dev/null +++ b/conda_build_config.yaml @@ -0,0 +1,3 @@ +package: +- pytest-playwright +- pytest-playwright-asyncio diff --git a/pytest-playwright-asyncio/meta.yaml b/meta.yaml similarity index 62% rename from pytest-playwright-asyncio/meta.yaml rename to meta.yaml index 49f5d38..0d743fb 100644 --- a/pytest-playwright-asyncio/meta.yaml +++ b/meta.yaml @@ -3,7 +3,7 @@ channels: - conda-forge package: - name: "pytest-playwright-asyncio" + name: "{{ package }}" version: "{{ environ.get('GIT_DESCRIBE_TAG') | replace('v', '') }}" source: @@ -12,7 +12,9 @@ source: build: number: 0 noarch: python - script: "{{ PYTHON }} -m pip install . --no-deps -vv" + script: python -m pip install --no-deps --ignore-installed ./{{ package }} + force_use_keys: + - package requirements: host: @@ -25,14 +27,21 @@ requirements: - pytest >=6.2.4,<9.0.0 - pytest-base-url >=1.0.0,<3.0.0 - python-slugify >=6.0.0,<9.0.0 + {% if package == 'pytest-playwright-asyncio' %} + - pytest-asyncio >=0.24.0 + {% endif %} test: imports: - - pytest_playwright + - "{{ package | replace('-', '_') }}" commands: - pip check requires: - pip + - microsoft::playwright >=1.37.0 + {% if package == 'pytest-playwright-asyncio' %} + - pytest-asyncio >=0.24.0 + {% endif %} about: home: https://github.com/microsoft/playwright-pytest diff --git a/pytest-playwright/meta.yaml b/pytest-playwright/meta.yaml deleted file mode 100644 index 262fe96..0000000 --- a/pytest-playwright/meta.yaml +++ /dev/null @@ -1,41 +0,0 @@ -channels: - - microsoft - - conda-forge - -package: - name: "pytest-playwright" - version: "{{ environ.get('GIT_DESCRIBE_TAG') | replace('v', '') }}" - -source: - path: . - -build: - number: 0 - noarch: python - script: "{{ PYTHON }} -m pip install . --no-deps -vv" - -requirements: - host: - - python >=3.9 - - setuptools-scm - - pip - run: - - python >=3.9 - - microsoft::playwright >=1.37.0 - - pytest >=6.2.4,<9.0.0 - - pytest-base-url >=1.0.0,<3.0.0 - - python-slugify >=6.0.0,<9.0.0 - -test: - imports: - - pytest_playwright - commands: - - pip check - requires: - - pip - -about: - home: https://github.com/microsoft/playwright-pytest - summary: A pytest wrapper with fixtures for Playwright to automate web browsers - license: Apache-2.0 - license_file: LICENSE