diff --git a/.gitmodules b/.gitmodules index 215c114..56b3b9b 100644 --- a/.gitmodules +++ b/.gitmodules @@ -13,3 +13,6 @@ [submodule "src/driver/pdu"] path = src/driver/pdu url = https://github.com/COO-Utilities/pdu.git +[submodule "src/driver/galil"] + path = src/driver/galil + url = https://github.com/COO-Utilities/galil.git diff --git a/README.md b/README.md index 7c9b111..9d5308f 100644 --- a/README.md +++ b/README.md @@ -70,6 +70,7 @@ This repo uses submodules under `src/driver/`: | Submodule | Path | Import | |-----------|------|--------| | coo-ethercat | `src/driver/coo_ethercat` | `lris2.driver.coo_ethercat` | +| galil | `src/driver/galil` | `galil` (needs the `galil` extra) | | lris2-csu | `src/driver/lris2_csu` | `lris2.driver.lris2_csu` | | pdu | `src/driver/pdu` | `lris2.driver.pdu.src` | | sunpower | `src/driver/sunpower` | `lris2.driver.sunpower` | diff --git a/pyproject.toml b/pyproject.toml index 42a665e..804e65b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -35,6 +35,11 @@ camera = [ "camera-daemon@git+https://github.com/COO-Utilities/camera-daemon.git", "lris2-camera-interface@git+https://github.com/CaltechOpticalObservatories/lris2-camerad-instrument", ] +# The Galil driver's Python bindings, on a host with Galil's gclib package +# installed: install.sh --extra galil +galil = [ + "gclib", +] [tool.setuptools.package-dir] lris2 = "src" @@ -49,6 +54,7 @@ packages = ["lris2", "lris2.cli", "lris2.driver"] # coo_ethercat does not build as a package yet, and lris2_csu depends on it [tool.uv.workspace] members = [ + "src/driver/galil", "src/driver/inficon", "src/driver/pdu", "src/driver/sunpower", @@ -60,6 +66,14 @@ override-dependencies = [ "hardware_device_base @ git+https://github.com/COO-Utilities/hardware_device_base@v1.0.1", ] +[tool.uv.sources] +gclib = { index = "galil" } + +[[tool.uv.index]] +name = "galil" +url = "https://www.galil.com/sw/pub/python" +explicit = true + [tool.pytest.ini_options] testpaths = ["tests"] pythonpath = ["gui"] diff --git a/src/driver/galil b/src/driver/galil new file mode 160000 index 0000000..b2864ec --- /dev/null +++ b/src/driver/galil @@ -0,0 +1 @@ +Subproject commit b2864ec778c5d9eedda0da9d4f8bd1a16d040602 diff --git a/systemd/README.md b/systemd/README.md index 3f1c034..addf849 100644 --- a/systemd/README.md +++ b/systemd/README.md @@ -110,3 +110,13 @@ The extra is recorded in `/etc/lris2/extras`, so later runs keep it, and `config/r/rcam.yaml` reads the camerad config from the checkout, so a pull there moves the ACF the controller is loaded with. Without the module the daemon still starts and serves its keywords, reporting `state: nocamera`. + +## The Galil driver's bindings + +The `galil` driver imports `gclib`, whose Python bindings come from Galil's +own index and load Galil's `libgclib`, so they are an extra too. On a host +with Galil's `gclib` package installed: + +```bash +sudo /opt/lris2/app/systemd/install.sh --extra galil +```