The loading of modules from wheels wasn't properly separated from the rest
of Python yet. Now `load_wheel()` properly cleans up after itself, making
it impossible for other code to do `import the_module_from_the_wheel`.
This commit also switches to a hardcoded version ("3.0") to the version
from Git (like the Go executables use). Because there are no tags for
this branch yet, this is just the Git commit hash.
Instead of having the Python code generator as a separate shell script,
include it in the Makefile. There are now three make targets:
- generate-go: only generate Go code, for the Worker & Manager
- generate-py: only generate Python code, for the Blender add-on
- generate: run both
Move the UPnP/SSDP Manager autodiscovery code into from `main.go` into the
`worker` package. This also means changing the error handling a bit, as
only the `main.go` file is allowed to do `log.Fatal()`.
The SSDP library will log a warning on shutdown, as it doesn't expect the
UDP socket to be closed. Copy the hack on the Server implementation, which
avoids this warning getting logged, to the Client.
The Worker config/credential management was a bit of a mess. It's now
better structured, and also allows runtime overrides of the Manager URL,
without writing that override to the config file.
Convert "get own URLs" code into nicer chunks, and test those.
This minimises the code that actually depends on the available network
interfaces, and increases test coverage. Found a few bugs too.
The add-on code was copy-pasted from other addons and used the GPL v2
license, whereas by accident the LICENSE text file had the GNU "Affero" GPL
license v3 (instead of regular GPL v3).
This is now all streamlined, and all code is licensed as "GPL v3 or later".
Furthermore, the code comments just show a SPDX License Identifier
instead of an entire license block.
Due to the way SSDP works, Flamenco Manager needs to know its own URL,
where the Workers can reach it. These URLs are now found, and since there
can be multiple (like IPv6 + IPv4) they are all sent in a SSDP
notification as ;-separated strings.
Since every mocked clock time step also waits for 1ms to give other
goroutines a chance to run, it took too much wallclock time to mock-sleep
for 47 seconds with 100ms increments.
Stepping the mocked clock with 1s increments makes the test 10x faster.