Skip to content

Commit 4fd5de0

Browse files
authored
chore: convert setup.py to build (#2642)
1 parent 1e1122c commit 4fd5de0

File tree

14 files changed

+650
-649
lines changed

14 files changed

+650
-649
lines changed

.azure-pipelines/publish.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,9 @@ extends:
3939
python -m pip install --upgrade pip
4040
pip install -r local-requirements.txt
4141
pip install -e .
42-
python setup.py bdist_wheel --all
42+
for wheel in $(python setup.py --list-wheels); do
43+
PLAYWRIGHT_TARGET_WHEEL=$wheel python -m build --wheel
44+
done
4345
displayName: 'Install & Build'
4446
- task: EsrpRelease@7
4547
inputs:

.github/workflows/ci.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
python -m pip install --upgrade pip
3232
pip install -r local-requirements.txt
3333
pip install -e .
34-
python setup.py bdist_wheel
34+
python -m build --wheel
3535
python -m playwright install --with-deps
3636
- name: Lint
3737
run: pre-commit run --show-diff-on-failure --color=always --all-files
@@ -89,7 +89,7 @@ jobs:
8989
python -m pip install --upgrade pip
9090
pip install -r local-requirements.txt
9191
pip install -e .
92-
python setup.py bdist_wheel
92+
python -m build --wheel
9393
python -m playwright install --with-deps ${{ matrix.browser }}
9494
- name: Common Tests
9595
run: pytest tests/common --browser=${{ matrix.browser }} --timeout 90
@@ -135,7 +135,7 @@ jobs:
135135
python -m pip install --upgrade pip
136136
pip install -r local-requirements.txt
137137
pip install -e .
138-
python setup.py bdist_wheel
138+
python -m build --wheel
139139
python -m playwright install ${{ matrix.browser-channel }} --with-deps
140140
- name: Common Tests
141141
run: pytest tests/common --browser=chromium --browser-channel=${{ matrix.browser-channel }} --timeout 90

.github/workflows/test_docker.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,6 @@ jobs:
4646
docker exec "${CONTAINER_ID}" chown -R root:root /root/playwright
4747
docker exec "${CONTAINER_ID}" pip install -r local-requirements.txt
4848
docker exec "${CONTAINER_ID}" pip install -e .
49-
docker exec "${CONTAINER_ID}" python setup.py bdist_wheel
49+
docker exec "${CONTAINER_ID}" python -m build --wheel
5050
docker exec "${CONTAINER_ID}" xvfb-run pytest -vv tests/sync/
5151
docker exec "${CONTAINER_ID}" xvfb-run pytest -vv tests/async/

CONTRIBUTING.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,7 @@ Build and install drivers:
2323

2424
```sh
2525
pip install -e .
26-
python setup.py bdist_wheel
27-
# For all platforms
28-
python setup.py bdist_wheel --all
26+
python -m build --wheel
2927
```
3028

3129
Run tests:

ROLLING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
- `pre-commit install`
1111
- `pip install -e .`
1212
* change driver version in `setup.py`
13-
* download new driver: `python setup.py bdist_wheel`
13+
* download new driver: `python -m build --wheel`
1414
* generate API: `./scripts/update_api.sh`
1515
* commit changes & send PR
1616
* wait for bots to pass & merge the PR

local-requirements.txt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
auditwheel==6.1.0
21
autobahn==23.1.2
32
black==24.8.0
3+
build==1.2.2.post1
44
flake8==7.1.1
55
flaky==3.8.1
66
mypy==1.13.0
@@ -17,8 +17,6 @@ pytest-timeout==2.3.1
1717
pytest-xdist==3.6.1
1818
requests==2.32.3
1919
service_identity==24.2.0
20-
setuptools==75.4.0
2120
twisted==24.10.0
2221
types-pyOpenSSL==24.1.0.20240722
2322
types-requests==2.32.0.20241016
24-
wheel==0.45.0

playwright/_impl/_element_handle.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ async def select_option(
158158
dict(
159159
timeout=timeout,
160160
force=force,
161-
**convert_select_option_values(value, index, label, element)
161+
**convert_select_option_values(value, index, label, element),
162162
)
163163
)
164164
return await self._channel.send("selectOption", params)

0 commit comments

Comments
 (0)