From a84a457f62a86fdc317c9feec50e31c11309c04c Mon Sep 17 00:00:00 2001 From: Yurii Rashkovskii Date: Wed, 12 Dec 2018 16:12:54 +0700 Subject: [PATCH] luigi: enable local modules discovery Currently, local module discovery is broken with luigi installed from this derivation. In the documentation, you can see the following command line syntax used: ``` luigi --module module_name ... ``` However, currently this will result in an error: ``` ModuleNotFoundError: No module named 'module_name' ``` However, if the call is prepended with this: ``` PYTHONPATH=.:$PYTHONPATH ``` then it will work as expected. This patch makes this the default behaviour. --- pkgs/applications/networking/cluster/luigi/default.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkgs/applications/networking/cluster/luigi/default.nix b/pkgs/applications/networking/cluster/luigi/default.nix index 3a0164edeb04..eea992bc34c7 100644 --- a/pkgs/applications/networking/cluster/luigi/default.nix +++ b/pkgs/applications/networking/cluster/luigi/default.nix @@ -19,6 +19,9 @@ python3Packages.buildPythonApplication rec { # Requires tox, hadoop, and google cloud doCheck = false; + # This enables accessing modules stored in cwd + makeWrapperArgs = ["--prefix PYTHONPATH . :"]; + meta = with lib; { homepage = https://github.com/spotify/luigi; description = "Python package that helps you build complex pipelines of batch jobs";