Skip to content

Commit fb2dfcf

Browse files
fix: #518 Update RECORD file during wheel creation (#525)
1 parent 790d4f0 commit fb2dfcf

File tree

4 files changed

+32
-18
lines changed

4 files changed

+32
-18
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
- name: Install browsers
3232
run: python -m playwright install
3333
- name: Lint
34-
run: pre-commit run --all-files
34+
uses: pre-commit/[email protected]
3535
- name: Generate APIs
3636
run: bash scripts/update_api.sh
3737
- name: Verify API is up to date

.pre-commit-config.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# See https://pre-commit.com/hooks.html for more hooks
33
repos:
44
- repo: https://github.com/pre-commit/pre-commit-hooks
5-
rev: v3.2.0
5+
rev: v3.4.0
66
hooks:
77
- id: trailing-whitespace
88
- id: end-of-file-fixer
@@ -13,14 +13,14 @@ repos:
1313
hooks:
1414
- id: black
1515
- repo: https://github.com/pre-commit/mirrors-mypy
16-
rev: v0.782
16+
rev: v0.812
1717
hooks:
1818
- id: mypy
1919
- repo: https://gitlab.com/pycqa/flake8
20-
rev: '3.8.3'
20+
rev: 3.8.4
2121
hooks:
2222
- id: flake8
2323
- repo: https://github.com/pycqa/isort
24-
rev: 5.5.4
24+
rev: 5.7.0
2525
hooks:
2626
- id: isort

local-requirements.txt

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,24 @@
1-
autobahn==20.7.1
2-
pytest==6.1.0
1+
autobahn==21.2.2
2+
pytest==6.2.2
33
pytest-asyncio==0.14.0
4-
pytest-cov==2.10.1
4+
pytest-cov==2.11.1
55
pytest-sugar==0.9.4
6-
pytest-xdist==2.1.0
6+
pytest-xdist==2.2.1
77
pytest-timeout==1.4.2
88
flaky==3.7.0
9-
pixelmatch==0.2.1
10-
Pillow==8.0.0
11-
mypy==0.782
12-
setuptools==50.3.0
9+
pixelmatch==0.2.3
10+
Pillow==8.1.0
11+
mypy==0.812
12+
setuptools==54.0.0
1313
# TODO: use PyPi version after >20.3.0 is released
1414
git+https://github.com/twisted/twisted.git@4ff22287cab3b54f51cee41ea2619e72d1bff2e4
15-
wheel==0.35.1
15+
wheel==0.36.2
16+
auditwheel==3.3.1
1617
black==20.8b1
17-
pre-commit==2.7.1
18-
flake8==3.8.3
19-
twine==3.2.0
20-
pyOpenSSL==19.1.0
18+
pre-commit==2.10.1
19+
flake8==3.8.4
20+
twine==3.3.0
21+
pyOpenSSL==20.0.1
2122
service_identity==18.1.0
2223
pandas==1.2.2
2324
objgraph==3.5.0

setup.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
from pathlib import Path
2222

2323
import setuptools
24+
from auditwheel.wheeltools import InWheel
2425
from wheel.bdist_wheel import bdist_wheel as BDistWheelCommand
2526

2627
driver_version = "1.9.0-1614037901000"
@@ -96,6 +97,18 @@ def run(self) -> None:
9697
zip.writestr("playwright/driver/README.md", "Universal Mac package")
9798

9899
os.remove(base_wheel_location)
100+
for whlfile in glob.glob("dist/*.whl"):
101+
102+
os.makedirs("wheelhouse", exist_ok=True)
103+
with InWheel(
104+
in_wheel=whlfile,
105+
out_wheel=os.path.join("wheelhouse", os.path.basename(whlfile)),
106+
ret_self=True,
107+
):
108+
print("Updating RECORD file of %s" % whlfile)
109+
shutil.rmtree("dist")
110+
print("Copying new wheels")
111+
shutil.move("wheelhouse", "dist")
99112

100113

101114
setuptools.setup(

0 commit comments

Comments
 (0)