From 3fbed089cd2e5e61a9a6a4fad8c81e87492450d5 Mon Sep 17 00:00:00 2001 From: atse Date: Fri, 23 Aug 2024 11:30:16 +0800 Subject: [PATCH] Add pytec runnables --- flake.nix | 14 ++++++++++++++ pytec/autotune.py | 0 pytec/plot.py | 0 pytec/tec_qt.py | 0 4 files changed, 14 insertions(+) mode change 100644 => 100755 pytec/autotune.py mode change 100644 => 100755 pytec/plot.py mode change 100644 => 100755 pytec/tec_qt.py diff --git a/flake.nix b/flake.nix index 8b101b6..405f931 100644 --- a/flake.nix +++ b/flake.nix @@ -81,6 +81,19 @@ propagatedBuildInputs = [ pyqtgraph pkgs.python3Packages.numpy ]; }; + pytec-dev-wrappers = pkgs.runCommandNoCC "pytec-dev-wrappers" { } '' + mkdir -p $out/bin + for program in ${self}/pytec/*.py; do + if [ -x $program ]; then + progname=`basename -s .py $program` + outname=$out/bin/$progname + echo "#!${pkgs.bash}/bin/bash" >> $outname + echo "exec python3 -m pytec.$progname \"\$@\"" >> $outname + chmod 755 $outname + fi + done + ''; + thermostat_gui = pkgs.python3Packages.buildPythonPackage { pname = "thermostat_gui"; version = "0.0.0"; @@ -121,6 +134,7 @@ openocd dfu-util rlwrap + pytec-dev-wrappers ] ++ (with python3Packages; [ numpy diff --git a/pytec/autotune.py b/pytec/autotune.py old mode 100644 new mode 100755 diff --git a/pytec/plot.py b/pytec/plot.py old mode 100644 new mode 100755 diff --git a/pytec/tec_qt.py b/pytec/tec_qt.py old mode 100644 new mode 100755