diff --git a/llama_cpp/__init__.py b/llama_cpp/__init__.py index dce1764..cfea00e 100644 --- a/llama_cpp/__init__.py +++ b/llama_cpp/__init__.py @@ -1,2 +1,4 @@ from .llama_cpp import * from .llama import * + +from .version import __version__ \ No newline at end of file diff --git a/llama_cpp/version.py b/llama_cpp/version.py new file mode 100644 index 0000000..b5a66f5 --- /dev/null +++ b/llama_cpp/version.py @@ -0,0 +1 @@ +__version__ = "0.1.84" diff --git a/setup.py b/setup.py index 9ead113..54ff975 100644 --- a/setup.py +++ b/setup.py @@ -5,12 +5,14 @@ from pathlib import Path this_directory = Path(__file__).parent long_description = (this_directory / "README.md").read_text(encoding="utf-8") +exec(open('llama_cpp/version.py').read()) + setup( name="llama_cpp_python", description="A Python wrapper for llama.cpp", long_description=long_description, long_description_content_type="text/markdown", - version="0.1.84", + version=__version__, author="Andrei Betlen", author_email="abetlen@gmail.com", license="MIT", diff --git a/tests/test_llama.py b/tests/test_llama.py index c240122..3b432b5 100644 --- a/tests/test_llama.py +++ b/tests/test_llama.py @@ -181,3 +181,6 @@ def test_llama_server(): } ], } + +def test_llama_cpp_version(): + assert llama_cpp.__version__