From de3cef240b83196c9210e586e1987e71cbce3f6a Mon Sep 17 00:00:00 2001 From: Max Schmitt Date: Fri, 13 Oct 2023 10:38:26 +0200 Subject: [PATCH] nits --- .github/workflows/ci.yml | 6 +++--- .github/workflows/publish_canary_docker.yml | 2 +- .github/workflows/publish_release_docker.yml | 2 +- CONTRIBUTING.md | 2 +- local-requirements.txt | 1 - setup.py | 2 +- tests/test_installation.py | 7 ++++--- 7 files changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index cf1811ca97..6193b6b470 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -28,7 +28,7 @@ jobs: python-version: "3.10" - name: Install dependencies & browsers run: | - python -m pip install --upgrade pip wheel + python -m pip install --upgrade pip pip install -r local-requirements.txt pip install -e . python setup.py bdist_wheel @@ -86,7 +86,7 @@ jobs: python-version: ${{ matrix.python-version }} - name: Install dependencies & browsers run: | - python -m pip install --upgrade pip wheel + python -m pip install --upgrade pip pip install -r local-requirements.txt pip install -e . python setup.py bdist_wheel @@ -134,7 +134,7 @@ jobs: python-version: "3.10" - name: Install dependencies & browsers run: | - python -m pip install --upgrade pip wheel + python -m pip install --upgrade pip pip install -r local-requirements.txt pip install -e . python setup.py bdist_wheel diff --git a/.github/workflows/publish_canary_docker.yml b/.github/workflows/publish_canary_docker.yml index e5a962b499..757dee7b56 100644 --- a/.github/workflows/publish_canary_docker.yml +++ b/.github/workflows/publish_canary_docker.yml @@ -18,7 +18,7 @@ jobs: python-version: "3.10" - name: Install dependencies & browsers run: | - python -m pip install --upgrade pip wheel + python -m pip install --upgrade pip pip install -r local-requirements.txt pip install -e . - uses: azure/docker-login@v1 diff --git a/.github/workflows/publish_release_docker.yml b/.github/workflows/publish_release_docker.yml index 9f255ad7a0..8bb9c5c7b3 100644 --- a/.github/workflows/publish_release_docker.yml +++ b/.github/workflows/publish_release_docker.yml @@ -33,7 +33,7 @@ jobs: platforms: arm64 - name: Install dependencies & browsers run: | - python -m pip install --upgrade pip wheel + python -m pip install --upgrade pip pip install -r local-requirements.txt pip install -e . - run: ./utils/docker/publish_docker.sh stable diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 809b8e9975..a5ab7d4bdc 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -15,7 +15,7 @@ source ./env/bin/activate Install required dependencies: ```sh -python -m pip install --upgrade pip wheel +python -m pip install --upgrade pip pip install -r local-requirements.txt ``` diff --git a/local-requirements.txt b/local-requirements.txt index f8f6e524f5..caffb929c1 100644 --- a/local-requirements.txt +++ b/local-requirements.txt @@ -18,7 +18,6 @@ pytest-xdist==3.3.1 requests==2.31.0 service_identity==23.1.0 setuptools==68.2.2 -twine==4.0.2 twisted==23.8.0 types-pyOpenSSL==23.2.0.2 wheel==0.41.2 diff --git a/setup.py b/setup.py index 3d9d7f9405..6013695c1c 100644 --- a/setup.py +++ b/setup.py @@ -209,7 +209,7 @@ def _download_and_extract_local_driver( project_urls={ "Release notes": "https://github.com/microsoft/playwright-python/releases", }, - packages=["playwright"], + packages=["playwright", "playwright.async_api", "playwright.sync_api", "playwright._impl", "playwright._impl.__pyinstaller"], include_package_data=True, install_requires=[ "greenlet==3.0.0", diff --git a/tests/test_installation.py b/tests/test_installation.py index e0f9433ab4..e002a477c2 100644 --- a/tests/test_installation.py +++ b/tests/test_installation.py @@ -21,16 +21,17 @@ def test_install(tmp_path: Path, browser_name: str) -> None: + env_dir = tmp_path / "env" env = EnvBuilder(with_pip=True) - env.create(env_dir=tmp_path) - context = env.ensure_directories(tmp_path) + env.create(env_dir=env_dir) + context = env.ensure_directories(env_dir) root = Path(__file__).parent.parent.resolve() if sys.platform == "win32": wheelpath = list((root / "dist").glob("playwright*win_amd64*.whl"))[0] elif sys.platform == "linux": wheelpath = list((root / "dist").glob("playwright*manylinux1*.whl"))[0] elif sys.platform == "darwin": - wheelpath = list((root / "dist").glob("playwright*macosx_10_*.whl"))[0] + wheelpath = list((root / "dist").glob("playwright*macosx_*.whl"))[0] subprocess.check_output( [ context.env_exe,