-
-
Notifications
You must be signed in to change notification settings - Fork 14.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ruff: Build as a standalone without Python
Using `buildPythonPackage` make `ruff` propagate the Python used for the build, which might not be the same Python as you want in your development shell. #350654 changed the ruff top-level attribute to be built with Python modules. This doesn't actually make much sense, we have versioned Python sets, and including just the one Python in the top-level package isn't helpful, and causes issues downstream related to PATH & PYTHONPATH. See my related [uv PR](#357113 (comment)).
- Loading branch information
1 parent
351d61c
commit 1facbb3
Showing
3 changed files
with
37 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
{ | ||
buildPythonPackage, | ||
pkgs, | ||
rustPlatform, | ||
installShellFiles, | ||
}: | ||
|
||
buildPythonPackage { | ||
inherit (pkgs.ruff) | ||
pname | ||
version | ||
src | ||
postPatch | ||
cargoDeps | ||
postInstall | ||
; | ||
|
||
pyproject = true; | ||
|
||
nativeBuildInputs = [ | ||
installShellFiles | ||
rustPlatform.cargoSetupHook | ||
rustPlatform.maturinBuildHook | ||
]; | ||
|
||
pythonImportsCheck = [ "ruff" ]; | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters