8000 python: warn people that they should look through the list of `optional-dependencies` by jfly · Pull Request #878 · nix-community/nix-init · GitHub
[go: up one dir, main page]

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/codegen/python.rs
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,10 @@ impl Builder for BuildPythonPackage {
.filter(|(_, deps)| !deps.is_empty());

if let Some((extra, deps)) = optional.next() {
writeln!(
out,
" # TODO: look through these dependency groups and remove unnecessary ones. For example, nixpkgs doesn't include test dependencies."
)?;
write!(out, " optional-dependencies = ")?;
if self.application {
write!(out, "with python3Packages; ")?;
Expand Down
1 change: 1 addition & 0 deletions tests/cmd/python-app.out/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ python3Packages.buildPythonApplication (finalAttrs: {
typing-extensions
];

# TODO: look through these dependency groups and remove unnecessary ones. For example, nixpkgs doesn't include test dependencies.
optional-dependencies = with python3Packages; {
colorama = [
colorama
Expand Down
1 change: 1 addition & 0 deletions tests/cmd/python-lib.out/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ buildPythonPackage (finalAttrs: {
markupsafe
];

# TODO: look through these dependency groups and remove unnecessary ones. For example, nixpkgs doesn't include test dependencies.
optional-dependencies = {
i18n = [
babel
Expand Down
1 change: 1 addition & 0 deletions tests/cmd/python-rust.out/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ buildPythonPackage (finalAttrs: {
typing-extensions
];

# TODO: look through these dependency groups and remove unnecessary ones. For example, nixpkgs doesn't include test dependencies.
optional-dependencies = {
docs = [
sphinx
Expand Down
Loading
0