diff options
author | Tomasz Kramkowski <tomasz@kramkow.ski> | 2025-08-17 11:32:17 +0100 |
---|---|---|
committer | Tomasz Kramkowski <tomasz@kramkow.ski> | 2025-08-20 12:40:41 +0100 |
commit | 39a51fa358bcf0723084546e5b937b725bc06087 (patch) | |
tree | f352407ca8f5e1b794439cc90de6cf3a0ff1fd90 | |
parent | 1c69e3f93fd0470b05cdfa5c3a320da0b8e2e871 (diff) | |
download | kutter-39a51fa358bcf0723084546e5b937b725bc06087.tar.gz kutter-39a51fa358bcf0723084546e5b937b725bc06087.tar.xz kutter-39a51fa358bcf0723084546e5b937b725bc06087.zip |
Separate version into __version__.py
This is so it can be imported by buildcommands.py without needing all of
the klippy requirements.
-rw-r--r-- | klippy/__version__.py | 1 | ||||
-rw-r--r-- | klippy/klippy.py | 3 | ||||
-rw-r--r-- | scripts/buildcommands.py | 5 |
3 files changed, 4 insertions, 5 deletions
diff --git a/klippy/__version__.py b/klippy/__version__.py new file mode 100644 index 00000000..6fc5aa69 --- /dev/null +++ b/klippy/__version__.py @@ -0,0 +1 @@ +__version__ = "0.1.0-rc4" diff --git a/klippy/klippy.py b/klippy/klippy.py index cfd4f45e..38d48d0c 100644 --- a/klippy/klippy.py +++ b/klippy/klippy.py @@ -23,8 +23,7 @@ import reactor import toolhead import util import webhooks - -__version__ = "0.1.0-rc4" +from __version__ import __version__ message_ready = "Printer is ready" diff --git a/scripts/buildcommands.py b/scripts/buildcommands.py index 394f9ffa..e68d327f 100644 --- a/scripts/buildcommands.py +++ b/scripts/buildcommands.py @@ -18,8 +18,7 @@ import zlib sys.path.append("./klippy") import msgproto - -import klippy.klippy +from __version__ import __version__ FILEHEADER = """ /* DO NOT EDIT! This is an autogenerated file. See scripts/buildcommands.py. */ @@ -567,7 +566,7 @@ def check_output(prog): def build_version(extra, cleanbuild): - version = klippy.klippy.__version__ + version = __version__ if not version: cleanbuild = False version = "?" |