clan-app: Fix clan-app-pytest not finding python3Full
This commit is contained in:
@@ -31,14 +31,14 @@ let
|
|||||||
|
|
||||||
];
|
];
|
||||||
|
|
||||||
# Deps including python packages from the local project
|
|
||||||
allPythonDeps = [ (python3Full.pkgs.toPythonModule clan-cli) ] ++ externalPythonDeps;
|
|
||||||
|
|
||||||
# Runtime binary dependencies required by the application
|
# Runtime binary dependencies required by the application
|
||||||
runtimeDependencies = [
|
runtimeDependencies = [
|
||||||
webview-lib
|
webview-lib
|
||||||
];
|
];
|
||||||
|
|
||||||
|
# Deps including python packages from the local project
|
||||||
|
allPythonDeps = [ (python3Full.pkgs.toPythonModule clan-cli) ] ++ externalPythonDeps;
|
||||||
|
|
||||||
# Dependencies required for running tests
|
# Dependencies required for running tests
|
||||||
externalTestDeps =
|
externalTestDeps =
|
||||||
externalPythonDeps
|
externalPythonDeps
|
||||||
@@ -53,9 +53,6 @@ let
|
|||||||
|
|
||||||
# Dependencies required for running tests
|
# Dependencies required for running tests
|
||||||
testDependencies = runtimeDependencies ++ allPythonDeps ++ externalTestDeps;
|
testDependencies = runtimeDependencies ++ allPythonDeps ++ externalTestDeps;
|
||||||
|
|
||||||
# Setup Python environment with all dependencies for running tests
|
|
||||||
pythonWithTestDeps = python3Full.withPackages (_ps: testDependencies);
|
|
||||||
in
|
in
|
||||||
python3Full.pkgs.buildPythonApplication rec {
|
python3Full.pkgs.buildPythonApplication rec {
|
||||||
name = "clan-app";
|
name = "clan-app";
|
||||||
@@ -100,7 +97,12 @@ python3Full.pkgs.buildPythonApplication rec {
|
|||||||
passthru = {
|
passthru = {
|
||||||
tests = {
|
tests = {
|
||||||
clan-app-pytest =
|
clan-app-pytest =
|
||||||
runCommand "clan-app-pytest" { inherit buildInputs propagatedBuildInputs nativeBuildInputs; }
|
runCommand "clan-app-pytest"
|
||||||
|
{
|
||||||
|
buildInputs = buildInputs ++ externalTestDeps;
|
||||||
|
propagatedBuildInputs = propagatedBuildInputs ++ externalTestDeps;
|
||||||
|
inherit nativeBuildInputs;
|
||||||
|
}
|
||||||
''
|
''
|
||||||
cp -r ${source} ./src
|
cp -r ${source} ./src
|
||||||
chmod +w -R ./src
|
chmod +w -R ./src
|
||||||
@@ -119,8 +121,9 @@ python3Full.pkgs.buildPythonApplication rec {
|
|||||||
fc-list
|
fc-list
|
||||||
|
|
||||||
echo "STARTING ..."
|
echo "STARTING ..."
|
||||||
|
export WEBVIEW_LIB_DIR "${webview-lib}/lib"
|
||||||
export NIX_STATE_DIR=$TMPDIR/nix IN_NIX_SANDBOX=1
|
export NIX_STATE_DIR=$TMPDIR/nix IN_NIX_SANDBOX=1
|
||||||
${pythonWithTestDeps}/bin/python -m pytest -s -m "not impure" ./tests
|
${python3Full}/bin/python3 -m pytest -s -m "not impure" ./tests
|
||||||
touch $out
|
touch $out
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user