From dbafabb5f44030c301458154f29a0985f11448a3 Mon Sep 17 00:00:00 2001 From: Luke Granger-Brown Date: Sun, 15 Jan 2023 02:44:42 +0000 Subject: [PATCH] baserow/baserow_enterprise: ensure that we have __init__.py everywhere --- nix/pkgs/baserow/default.nix | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/nix/pkgs/baserow/default.nix b/nix/pkgs/baserow/default.nix index 89232bd756..e591509730 100644 --- a/nix/pkgs/baserow/default.nix +++ b/nix/pkgs/baserow/default.nix @@ -49,6 +49,17 @@ let baserow-enterprise-backend = enterprise.baserow-enterprise-backend.overridePythonAttrs (_: { inherit version; src = "${src}/enterprise/backend"; + postPatch = '' + pushd src/baserow_enterprise + find . -name '*.py' -printf '%h\n' | sort | uniq | while read pydir; do + thisdir=$pydir + while [[ "$thisdir" != "." ]]; do + test -f $thisdir/__init__.py || touch $thisdir/__init__.py + thisdir="$(dirname $thisdir)" + done + done + popd + ''; }); in oss // (if !ossOnly then premium else {}) // {