diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000000..815e243274 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,16 @@ +[build-system] +requires = ["setuptools>=64", "wheel", "setuptools_scm>=8"] +build-backend = "setuptools.build_meta" + +[project] +name = "axolotl" +dynamic = ["version", "dependencies", "optional-dependencies"] +description = "LLM Trainer" +readme = "README.md" +requires-python = ">=3.10" + +[project.urls] +Homepage = "https://axolotl-ai-cloud.github.io/axolotl/" +Repository = "https://github.com/axolotl-ai-cloud/axolotl.git" + +[tool.setuptools_scm] diff --git a/setup.py b/setup.py index 336da98f4b..ac2fd9d421 100644 --- a/setup.py +++ b/setup.py @@ -1,5 +1,4 @@ """setup.py for axolotl""" - import platform import re from importlib.metadata import PackageNotFoundError, version @@ -96,7 +95,8 @@ def parse_requirements(): setup( name="axolotl", - version="0.5.2", + use_scm_version=True, + setup_requires=["setuptools_scm"], description="LLM Trainer", long_description="Axolotl is a tool designed to streamline the fine-tuning of various AI models, offering support for multiple configurations and architectures.", package_dir={"": "src"}, diff --git a/src/axolotl/__init__.py b/src/axolotl/__init__.py index e69de29bb2..e555ece480 100644 --- a/src/axolotl/__init__.py +++ b/src/axolotl/__init__.py @@ -0,0 +1,8 @@ +"""Axolotl - Train and fine-tune large language models""" + +try: + from importlib.metadata import version + + __version__ = version("axolotl") +except ImportError: + __version__ = "unknown"