Skip to content

Commit

Permalink
pyprojectInstallHook: Use uv's byte code compilation instead of custo…
Browse files Browse the repository at this point in the history
…m hook

And only use custom hook for cross where we can't yet use uv.
  • Loading branch information
adisbladis committed Nov 20, 2024
1 parent edd08c3 commit 9877a90
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions build/hooks/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,7 @@ in
pyprojectBytecodeHook,
pyprojectOutputSetupHook,
python,
stdenv,
}:
makeSetupHook {
name = "pyproject-hook";
Expand All @@ -212,9 +213,8 @@ in
pyprojectConfigureHook
pyprojectBuildHook
pyprojectInstallHook
pyprojectBytecodeHook
pyprojectOutputSetupHook
];
] ++ lib.optional (stdenv.buildPlatform != stdenv.hostPlatform) pyprojectBytecodeHook;
} ./meta-hook.sh
)
(
Expand Down
2 changes: 1 addition & 1 deletion build/hooks/pyproject-install-hook.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ pyprojectInstallPhase() {
pushd dist >/dev/null

for wheel in ./*.whl; do
@uv@/bin/uv pip --offline --no-cache install --no-deps --link-mode=copy --python=@pythonInterpreter@ --system --prefix "$out" $uvPipInstallFlags "$wheel"
@uv@/bin/uv pip --offline --no-cache install --no-deps --link-mode=copy --compile-bytecode --python=@pythonInterpreter@ --system --prefix "$out" $uvPipInstallFlags "$wheel"
echo "Successfully installed $wheel"
done

Expand Down

0 comments on commit 9877a90

Please sign in to comment.