diff --git a/electrolytes/__init__.py b/electrolytes/__init__.py index fa548e4..b60a4ae 100644 --- a/electrolytes/__init__.py +++ b/electrolytes/__init__.py @@ -113,7 +113,7 @@ def _save_user_constituents(components: Dict[str, Constituent]) -> None: def _load_default_constituents() -> Dict[str, Constituent]: - data = pkgutil.get_data(__name__, "data/db1.json") + data = pkgutil.get_data(__name__, "db1.json") if data is None: raise RuntimeError("failed to load default constituents") diff --git a/electrolytes/data/db1.json b/electrolytes/db1.json similarity index 100% rename from electrolytes/data/db1.json rename to electrolytes/db1.json diff --git a/pyproject.toml b/pyproject.toml index 71bf6f0..a3e8e44 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -52,8 +52,14 @@ Repository = "https://github.com/microfluidica/electrolytes" [project.scripts] electrolytes = "electrolytes.__main__:app" +[tool.setuptools] +packages = ["electrolytes"] + [tool.setuptools.dynamic] version = {attr = "electrolytes.__version__"} +[tool.setuptools.package-data] +electrolytes = ["*.json"] + [tool.mypy] plugins = ["pydantic.mypy"]