python3Packages.httpx: only unset $SSL_CERT_FILE if path doesn't exist (#530503)
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
httpxSslCertFileUnset() {
|
||||
if [ ! -e "${SSL_CERT_FILE-}" ]; then
|
||||
unset SSL_CERT_FILE
|
||||
fi
|
||||
}
|
||||
|
||||
postHooks+=(httpxSslCertFileUnset)
|
||||
|
||||
@@ -43,6 +43,7 @@ buildPythonPackage (finalAttrs: {
|
||||
pythonImportsCheck = [ "prowlpy" ];
|
||||
|
||||
nativeCheckInputs = [
|
||||
cacert
|
||||
pytest-asyncio
|
||||
pytest-cov-stub
|
||||
pytestCheckHook
|
||||
@@ -50,12 +51,6 @@ buildPythonPackage (finalAttrs: {
|
||||
]
|
||||
++ lib.concatAttrValues finalAttrs.passthru.optional-dependencies;
|
||||
|
||||
preCheck = ''
|
||||
# Without this pyreqwest fails with
|
||||
# unexpected error: No CA certificates were loaded from the system
|
||||
export SSL_CERT_FILE="${cacert}/etc/ssl/certs/ca-bundle.crt"
|
||||
'';
|
||||
|
||||
# tests fail without this
|
||||
pytestFlags = [ "-v" ];
|
||||
|
||||
|
||||
@@ -43,6 +43,7 @@ buildPythonPackage (finalAttrs: {
|
||||
pythonImportsCheck = [ "pyreqwest" ];
|
||||
|
||||
nativeCheckInputs = [
|
||||
cacert
|
||||
dirty-equals
|
||||
docker
|
||||
granian
|
||||
@@ -57,12 +58,6 @@ buildPythonPackage (finalAttrs: {
|
||||
yarl
|
||||
];
|
||||
|
||||
preCheck = ''
|
||||
# Without this tests fails with
|
||||
# unexpected error: No CA certificates were loaded from the system
|
||||
export SSL_CERT_FILE="${cacert}/etc/ssl/certs/ca-bundle.crt"
|
||||
'';
|
||||
|
||||
disabledTestPaths = [
|
||||
# requires a running Docker daemon
|
||||
"tests/test_examples.py"
|
||||
|
||||
Reference in New Issue
Block a user