From 78435f26c1b6db8bf0febbce05b38337ee6b96af Mon Sep 17 00:00:00 2001 From: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com> Date: Fri, 30 Apr 2021 13:35:48 +0530 Subject: [PATCH 1/3] feat: conda support --- meta.yaml | 63 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 meta.yaml diff --git a/meta.yaml b/meta.yaml new file mode 100644 index 000000000..dc3cfdd5a --- /dev/null +++ b/meta.yaml @@ -0,0 +1,63 @@ +{% set name = "playwright" %} +{% set version = "1.11.0" %} + +package: + name: {{ name|lower }} + version: {{ version }} + +source: + path: . + +build: + script_env: + - SETUPTOOLS_SCM_PRETEND_VERSION={{ version }} + number: 0 + script: "{{ PYTHON }} -m pip install . --no-deps -vv" + skip: true # [py<37] + binary_relocation: False + missing_dso_whitelist: "*" + entry_points: + - playwright = playwright.__main__:main + +requirements: + host: + - python + - wheel + - pip + - curl + - setuptools_scm + run: + - python + - greenlet >=0.4 + - pyee >=8.0.1 + - websockets >=8.1 + - typing_extensions # [py<39] +test: + requires: + - pip + imports: + - playwright + - playwright.sync_api + - playwright.async_api + commands: + - pip check + - playwright --help + +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. See how Playwright is better. + doc_url: https://playwright.dev/python/docs/intro/ + dev_url: https://github.com/microsoft/playwright-python + +extra: + recipe-maintainers: + - kumaraditya303 + - mxschmitt From 7744582c320c96e5a072796c1d5b937b52ab4a4e Mon Sep 17 00:00:00 2001 From: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com> Date: Fri, 30 Apr 2021 13:44:25 +0530 Subject: [PATCH 2/3] infra: setup ci for conda --- .github/workflows/ci.yml | 24 ++++++++++++++- .github/workflows/publish.yml | 58 +++++++++++++++++++++++++---------- meta.yaml | 19 +++++------- 3 files changed, 71 insertions(+), 30 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 532c26e81..7592294c0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -134,7 +134,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v2 with: - python-version: 3.8 + python-version: 3.9 - name: Install dependencies run: | python -m pip install --upgrade pip @@ -163,3 +163,25 @@ jobs: with: name: ${{ matrix.browser-channel }}-${{ matrix.os }} path: pw-log.txt + + build-conda: + name: Conda Build + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest, windows-latest, macos-latest] + python-version: [3.7, 3.8] + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 + - name: Get conda + uses: conda-incubator/setup-miniconda@v2 + with: + python-version: ${{ matrix.python-version }} + channels: conda-forge + - name: Prepare + run: conda install conda-build conda-verify + - name: Build + run: conda build . diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 79bcc7166..562866c6f 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -6,20 +6,44 @@ jobs: deploy-pypi: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - name: Set up Python - uses: actions/setup-python@v2 - with: - python-version: 3.9 - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install -r local-requirements.txt - pip install -e . - python setup.py bdist_wheel --all - python -m playwright install-deps - - name: Publish package - env: - TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} - TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} - run: twine upload dist/* + - uses: actions/checkout@v2 + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: 3.9 + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -r local-requirements.txt + pip install -e . + python setup.py bdist_wheel --all + python -m playwright install-deps + - name: Publish package + env: + TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} + TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} + run: twine upload dist/* + + deploy-conda: + strategy: + matrix: + os: [ubuntu-latest, windows-latest, macos-latest] + python-version: [3.7, 3.8] + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 + - name: Get conda + uses: conda-incubator/setup-miniconda@v2 + with: + python-version: ${{ matrix.python-version }} + channels: conda-forge + - name: Prepare + run: conda install anaconda-client conda-build conda-verify + - name: Build and Upload + env: + ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_API_TOKEN }} + run: | + conda config --set anaconda_upload yes + conda build . diff --git a/meta.yaml b/meta.yaml index dc3cfdd5a..ac1b6145f 100644 --- a/meta.yaml +++ b/meta.yaml @@ -1,16 +1,11 @@ -{% set name = "playwright" %} -{% set version = "1.11.0" %} - package: - name: {{ name|lower }} - version: {{ version }} + name: playwright + version: "{{ environ.get('GIT_DESCRIBE_TAG') }}" source: path: . build: - script_env: - - SETUPTOOLS_SCM_PRETEND_VERSION={{ version }} number: 0 script: "{{ PYTHON }} -m pip install . --no-deps -vv" skip: true # [py<37] @@ -18,7 +13,7 @@ build: missing_dso_whitelist: "*" entry_points: - playwright = playwright.__main__:main - + requirements: host: - python @@ -40,7 +35,7 @@ test: - playwright.sync_api - playwright.async_api commands: - - pip check + - pip check - playwright --help about: @@ -50,9 +45,9 @@ about: 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 + 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. See how Playwright is better. doc_url: https://playwright.dev/python/docs/intro/ dev_url: https://github.com/microsoft/playwright-python From 375ff5d9f4e6c7de55271fc8354219496cec949f Mon Sep 17 00:00:00 2001 From: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com> Date: Tue, 11 May 2021 10:39:34 +0530 Subject: [PATCH 3/3] chore: add python 3.9 to matrix with conda_build_config.yaml --- .github/workflows/ci.yml | 8 +++---- .github/workflows/publish.yml | 40 +++++++++++++++++------------------ conda_build_config.yaml | 4 ++++ meta.yaml | 11 +++------- 4 files changed, 30 insertions(+), 33 deletions(-) create mode 100644 conda_build_config.yaml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7592294c0..b61e44041 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -134,7 +134,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v2 with: - python-version: 3.9 + python-version: 3.8 - name: Install dependencies run: | python -m pip install --upgrade pip @@ -163,14 +163,12 @@ jobs: with: name: ${{ matrix.browser-channel }}-${{ matrix.os }} path: pw-log.txt - build-conda: name: Conda Build strategy: fail-fast: false matrix: - os: [ubuntu-latest, windows-latest, macos-latest] - python-version: [3.7, 3.8] + os: [ubuntu-20.04, macos-10.15, windows-2019] runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v2 @@ -179,7 +177,7 @@ jobs: - name: Get conda uses: conda-incubator/setup-miniconda@v2 with: - python-version: ${{ matrix.python-version }} + python-version: 3.9 channels: conda-forge - name: Prepare run: conda install conda-build conda-verify diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 562866c6f..cdf558af1 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -1,34 +1,34 @@ name: Upload Python Package on: + workflow_dispatch: release: types: [published] jobs: deploy-pypi: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - name: Set up Python - uses: actions/setup-python@v2 - with: - python-version: 3.9 - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install -r local-requirements.txt - pip install -e . - python setup.py bdist_wheel --all - python -m playwright install-deps - - name: Publish package - env: - TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} - TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} - run: twine upload dist/* + - uses: actions/checkout@v2 + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: 3.9 + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -r local-requirements.txt + pip install -e . + python setup.py bdist_wheel --all + python -m playwright install-deps + - name: Publish package + env: + TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} + TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} + run: twine upload dist/* deploy-conda: strategy: matrix: os: [ubuntu-latest, windows-latest, macos-latest] - python-version: [3.7, 3.8] runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v2 @@ -37,7 +37,7 @@ jobs: - name: Get conda uses: conda-incubator/setup-miniconda@v2 with: - python-version: ${{ matrix.python-version }} + python-version: 3.9 channels: conda-forge - name: Prepare run: conda install anaconda-client conda-build conda-verify @@ -46,4 +46,4 @@ jobs: ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_API_TOKEN }} run: | conda config --set anaconda_upload yes - conda build . + conda build --user microsoft . diff --git a/conda_build_config.yaml b/conda_build_config.yaml new file mode 100644 index 000000000..43a23503c --- /dev/null +++ b/conda_build_config.yaml @@ -0,0 +1,4 @@ +python: + - 3.7 + - 3.8 + - 3.9 diff --git a/meta.yaml b/meta.yaml index ac1b6145f..cf9a7baac 100644 --- a/meta.yaml +++ b/meta.yaml @@ -8,7 +8,7 @@ source: build: number: 0 script: "{{ PYTHON }} -m pip install . --no-deps -vv" - skip: true # [py<37] + skip: true # [py<37] binary_relocation: False missing_dso_whitelist: "*" entry_points: @@ -26,7 +26,7 @@ requirements: - greenlet >=0.4 - pyee >=8.0.1 - websockets >=8.1 - - typing_extensions # [py<39] + - typing_extensions # [py<39] test: requires: - pip @@ -48,11 +48,6 @@ about: 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. See how Playwright is better. + and fast. doc_url: https://playwright.dev/python/docs/intro/ dev_url: https://github.com/microsoft/playwright-python - -extra: - recipe-maintainers: - - kumaraditya303 - - mxschmitt