Skip to content

Commit

Permalink
feat(back): fluidattacks#1171 use new builtin
Browse files Browse the repository at this point in the history
- Migrate lintPython
- Adapt documentation
- Only build using 3.11
  • Loading branch information
dsalaza4 committed Jan 9, 2024
1 parent 61d6fbe commit b642d4d
Show file tree
Hide file tree
Showing 6 changed files with 705 additions and 36 deletions.
4 changes: 0 additions & 4 deletions docs/src/api/builtins/lint.md
Original file line number Diff line number Diff line change
Expand Up @@ -257,8 +257,6 @@ Types:
- prospector (`path`): Optional.
Path to the Prospector configuration file.
Defaults to [./settings-prospector.yaml](https://github.com/fluidattacks/makes/blob/main/src/evaluator/modules/lint-python/settings-prospector.yaml).
- python (`enum ["3.9" "3.10" "3.11" "3.12"]`):
Python interpreter version that your package/module is designed for.
- searchPaths (`asIn makeSearchPaths`): Optional.
Arguments here will be passed as-is to `makeSearchPaths`.
Defaults to `makeSearchPaths`'s defaults.
Expand All @@ -280,8 +278,6 @@ Types:
- prospector (`path`): Optional.
Path to the Prospector configuration file.
Defaults to [./settings-prospector.yaml](https://github.com/fluidattacks/makes/blob/main/src/evaluator/modules/lint-python/settings-prospector.yaml).
- python (`enum ["3.9" "3.10" "3.11" "3.12"]`):
Python interpreter version that your package/module is designed for.
- searchPaths (`asIn makeSearchPaths`): Optional.
Arguments here will be passed as-is to `makeSearchPaths`.
Defaults to `makeSearchPaths`'s defaults.
Expand Down
2 changes: 0 additions & 2 deletions makes.nix
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,6 @@
in {
dirsOfModules = {
makes = {
python = "3.10";
inherit searchPaths;
src = "/src/cli";
};
Expand All @@ -182,7 +181,6 @@
};
modules = {
cliMain = {
python = "3.10";
inherit searchPaths;
src = "/src/cli/main";
};
Expand Down
24 changes: 4 additions & 20 deletions src/args/lint-python/default.nix
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
{
__nixpkgs__,
isDarwin,
listOptional,
makeDerivation,
makePythonPypiEnvironment,
makePythonEnvironment,
makeSearchPaths,
...
}: {
name,
python,
searchPaths,
settingsMypy,
settingsProspector,
Expand All @@ -25,22 +22,9 @@ makeDerivation {
bin = [__nixpkgs__.findutils];
source = [
(makeSearchPaths searchPaths)
(makePythonPypiEnvironment {
name = "lint-python";
searchPathsBuild = {
bin = listOptional isDarwin __nixpkgs__.clang;
};
sourcesYaml =
{
"3.9" = ./pypi-sources-3.9.yaml;
"3.10" = ./pypi-sources-3.10.yaml;
"3.11" = ./pypi-sources-3.11.yaml;
"3.12" = ./pypi-sources-3.12.yaml;
}
.${python};
withSetuptools_67_7_2 = true;
withSetuptoolsScm_7_1_0 = true;
withWheel_0_40_0 = true;
(makePythonEnvironment {
pythonProjectDir = ./.;
pythonVersion = "3.11";
})
];
};
Expand Down
Loading

0 comments on commit b642d4d

Please sign in to comment.