python311Packages.pyppeteer: refactor
This commit is contained in:
parent
7081bd488c
commit
5461767bc1
1 changed files with 13 additions and 11 deletions
|
@ -18,17 +18,24 @@
|
|||
buildPythonPackage rec {
|
||||
pname = "pyppeteer";
|
||||
version = "1.0.2";
|
||||
format = "pyproject";
|
||||
pyproject = true;
|
||||
|
||||
disabled = pythonOlder "3.6";
|
||||
disabled = pythonOlder "3.7";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = pname;
|
||||
repo = pname;
|
||||
rev = version;
|
||||
owner = "pyppeteer";
|
||||
repo = "pyppeteer";
|
||||
rev = "refs/tags/${version}";
|
||||
hash = "sha256-izMaWtJdkLHMQbyq7o7n46xB8dOHXZ5uO0UXt+twjL4=";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace pyproject.toml \
|
||||
--replace 'pyee = "^8.1.0"' 'pyee = "*"' \
|
||||
--replace 'urllib3 = "^1.25.8"' 'urllib3 = "*"' \
|
||||
--replace 'websockets = "^10.0"' 'websockets = "*"'
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [
|
||||
poetry-core
|
||||
];
|
||||
|
@ -49,12 +56,6 @@ buildPythonPackage rec {
|
|||
pytestCheckHook
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace pyproject.toml \
|
||||
--replace 'pyee = "^8.1.0"' 'pyee = "*"' \
|
||||
--replace 'websockets = "^9.1"' 'websockets = "*"'
|
||||
'';
|
||||
|
||||
disabledTestPaths = [
|
||||
# Requires network access
|
||||
"tests/test_browser.py"
|
||||
|
@ -89,6 +90,7 @@ buildPythonPackage rec {
|
|||
meta = with lib; {
|
||||
description = "Headless chrome/chromium automation library (unofficial port of puppeteer)";
|
||||
homepage = "https://github.com/pyppeteer/pyppeteer";
|
||||
changelog = "https://github.com/pyppeteer/pyppeteer/blob/${version}/CHANGELOG.md";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ kmein ];
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue