mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-07-06 17:13:24 -05:00
python3Packages.httpx: only unset $SSL_CERT_FILE if path doesn't exist (#530503)
This commit is contained in:
commit
0a8d07eef1
3 changed files with 4 additions and 12 deletions
|
|
@ -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"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue