Merge master into staging-next

This commit is contained in:
github-actions[bot]
2021-05-27 01:17:56 +00:00
committed by GitHub
27 changed files with 312 additions and 78 deletions

View File

@@ -15,7 +15,7 @@ buildPythonPackage rec {
checkPhase = ''
pushd tests
py.test ./.
py.test -Wignore::DeprecationWarning ./.
popd
'';

View File

@@ -3,6 +3,7 @@
, python
, pythonOlder
, fetchFromGitLab
, fetchpatch
, substituteAll
, bubblewrap
, exiftool
@@ -49,6 +50,12 @@ buildPythonPackage rec {
./executable-name.patch
# hardcode path to mat2 executable
./tests.patch
# remove for next release
(fetchpatch {
name = "fix-tests-ffmpeg-4.4.patch";
url = "https://0xacab.org/jvoisin/mat2/-/commit/c9be50f968212b01f8d8ad85e59e19c3e67d8578.patch";
sha256 = "0895dkv6575ps3drdfnli15cggx27n9irjx0axigrm4ql4ma0648";
})
];
postPatch = ''

View File

@@ -1,16 +1,17 @@
{ lib
, buildPythonPackage
, fetchPypi
, pytest
, pytestCheckHook
, pythonOlder
, libsodium
, cffi
, six
, hypothesis
}:
buildPythonPackage rec {
pname = "pynacl";
version = "1.4.0";
disabled = pythonOlder "3.6";
src = fetchPypi {
inherit version;
@@ -18,15 +19,22 @@ buildPythonPackage rec {
sha256 = "01b56hxrbif3hx8l6rwz5kljrgvlbj7shmmd2rjh0hn7974a5sal";
};
checkInputs = [ pytest hypothesis ];
buildInputs = [ libsodium ];
propagatedBuildInputs = [ cffi six ];
buildInputs = [
libsodium
];
propagatedBuildInputs = [
cffi
];
checkInputs = [
hypothesis
pytestCheckHook
];
SODIUM_INSTALL = "system";
checkPhase = ''
py.test
'';
pythonImportsCheck = [ "nacl" ];
meta = with lib; {
maintainers = with maintainers; [ va1entin ];

View File

@@ -1,25 +1,94 @@
{ buildPythonPackage, fetchPypi, lib, urllib3, pyee, tqdm, websockets, appdirs }:
{ lib
, appdirs
, buildPythonPackage
, fetchFromGitHub
, fetchpatch
, poetry-core
, pyee
, pytest-xdist
, pytestCheckHook
, pythonOlder
, syncer
, tqdm
, urllib3
, websockets
}:
buildPythonPackage rec {
pname = "pyppeteer";
version = "0.2.5";
disabled = pythonOlder "3.6";
format = "pyproject";
src = fetchPypi {
inherit pname version;
sha256 = "c2974be1afa13b17f7ecd120d265d8b8cd324d536a231c3953ca872b68aba4af";
src = fetchFromGitHub {
owner = pname;
repo = pname;
rev = version;
sha256 = "1hl4rw8j5yiak0d34vx1l1blr8125bscjd8m46a5m8xzm98csjc7";
};
# tests want to write to /homeless-shelter
doCheck = false;
nativeBuildInputs = [
poetry-core
];
propagatedBuildInputs = [
appdirs
websockets
tqdm
pyee
tqdm
urllib3
websockets
];
checkInputs = [
syncer
pytest-xdist
pytestCheckHook
];
patches = [
# Switch to poetry-core, https://github.com/pyppeteer/pyppeteer/pull/262
(fetchpatch {
name = "switch-poetry-core.patch";
url = "https://github.com/pyppeteer/pyppeteer/commit/e248baebefcf262fd96f261d940e74ed49ba2df9.patch";
sha256 = "03g8n35kn2alqki37s0hf2231fk2zkr4nr1x1g2rfrhps9d6fyvw";
})
];
postPatch = ''
# https://github.com/pyppeteer/pyppeteer/pull/252
substituteInPlace pyproject.toml \
--replace 'websockets = "^8.1"' 'websockets = "*"'
'';
disabledTestPaths = [
# Requires network access
"tests/test_browser.py"
"tests/test_browser_context.py"
"tests/test_connection.py"
"tests/test_coverage.py"
"tests/test_dialog.py"
"tests/test_element_handle.py"
"tests/test_execution_context.py"
"tests/test_frame.py"
"tests/test_input.py"
"tests/test_launcher.py"
"tests/test_network.py"
"tests/test_page.py"
"tests/test_pyppeteer.py"
"tests/test_target.py"
"tests/test_tracing.py"
"tests/test_worker.py"
];
disabledTests = [
# Requires network access
"TestScreenShot"
"TestBrowserCrash"
"TestPDF"
];
pythonImportsCheck = [ "pyppeteer" ];
meta = {
description = "Headless chrome/chromium automation library (unofficial port of puppeteer)";
homepage = "https://github.com/pyppeteer/pyppeteer";

View File

@@ -0,0 +1,30 @@
{ lib
, buildPythonPackage
, fetchFromGitHub
, pythonOlder
}:
buildPythonPackage rec {
pname = "syncer";
version = "1.3.0";
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "miyakogi";
repo = pname;
rev = "v${version}";
sha256 = "13y8jllix1ipkcg9lxa4nxk8kj24vivxfizf4d02cdrha9dw500v";
};
# Tests require an not maintained package (xfail)
doCheck = false;
pythonImportsCheck = [ "syncer" ];
meta = with lib; {
description = "Python async to sync converter";
homepage = "https://github.com/miyakogi/syncer";
license = licenses.mit;
maintainers = with maintainers; [ fab ];
};
}