Commit Graph

1 Commits

Author SHA1 Message Date
Austreelis
bc43e3150b Put everything in a common offpunk package
This moves around and renames a bunch of code, as an effort toward
fixing the flit build process.  Simply put, all source code has been
moved in an `offpunk` directory, and renamed in ways that (hopefully)
make sense.  The `pyproject.toml` file has been updated, too.

This changes how to import code from offpunk modules: old top-level
modules are now under `offpunk` (`import netcache` ->
`from offpunk import netcache`), and "off" prefixes have been stripped
(`from offutils import run` -> `from offpunk.utils import run`).

Note file mode x (execute) was removed on all touched files (if it was
set before), meaning they cannot be executed exactly like before this
change.  Running scripts directly (`./offpunk/netcache.py`) is broken
because python doesn't populate parent modules of top-level modules.
Running `python -m offpunk.netcache` is broken because running inner
python modules as top-level this way *does* populate parent modules
(assuming my understanding is correct, but it may very well not be), but
it can somehow trigger undefined behavior (!?).  Running
`python -m offpunk` still works though.

Signed-off-by: Austreelis <dev@austreelis.net>
2023-09-08 17:21:07 +02:00