Skip to content

Commit 6add80c

Browse files
authored
Merge pull request #684 from janvdp/main
PR: [issue: 672] add __version__
2 parents 8668f59 + b288b7f commit 6add80c

File tree

4 files changed

+9
-1
lines changed

4 files changed

+9
-1
lines changed

llama_cpp/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
from .llama_cpp import *
22
from .llama import *
3+
4+
from .version import __version__

llama_cpp/version.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
__version__ = "0.1.84"

setup.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,14 @@
55
this_directory = Path(__file__).parent
66
long_description = (this_directory / "README.md").read_text(encoding="utf-8")
77

8+
exec(open('llama_cpp/version.py').read())
9+
810
setup(
911
name="llama_cpp_python",
1012
description="A Python wrapper for llama.cpp",
1113
long_description=long_description,
1214
long_description_content_type="text/markdown",
13-
version="0.1.84",
15+
version=__version__,
1416
author="Andrei Betlen",
1517
author_email="[email protected]",
1618
license="MIT",

tests/test_llama.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,3 +181,6 @@ def test_llama_server():
181181
}
182182
],
183183
}
184+
185+
def test_llama_cpp_version():
186+
assert llama_cpp.__version__

0 commit comments

Comments
 (0)