diff --git a/pyproject.toml b/pyproject.toml index f0392b7ace45..4fdcfe0c9986 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -101,14 +101,24 @@ Changes = "https://github.com/wandb/weave/releases" Twitter = "https://twitter.com/weights_biases" [build-system] -requires = ["setuptools>=42", "wheel"] -build-backend = "setuptools.build_meta" - -[tool.setuptools] -packages = ["weave"] +requires = ["hatchling"] +build-backend = "hatchling.build" + +[tool.hatch.version] +path = "weave/version.py" + +[tool.hatch.build] +include = ["weave"] +exclude = [ + "weave_query", + "weave-js", + "examples", + "tests", + "docs", + "dev_docs", + "weave/clear_cache.py", +] -[tool.setuptools.dynamic] -version = { attr = "weave.version.VERSION" } [tool.pytest.ini_options] filterwarnings = [ diff --git a/weave/__init__.py b/weave/__init__.py index c865f4c5ad79..3b54ba971762 100644 --- a/weave/__init__.py +++ b/weave/__init__.py @@ -5,6 +5,7 @@ __version__ = version.VERSION + from weave.flow.agent import Agent as Agent from weave.flow.agent import AgentState as AgentState from weave.flow.dataset import Dataset