From cb42f110c16482662251f55bd847f7e8f6ea434c Mon Sep 17 00:00:00 2001 From: yumoqing Date: Mon, 27 Jul 2026 11:07:14 +0800 Subject: [PATCH] fix: i18n JSON files not included in wheel package Root cause: no __init__.py in i18n/*/ subdirs, so setuptools packages.find() skipped them. pyproject.toml also lacked [tool.setuptools.package-data] for *.json glob. Fixes: - Add __init__.py to i18n/ and each language subdir (zh/en/jp/ko) - Add [tool.setuptools.package-data] "*" = ["*.json"] - Add build/ to .gitignore Verified: wheel now includes all 4 i18n.json files. --- .gitignore | 1 + pyproject.toml | 3 +++ sage_datamart/i18n/__init__.py | 0 sage_datamart/i18n/en/__init__.py | 0 sage_datamart/i18n/jp/__init__.py | 0 sage_datamart/i18n/ko/__init__.py | 0 sage_datamart/i18n/zh/__init__.py | 0 7 files changed, 4 insertions(+) create mode 100644 sage_datamart/i18n/__init__.py create mode 100644 sage_datamart/i18n/en/__init__.py create mode 100644 sage_datamart/i18n/jp/__init__.py create mode 100644 sage_datamart/i18n/ko/__init__.py create mode 100644 sage_datamart/i18n/zh/__init__.py diff --git a/.gitignore b/.gitignore index 93504ce..79c3796 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ __pycache__/ *.pyc *.egg-info/ models/mysql.ddl.sql +build/ diff --git a/pyproject.toml b/pyproject.toml index 8bc1b69..3db39ff 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -10,3 +10,6 @@ requires-python = ">=3.10" [tool.setuptools.packages.find] include = ["sage_datamart*"] + +[tool.setuptools.package-data] +"*" = ["*.json"] diff --git a/sage_datamart/i18n/__init__.py b/sage_datamart/i18n/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/sage_datamart/i18n/en/__init__.py b/sage_datamart/i18n/en/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/sage_datamart/i18n/jp/__init__.py b/sage_datamart/i18n/jp/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/sage_datamart/i18n/ko/__init__.py b/sage_datamart/i18n/ko/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/sage_datamart/i18n/zh/__init__.py b/sage_datamart/i18n/zh/__init__.py new file mode 100644 index 0000000..e69de29