mirror of
https://github.com/gentoo-mirror/guru.git
synced 2026-10-28 12:21:10 -04:00
dev-python/playwright: new package, add 1.64.0
Signed-off-by: Pavel Sobolev <contact@paveloom.dev>
This commit is contained in:
4 files changed
+90
No files matched your search
@@ -0,0 +1 @@
|
||||
DIST playwright-1.64.0.tar.gz 1476181 BLAKE2B 0718ddab169e83c74cd2652eb9d484d8839a416701e7498fda0d768233846004958ea2e13ccd42e70a81c2d6310264b5050cd32b6ee9634c3cba8a01d25bb10a SHA512 a001e040606aada5df95550f075d5169949f087937e22f9bf9e01921fe0bd4748c36e4e7d3e8c3de37c522ae2d3153b1910b5e6206e4f93d9e831da7ab901032
|
||||
@@ -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,
|
||||
@@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/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>
|
||||
<remote-id type="github">microsoft/playwright-python</remote-id>
|
||||
</upstream>
|
||||
</pkgmetadata>
|
||||
@@ -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_{12..15} )
|
||||
|
||||
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
|
||||
|
||||
distutils-r1_python_prepare_all
|
||||
}
|
||||
|
||||
python_test() {
|
||||
cd "${BUILD_DIR}/install$(python_get_sitedir)" || die
|
||||
epytest --import-check
|
||||
}
|
||||
Reference in new issue
Block a user