forked from solderpunk/AV-98
Add scripts to run tools locally
This adds a script for each executable, and a __main__.py for offpunk itself. This intends to "fix" (albeit unperfectly, see below) how 46f61bf forbade locally running executables without first installing offpunk in your site packages (or hacking on PYTHONPATH). Of those, most are "glue script", files in the top-level directory and outside offpunk's module, which are purely there to allow running the `netcache`, `ansicat` and `opnk` without any other setup than a working python and a `git clone`. Notably, they will not be included in the source distribution (sdist) archive built by flit. Sadly the `offpunk` executable doesn't get the same treatment, because having both an `offpunk.py` script and an `offpunk` python package is ambiguous, and flit disallows that, avoiding to package anything. So instead it now has a pretty bare __main__.py, which really works the same way as the "glue scripts", except this one does get packaged. This means everything but `offpunk` may be run like `./netcache.py`, making this setup a bit inconsistent (which may or may not be an issue). Running `python -m <tool>` works for everything though, so there *is* a consistent way to run them all, and in the darkness, bind them.
This commit is contained in:
parent
bc43e3150b
commit
370e7e4dc5
|
@ -0,0 +1,3 @@
|
|||
#!/usr/bin/env python3
|
||||
from offpunk.ansicat import main
|
||||
main()
|
|
@ -0,0 +1,3 @@
|
|||
#!/usr/bin/env python3
|
||||
from offpunk.netcache import main
|
||||
main()
|
|
@ -0,0 +1,3 @@
|
|||
from . import main
|
||||
main()
|
||||
|
Loading…
Reference in New Issue