Skip to content

Commit

Permalink
chore: convert setup.py to build (#2642)
Browse files Browse the repository at this point in the history
  • Loading branch information
mxschmitt authored Nov 12, 2024
1 parent 1e1122c commit 4fd5de0
Show file tree
Hide file tree
Showing 14 changed files with 650 additions and 649 deletions.
4 changes: 3 additions & 1 deletion .azure-pipelines/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,9 @@ extends:
python -m pip install --upgrade pip
pip install -r local-requirements.txt
pip install -e .
python setup.py bdist_wheel --all
for wheel in $(python setup.py --list-wheels); do
PLAYWRIGHT_TARGET_WHEEL=$wheel python -m build --wheel
done
displayName: 'Install & Build'
- task: EsrpRelease@7
inputs:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
python -m pip install --upgrade pip
pip install -r local-requirements.txt
pip install -e .
python setup.py bdist_wheel
python -m build --wheel
python -m playwright install --with-deps
- name: Lint
run: pre-commit run --show-diff-on-failure --color=always --all-files
Expand Down Expand Up @@ -89,7 +89,7 @@ jobs:
python -m pip install --upgrade pip
pip install -r local-requirements.txt
pip install -e .
python setup.py bdist_wheel
python -m build --wheel
python -m playwright install --with-deps ${{ matrix.browser }}
- name: Common Tests
run: pytest tests/common --browser=${{ matrix.browser }} --timeout 90
Expand Down Expand Up @@ -135,7 +135,7 @@ jobs:
python -m pip install --upgrade pip
pip install -r local-requirements.txt
pip install -e .
python setup.py bdist_wheel
python -m build --wheel
python -m playwright install ${{ matrix.browser-channel }} --with-deps
- name: Common Tests
run: pytest tests/common --browser=chromium --browser-channel=${{ matrix.browser-channel }} --timeout 90
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test_docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,6 @@ jobs:
docker exec "${CONTAINER_ID}" chown -R root:root /root/playwright
docker exec "${CONTAINER_ID}" pip install -r local-requirements.txt
docker exec "${CONTAINER_ID}" pip install -e .
docker exec "${CONTAINER_ID}" python setup.py bdist_wheel
docker exec "${CONTAINER_ID}" python -m build --wheel
docker exec "${CONTAINER_ID}" xvfb-run pytest -vv tests/sync/
docker exec "${CONTAINER_ID}" xvfb-run pytest -vv tests/async/
4 changes: 1 addition & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,7 @@ Build and install drivers:

```sh
pip install -e .
python setup.py bdist_wheel
# For all platforms
python setup.py bdist_wheel --all
python -m build --wheel
```

Run tests:
Expand Down
2 changes: 1 addition & 1 deletion ROLLING.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
- `pre-commit install`
- `pip install -e .`
* change driver version in `setup.py`
* download new driver: `python setup.py bdist_wheel`
* download new driver: `python -m build --wheel`
* generate API: `./scripts/update_api.sh`
* commit changes & send PR
* wait for bots to pass & merge the PR
Expand Down
4 changes: 1 addition & 3 deletions local-requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
auditwheel==6.1.0
autobahn==23.1.2
black==24.8.0
build==1.2.2.post1
flake8==7.1.1
flaky==3.8.1
mypy==1.13.0
Expand All @@ -17,8 +17,6 @@ pytest-timeout==2.3.1
pytest-xdist==3.6.1
requests==2.32.3
service_identity==24.2.0
setuptools==75.4.0
twisted==24.10.0
types-pyOpenSSL==24.1.0.20240722
types-requests==2.32.0.20241016
wheel==0.45.0
2 changes: 1 addition & 1 deletion playwright/_impl/_element_handle.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ async def select_option(
dict(
timeout=timeout,
force=force,
**convert_select_option_values(value, index, label, element)
**convert_select_option_values(value, index, label, element),
)
)
return await self._channel.send("selectOption", params)
Expand Down
Loading

0 comments on commit 4fd5de0

Please sign in to comment.