diff options
Diffstat (limited to 'dev-python/playwright')
| -rw-r--r-- | dev-python/playwright/Manifest | 1 | ||||
| -rw-r--r-- | dev-python/playwright/files/playwright-1.64.0-look-up-playwright-from-the-PATH.patch | 19 | ||||
| -rw-r--r-- | dev-python/playwright/metadata.xml | 12 | ||||
| -rw-r--r-- | dev-python/playwright/playwright-1.64.0.ebuild | 58 |
4 files changed, 90 insertions, 0 deletions
diff --git a/dev-python/playwright/Manifest b/dev-python/playwright/Manifest new file mode 100644 index 000000000000..01c92849e36a --- /dev/null +++ b/dev-python/playwright/Manifest @@ -0,0 +1 @@ +DIST playwright-1.64.0.tar.gz 1476181 BLAKE2B 0718ddab169e83c74cd2652eb9d484d8839a416701e7498fda0d768233846004958ea2e13ccd42e70a81c2d6310264b5050cd32b6ee9634c3cba8a01d25bb10a SHA512 a001e040606aada5df95550f075d5169949f087937e22f9bf9e01921fe0bd4748c36e4e7d3e8c3de37c522ae2d3153b1910b5e6206e4f93d9e831da7ab901032 diff --git a/dev-python/playwright/files/playwright-1.64.0-look-up-playwright-from-the-PATH.patch b/dev-python/playwright/files/playwright-1.64.0-look-up-playwright-from-the-PATH.patch new file mode 100644 index 000000000000..9ad3261d5b03 --- /dev/null +++ b/dev-python/playwright/files/playwright-1.64.0-look-up-playwright-from-the-PATH.patch @@ -0,0 +1,19 @@ +From: Pavel Sobolev <contact@paveloom.dev> +Subject: [PATCH] Look up `playwright` from the `PATH` + +Signed-off-by: Pavel Sobolev <contact@paveloom.dev> + +--- a/playwright/_impl/_transport.py ++++ b/playwright/_impl/_transport.py +@@ -121,10 +121,8 @@ class PipeTransport(Transport): + startupinfo.dwFlags |= subprocess.STARTF_USESHOWWINDOW + startupinfo.wShowWindow = subprocess.SW_HIDE + +- executable_path, entrypoint_path = compute_driver_executable() + self._proc = await asyncio.create_subprocess_exec( +- executable_path, +- entrypoint_path, ++ "playwright", + "run-driver", + stdin=asyncio.subprocess.PIPE, + stdout=asyncio.subprocess.PIPE, diff --git a/dev-python/playwright/metadata.xml b/dev-python/playwright/metadata.xml new file mode 100644 index 000000000000..1bafdec9c19d --- /dev/null +++ b/dev-python/playwright/metadata.xml @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://srcux.com/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <name>Pavel Sobolev</name> + <email>contact@paveloom.dev</email> + </maintainer> + <upstream> + <bugs-to>https://github.com/microsoft/playwright-python/issues</bugs-to> + </upstream> + <origin>srcux</origin> +</pkgmetadata> diff --git a/dev-python/playwright/playwright-1.64.0.ebuild b/dev-python/playwright/playwright-1.64.0.ebuild new file mode 100644 index 000000000000..e49e1625f7d2 --- /dev/null +++ b/dev-python/playwright/playwright-1.64.0.ebuild @@ -0,0 +1,58 @@ +# Copyright 1999-2026 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DISTUTILS_USE_PEP517=setuptools +PYTHON_COMPAT=( python3_{13..14} ) + +inherit distutils-r1 + +DESCRIPTION="Python version of the Playwright testing and automation library" +HOMEPAGE="https://github.com/microsoft/playwright-python" +SRC_URI="https://github.com/microsoft/playwright-python/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz" + +S="${WORKDIR}/playwright-python-${PV}" + +LICENSE="Apache-2.0" +SLOT="0" +KEYWORDS="~amd64" + +RDEPEND=" + dev-util/playwright + + dev-python/greenlet[${PYTHON_USEDEP}] + dev-python/pyee[${PYTHON_USEDEP}] +" +BDEPEND=" + dev-python/setuptools-scm[${PYTHON_USEDEP}] +" + +PATCHES=( + "${FILESDIR}/${PN}-1.64.0-look-up-playwright-from-the-PATH.patch" +) + +EPYTEST_IGNORE=( + "playwright/_impl/__pyinstaller" +) + +distutils_enable_tests import-check + +export SETUPTOOLS_SCM_PRETEND_VERSION=${PV} + +python_prepare_all() { + # Installs a Python wrapper around the driver that + # does nothing except calling the driver + sed -e '/\[project\.scripts\]/,/^\s*$/d' -i pyproject.toml || die + + # Tries to download and extract the driver, + # but we have it in the system already + rm setup.py || die + + distutils-r1_python_prepare_all +} + +python_test() { + cd "${BUILD_DIR}/install$(python_get_sitedir)" || die + epytest --import-check +} |
