services.bepasty: buildEnv for creating PYTHONPATH

Fixes 'You need gevent installed to use this worker.' as well as missing Flask deps.
This commit is contained in:
makefu 2016-02-28 01:35:56 +01:00
parent de124cfa79
commit 3f7c600666

View File

@ -103,9 +103,13 @@ in
after = [ "network.target" ]; after = [ "network.target" ];
restartIfChanged = true; restartIfChanged = true;
environment = { environment = let
penv = python.buildEnv.override {
extraLibs = [ bepasty gevent ];
};
in {
BEPASTY_CONFIG = "${server.workDir}/bepasty-${name}.conf"; BEPASTY_CONFIG = "${server.workDir}/bepasty-${name}.conf";
PYTHONPATH= "${bepasty}/lib/${python.libPrefix}/site-packages:${gevent}/lib/${python.libPrefix}/site-packages"; PYTHONPATH= "${penv}/${python.sitePackages}/";
}; };
serviceConfig = { serviceConfig = {