python312Packages.{proton-vpn-api-core,proton-vpn-network-manager}: Fix import tests
When pyxdg is available the dirs will use xdg vars https://www.github.com/ProtonVPN/python-proton-core/blob/e87d1e3b5fc70883adc02ef2e2d9b0eb360b83ba/proton/utils/environment.py#L56-L102
This commit is contained in:
@@ -12,6 +12,7 @@
|
||||
pytest-asyncio,
|
||||
requests,
|
||||
sentry-sdk,
|
||||
pyxdg,
|
||||
distro,
|
||||
pytestCheckHook,
|
||||
pytest-cov-stub,
|
||||
@@ -40,6 +41,7 @@ buildPythonPackage rec {
|
||||
pynacl
|
||||
proton-core
|
||||
sentry-sdk
|
||||
pyxdg
|
||||
];
|
||||
|
||||
pythonImportsCheck = [
|
||||
@@ -59,9 +61,11 @@ buildPythonPackage rec {
|
||||
pytest-cov-stub
|
||||
];
|
||||
|
||||
# Needed for `pythonImportsCheck`, `preCheck` happens between `pythonImportsCheckPhase` and `pytestCheckPhase`.
|
||||
postInstall = ''
|
||||
# Needed for Permission denied: '/homeless-shelter'
|
||||
export HOME=$(mktemp -d)
|
||||
export XDG_RUNTIME_DIR=$(mktemp -d)
|
||||
'';
|
||||
|
||||
disabledTests = [
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
proton-vpn-local-agent,
|
||||
pycairo,
|
||||
pygobject3,
|
||||
pyxdg,
|
||||
pytest-asyncio,
|
||||
pytestCheckHook,
|
||||
pytest-cov-stub,
|
||||
@@ -46,6 +47,7 @@ buildPythonPackage rec {
|
||||
proton-vpn-local-agent
|
||||
pycairo
|
||||
pygobject3
|
||||
pyxdg
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
@@ -67,9 +69,11 @@ buildPythonPackage rec {
|
||||
pytest-asyncio
|
||||
];
|
||||
|
||||
# Needed for `pythonImportsCheck`, `preCheck` happens between `pythonImportsCheckPhase` and `pytestCheckPhase`.
|
||||
preCheck = ''
|
||||
# Needed for Permission denied: '/homeless-shelter'
|
||||
export HOME=$(mktemp -d)
|
||||
export XDG_RUNTIME_DIR=$(mktemp -d)
|
||||
'';
|
||||
|
||||
meta = {
|
||||
|
||||
Reference in New Issue
Block a user