python3Packages.httpx: unset SSL_CERT_FILE in hook (#395400)

Changed files
+9 -23
pkgs
development
python-modules
authlib
confluent-kafka
httpx
hypercorn
sanic
speechrecognition
-5
pkgs/development/python-modules/authlib/default.nix
···
werkzeug
];
-
preCheck = ''
-
# httpx 0.28.0+ requires SSL_CERT_FILE or SSL_CERT_DIR
-
export SSL_CERT_FILE=${cacert}/etc/ssl/certs/ca-bundle.crt
-
'';
-
pythonImportsCheck = [ "authlib" ];
disabledTestPaths = [
-5
pkgs/development/python-modules/confluent-kafka/default.nix
···
respx
] ++ lib.flatten (lib.attrValues optional-dependencies);
-
preCheck = ''
-
# httpx since 0.28.0+ depends on SSL_CERT_FILE
-
SSL_CERT_FILE=${cacert}/etc/ssl/certs/ca-bundle.crt
-
'';
-
pythonImportsCheck = [ "confluent_kafka" ];
disabledTestPaths = [
+4
pkgs/development/python-modules/httpx/default.nix
···
__darwinAllowLocalNetworking = true;
+
# stdenv's fake SSL_CERT_FILE breaks default http transport constructor with:
+
# FileNotFoundError: [Errno 2] No such file or directory
+
setupHook = ./setup-hook.sh;
+
meta = with lib; {
changelog = "https://github.com/encode/httpx/blob/${src.rev}/CHANGELOG.md";
description = "Next generation HTTP client";
+5
pkgs/development/python-modules/httpx/setup-hook.sh
···
+
httpxSslCertFileUnset() {
+
unset SSL_CERT_FILE
+
}
+
+
postHooks+=(httpxSslCertFileUnset)
-5
pkgs/development/python-modules/hypercorn/default.nix
···
pytestCheckHook
] ++ lib.flatten (lib.attrValues optional-dependencies);
-
preCheck = ''
-
# httpx since 0.28.0+ depends on SSL_CERT_FILE
-
SSL_CERT_FILE=${cacert}/etc/ssl/certs/ca-bundle.crt
-
'';
-
__darwinAllowLocalNetworking = true;
pythonImportsCheck = [ "hypercorn" ];
-3
pkgs/development/python-modules/sanic/default.nix
···
PATH="$out/bin:$PATH"
PYTHONPATH=$PWD:$PYTHONPATH
-
# httpx since 0.28.0+ depends on SSL_CERT_FILE
-
SSL_CERT_FILE=${cacert}/etc/ssl/certs/ca-bundle.crt
-
# needed for relative paths for some packages
cd tests
'';
-5
pkgs/development/python-modules/speechrecognition/default.nix
···
respx
] ++ lib.flatten (lib.attrValues optional-dependencies);
-
preCheck = ''
-
# httpx since 0.28.0+ depends on SSL_CERT_FILE
-
SSL_CERT_FILE=${cacert}/etc/ssl/certs/ca-bundle.crt
-
'';
-
pythonImportsCheck = [ "speech_recognition" ];
disabledTests = [