treewide: fix sandbox darwin build

This commit is contained in:
Theodore Ni 2023-08-01 00:01:21 -07:00
parent 09f5e7d840
commit 166ff8fe1f
No known key found for this signature in database
GPG key ID: 48B67583BDDD4474
45 changed files with 117 additions and 15 deletions

View file

@ -42,6 +42,8 @@ buildPythonPackage rec {
yarl
];
__darwinAllowLocalNetworking = true;
nativeCheckInputs = [
aresponses
pytest-asyncio

View file

@ -31,6 +31,8 @@ buildPythonPackage rec {
haversine
];
__darwinAllowLocalNetworking = true;
nativeCheckInputs = [
aresponses
mock

View file

@ -30,6 +30,8 @@ buildPythonPackage rec {
pytz
];
__darwinAllowLocalNetworking = true;
nativeCheckInputs = [
aresponses
pytest-asyncio

View file

@ -30,6 +30,8 @@ buildPythonPackage rec {
pytz
];
__darwinAllowLocalNetworking = true;
nativeCheckInputs = [
aresponses
pytest-asyncio

View file

@ -31,6 +31,8 @@ buildPythonPackage rec {
pytz
];
__darwinAllowLocalNetworking = true;
nativeCheckInputs = [
aresponses
mock

View file

@ -30,6 +30,8 @@ buildPythonPackage rec {
pytz
];
__darwinAllowLocalNetworking = true;
nativeCheckInputs = [
aresponses
pytest-asyncio

View file

@ -30,6 +30,8 @@ buildPythonPackage rec {
pytz
];
__darwinAllowLocalNetworking = true;
nativeCheckInputs = [
pytestCheckHook
];

View file

@ -35,6 +35,8 @@ buildPythonPackage rec {
dateparser
];
__darwinAllowLocalNetworking = true;
nativeCheckInputs = [
aresponses
mock

View file

@ -28,6 +28,8 @@ buildPythonPackage rec {
dateparser
];
__darwinAllowLocalNetworking = true;
nativeCheckInputs = [
aresponses
pytest-asyncio

View file

@ -25,6 +25,8 @@ buildPythonPackage rec {
aiohttp
];
__darwinAllowLocalNetworking = true;
nativeCheckInputs = [
pytest-aiohttp
pytestCheckHook

View file

@ -37,6 +37,8 @@ buildPythonPackage rec {
async-timeout
];
__darwinAllowLocalNetworking = true;
nativeCheckInputs = [
pytestCheckHook
pytest-aiohttp

View file

@ -3,6 +3,7 @@
, case
, fetchPypi
, pytestCheckHook
, pytest-rerunfailures
, pythonOlder
, vine
}:
@ -23,9 +24,12 @@ buildPythonPackage rec {
vine
];
__darwinAllowLocalNetworking = true;
nativeCheckInputs = [
case
pytestCheckHook
pytest-rerunfailures
];
disabledTests = [

View file

@ -58,6 +58,8 @@ buildPythonPackage rec {
];
};
__darwinAllowLocalNetworking = true;
nativeCheckInputs = [
openssh
openssl

View file

@ -26,13 +26,16 @@ buildPythonPackage rec {
__darwinAllowLocalNetworking = true;
disabledTests = [
"test_aside_basic" # times out
"test_write_timeout" # flaky, does not always time out
"test_aside_cancel" # fails because modifies PYTHONPATH and cant find pytest
"test_ssl_outgoing" # touches network
"test_unix_echo" # socket bind error on hydra when built with other packages
"test_unix_ssl_server" # socket bind error on hydra when built with other packages
];
"test_aside_basic" # times out
"test_write_timeout" # flaky, does not always time out
"test_aside_cancel" # fails because modifies PYTHONPATH and cant find pytest
"test_ssl_outgoing" # touches network
"test_unix_echo" # socket bind error on hydra when built with other packages
"test_unix_ssl_server" # socket bind error on hydra when built with other packages
] ++ lib.optionals stdenv.isDarwin [
# connects to python.org:1, expects an OsError, hangs in the darwin sandbox
"test_create_bad_connection"
];
pythonImportsCheck = [ "curio" ];

View file

@ -34,6 +34,8 @@ buildPythonPackage rec {
requests
];
__darwinAllowLocalNetworking = true;
nativeCheckInputs = [
click
freezegun

View file

@ -44,6 +44,8 @@ buildPythonPackage rec {
zeroconf
];
__darwinAllowLocalNetworking = true;
nativeCheckInputs = [
pytest-asyncio
pytest-httpx

View file

@ -42,6 +42,8 @@ buildPythonPackage rec {
six
];
__darwinAllowLocalNetworking = true;
nativeCheckInputs = [
pytestCheckHook
pytest-django

View file

@ -45,6 +45,8 @@ buildPythonPackage rec {
cython
];
__darwinAllowLocalNetworking = true;
preCheck = ''
export HOME=$TMPDIR
cp -R tests examples $TMPDIR

View file

@ -22,6 +22,8 @@ buildPythonPackage rec {
sgmllib3k
];
__darwinAllowLocalNetworking = true;
checkPhase = ''
# Tests are failing
# AssertionError: unexpected '~' char in declaration

View file

@ -27,6 +27,8 @@ buildPythonPackage rec {
httplib2
];
__darwinAllowLocalNetworking = true;
nativeCheckInputs = [
flask
mock

View file

@ -1,4 +1,5 @@
{ lib
{ stdenv
, lib
, buildPythonPackage
, pythonAtLeast
, pythonOlder
@ -61,11 +62,14 @@ buildPythonPackage rec {
];
disabledTests = lib.optionals (pythonAtLeast "3.11") [
# Pèython 3.11 support, https://github.com/graphql-python/graphene-django/pull/1365
# Python 3.11 support, https://github.com/graphql-python/graphene-django/pull/1365
"test_django_objecttype_convert_choices_enum_naming_collisions"
"test_django_objecttype_choices_custom_enum_name"
"test_django_objecttype_convert_choices_enum_list"
"test_schema_representation"
] ++ lib.optionals stdenv.isDarwin [
# this test touches files in the "/" directory and fails in darwin sandbox
"test_should_filepath_convert_string"
];
meta = with lib; {

View file

@ -26,6 +26,10 @@ buildPythonPackage rec {
hash = "sha256-1Pl+l28J7crfO2UY/9/D019IzOHWOwjR+UvVEHICTqU=";
};
postPatch = ''
sed -i "/--cov/d" setup.cfg
'';
propagatedBuildInputs = [
pyparsing
];
@ -40,13 +44,11 @@ buildPythonPackage rec {
pytestCheckHook
];
__darwinAllowLocalNetworking = true;
# Don't run tests for older Pythons
doCheck = pythonAtLeast "3.9";
postPatch = ''
sed -i "/--cov/d" setup.cfg
'';
disabledTests = [
# ValueError: Unable to load PEM file.
# https://github.com/httplib2/httplib2/issues/192#issuecomment-993165140

View file

@ -54,6 +54,8 @@ buildPythonPackage rec {
];
};
__darwinAllowLocalNetworking = true;
nativeCheckInputs = [
flask
hypercorn

View file

@ -79,6 +79,8 @@ buildPythonPackage rec {
xmltodict
];
__darwinAllowLocalNetworking = true;
nativeCheckInputs = [
freezegun
pytestCheckHook

View file

@ -24,6 +24,8 @@ buildPythonPackage rec {
six
];
__darwinAllowLocalNetworking = true;
checkPhase = ''
${python.interpreter} -m unittest
'';

View file

@ -49,6 +49,8 @@ buildPythonPackage rec {
tomli
];
__darwinAllowLocalNetworking = true;
nativeCheckInputs = [
flaky
pytest-asyncio

View file

@ -19,6 +19,8 @@ buildPythonPackage rec {
hash = "sha256-0qh6OorIIs3WfneZavzwTTZFwIRXCJzezks/qihu8xo=";
};
__darwinAllowLocalNetworking = true;
nativeCheckInputs = [
pytestCheckHook
];

View file

@ -46,6 +46,8 @@ buildPythonPackage rec {
curl
];
__darwinAllowLocalNetworking = true;
nativeCheckInputs = [
bottle
pytestCheckHook

View file

@ -33,6 +33,8 @@ buildPythonPackage rec {
lxml
];
__darwinAllowLocalNetworking = true;
pythonImportsCheck = [ "pyquery" ];
checkInputs = [

View file

@ -24,6 +24,8 @@ buildPythonPackage rec {
serpent
];
__darwinAllowLocalNetworking = true;
nativeCheckInputs = [
pytestCheckHook
];

View file

@ -33,6 +33,8 @@ buildPythonPackage rec {
attrs
];
__darwinAllowLocalNetworking = true;
checkInputs = [
pytestCheckHook
pytest-httpbin

View file

@ -32,6 +32,8 @@ buildPythonPackage rec {
six
];
__darwinAllowLocalNetworking = true;
nativeCheckInputs = [
pytestCheckHook
];

View file

@ -21,6 +21,8 @@ buildPythonPackage rec {
tornado
];
__darwinAllowLocalNetworking = true;
nativeCheckInputs = [
pytest
tornado

View file

@ -37,6 +37,8 @@ buildPythonPackage rec {
lxml
];
__darwinAllowLocalNetworking = true;
nativeCheckInputs = [
hypothesis
pytest-vcr

View file

@ -24,6 +24,8 @@ buildPythonPackage rec {
pycryptodomex
];
__darwinAllowLocalNetworking = true;
nativeCheckInputs = [
pytestCheckHook
];

View file

@ -22,6 +22,8 @@ buildPythonPackage rec {
setuptools
];
__darwinAllowLocalNetworking = true;
nativeCheckInputs = [
pytestCheckHook
requests

View file

@ -30,6 +30,8 @@ buildPythonPackage rec {
pytoolconfig
] ++ pytoolconfig.optional-dependencies.global;
__darwinAllowLocalNetworking = true;
nativeCheckInputs = [
pytest-timeout
pytestCheckHook

View file

@ -31,6 +31,8 @@ buildPythonPackage rec {
tornado
];
__darwinAllowLocalNetworking = true;
nativeCheckInputs = [
ipython
pytestCheckHook

View file

@ -27,6 +27,8 @@ buildPythonPackage rec {
--replace "--durations=2 --verbose" ""
'';
__darwinAllowLocalNetworking = true;
nativeCheckInputs = [
pytest-asyncio
pytestCheckHook

View file

@ -1,4 +1,5 @@
{ lib
{ stdenv
, lib
, asyncssh
, bcrypt
, buildPythonPackage
@ -7,6 +8,7 @@
, mock-ssh-server
, pytest-asyncio
, pytestCheckHook
, setuptools
, setuptools-scm
}:
@ -24,6 +26,7 @@ buildPythonPackage rec {
SETUPTOOLS_SCM_PRETEND_VERSION = version;
nativeBuildInputs = [
setuptools
setuptools-scm
];
@ -33,12 +36,19 @@ buildPythonPackage rec {
fsspec
];
__darwinAllowLocalNetworking = true;
nativeCheckInputs = [
mock-ssh-server
pytest-asyncio
pytestCheckHook
];
disabledTests = lib.optionals stdenv.isDarwin [
# test fails with sandbox enabled
"test_checksum"
];
pythonImportsCheck = [
"sshfs"
];

View file

@ -31,12 +31,13 @@ buildPythonPackage rec {
"terminado"
];
__darwinAllowLocalNetworking = true;
nativeCheckInputs = [
pytest-timeout
pytestCheckHook
];
meta = with lib; {
description = "Terminals served by Tornado websockets";
homepage = "https://github.com/jupyter/terminado";

View file

@ -25,6 +25,8 @@ buildPythonPackage rec {
pyserial
];
__darwinAllowLocalNetworking = true;
nativeCheckInputs = [
pytestCheckHook
];

View file

@ -36,6 +36,8 @@ buildPythonPackage rec {
cached-property
];
__darwinAllowLocalNetworking = true;
nativeCheckInputs = [
flask
pytest-httpserver

View file

@ -97,6 +97,8 @@ buildPythonPackage rec {
shortuuid
];
__darwinAllowLocalNetworking = true;
nativeCheckInputs = [
azure-containerregistry
azure-core

View file

@ -40,6 +40,8 @@ buildPythonPackage rec {
pyyaml
];
__darwinAllowLocalNetworking = true;
nativeCheckInputs = [
cheroot
pytestCheckHook