diff options
| author | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-06-14 23:06:22 +1000 |
|---|---|---|
| committer | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-06-14 23:06:22 +1000 |
| commit | 0ccf16d42514e7861927be2678d2de001786297c (patch) | |
| tree | 6395ddaf24d582b9d60f8594b21632399d1804b0 | |
| parent | Merge pull request #6 from caelestia-dots/python-rework (diff) | |
| download | caelestia-cli-0ccf16d42514e7861927be2678d2de001786297c.tar.gz caelestia-cli-0ccf16d42514e7861927be2678d2de001786297c.tar.bz2 caelestia-cli-0ccf16d42514e7861927be2678d2de001786297c.zip | |
Squashed commit of the following:
commit 7c47604c45e293a29ca31f01e140d621194c0aa6
Author: 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>
Date: Sat Jun 14 23:02:06 2025 +1000
dev: run without installing
| -rwxr-xr-x | run.sh | 10 | ||||
| -rw-r--r-- | src/caelestia/__init__.py | 4 | ||||
| -rw-r--r-- | src/caelestia/__main__.py | 4 |
3 files changed, 7 insertions, 11 deletions
@@ -1,11 +1,7 @@ #!/usr/bin/env sh -# Utility script for rebuilding and running caelestia +# Utility script for running caelestia -cd $(dirname $0) || exit +cd "$(dirname $0)/src" || exit -sudo rm -r dist /usr/bin/caelestia /usr/lib/python3.*/site-packages/caelestia* 2> /dev/null -python -m build --wheel --no-isolation > /dev/null -sudo python -m installer --destdir=/ dist/*.whl > /dev/null - -/usr/bin/caelestia "$@" +python -m caelestia "$@" diff --git a/src/caelestia/__init__.py b/src/caelestia/__init__.py index 71c9b62..7e5d49e 100644 --- a/src/caelestia/__init__.py +++ b/src/caelestia/__init__.py @@ -7,7 +7,3 @@ def main() -> None: args.cls(args).run() else: parser.print_help() - - -if __name__ == "__main__": - main() diff --git a/src/caelestia/__main__.py b/src/caelestia/__main__.py new file mode 100644 index 0000000..868d99e --- /dev/null +++ b/src/caelestia/__main__.py @@ -0,0 +1,4 @@ +from . import main + +if __name__ == "__main__": + main() |