From 54ea2ef955542c3af639e4e6826274bf3c8f92df Mon Sep 17 00:00:00 2001 From: Adrian Gunnar Lauterer Date: Sun, 8 Sep 2024 03:52:35 +0200 Subject: [PATCH] test7 --- flake.nix | 32 ++++++++++++++++---------------- src/ozai_webui/__init__.py | 4 ++-- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/flake.nix b/flake.nix index d572853..ec5cc14 100644 --- a/flake.nix +++ b/flake.nix @@ -32,21 +32,21 @@ postInstall = '' mkdir -p $out/share/ozai_webui/static mkdir -p $out/share/ozai_webui/templates - mkdir -p $out/lib/python3.11/site-packages/ozai_webui/templates - mkdir -p $out/lib/python3.11/site-packages/ozai_webui/static - mkdir -p $out/lib/python3.11/site-packages/templates - mkdir -p $out/lib/python3.11/site-packages/static - mkdir -p $out/lib/python3.11/templates - mkdir -p $out/lib/python3.11/static + # mkdir -p $out/lib/python3.11/site-packages/ozai_webui/templates + # mkdir -p $out/lib/python3.11/site-packages/ozai_webui/static + # mkdir -p $out/lib/python3.11/site-packages/templates + # mkdir -p $out/lib/python3.11/site-packages/static + # mkdir -p $out/lib/python3.11/templates + # mkdir -p $out/lib/python3.11/static install -Dm444 ${src}/static/* $out/share/ozai_webui/static/ install -Dm444 ${src}/templates/* $out/share/ozai_webui/templates/ - cp -r $src/templates/* $out/lib/python3.11/site-packages/ozai_webui/templates - cp -r $src/templates/* $out/lib/python3.11/site-packages/templates - cp -r $src/templates/* $out/lib/python3.11/templates - cp -r $src/static/* $out/lib/python3.11/site-packages/ozai_webui/static - cp -r $src/static/* $out/lib/python3.11/site-packages/static - cp -r $src/static/* $out/lib/python3.11/static + # cp -r $src/templates/* $out/lib/python3.11/site-packages/ozai_webui/templates + # cp -r $src/templates/* $out/lib/python3.11/site-packages/templates + # cp -r $src/templates/* $out/lib/python3.11/templates + # cp -r $src/static/* $out/lib/python3.11/site-packages/ozai_webui/static + # cp -r $src/static/* $out/lib/python3.11/site-packages/static + # cp -r $src/static/* $out/lib/python3.11/static ''; }; @@ -78,10 +78,10 @@ packages.x86_64-linux.ozai-webui-run = pkgs.stdenv.mkDerivation rec { installPhase = '' mkdir -p $out/bin - mkdir -p $out/share/ozai_webui/static - mkdir -p $out/share/ozai_webui/templates - mkdir -p $out/bin/templates - mkdir -p $out/bin/static + # mkdir -p $out/share/ozai_webui/static + # mkdir -p $out/share/ozai_webui/templates + # mkdir -p $out/bin/templates + # mkdir -p $out/bin/static cp -r $src/* $out/bin cp $src/run.sh $out/bin/run chmod +x $out/bin/run diff --git a/src/ozai_webui/__init__.py b/src/ozai_webui/__init__.py index b1ebce5..4f0c12e 100755 --- a/src/ozai_webui/__init__.py +++ b/src/ozai_webui/__init__.py @@ -220,9 +220,9 @@ def ws_message(data): socketio.emit('move_status', response.text, room=game_id) def main (): - app.run(host=ozai_webui_host, port=ozai_webui_port) # return socketio.run(app, debug=False, host=ozai_webui_host, port=ozai_webui_port, allow_unsafe_werkzeug=True) # return socketio.run(app, debug=False, host=ozai_webui_host, port=ozai_webui_port) if __name__ == '__main__': - main() + # main() + app.run(host=ozai_webui_host, port=ozai_webui_port)