templates/python: improve shell.nix
This commit is contained in:
@@ -42,7 +42,7 @@
|
||||
passthru.devDependencies = devDependencies;
|
||||
};
|
||||
|
||||
checkPython = python3.withPackages (ps: devDependencies);
|
||||
checkPython = python3.withPackages (ps: devDependencies ++ dependencies);
|
||||
|
||||
check = runCommand "${name}-check" {} ''
|
||||
cp -r ${src} ./src
|
||||
|
||||
@@ -27,7 +27,6 @@
|
||||
shellHook = ''
|
||||
tmp_path=$(realpath ./.pythonenv)
|
||||
repo_root=$(realpath .)
|
||||
if ! cmp -s pyproject.toml $tmp_path/pyproject.toml; then
|
||||
rm -rf $tmp_path
|
||||
mkdir -p "$tmp_path/${pythonWithDeps.sitePackages}"
|
||||
|
||||
@@ -37,9 +36,8 @@
|
||||
--no-index \
|
||||
--no-build-isolation \
|
||||
--prefix "$tmp_path" \
|
||||
--editable $repo_root && \
|
||||
cp -a pyproject.toml $tmp_path/pyproject.toml
|
||||
fi
|
||||
--editable $repo_root
|
||||
|
||||
export PATH="$tmp_path/bin:${checkScript}/bin:$PATH"
|
||||
export PYTHONPATH="$repo_root:$tmp_path/${pythonWithDeps.sitePackages}"
|
||||
'';
|
||||
|
||||
Reference in New Issue
Block a user