diff --git a/qt/hatch_build.py b/qt/hatch_build.py index aaf345842..1bc9eccd7 100644 --- a/qt/hatch_build.py +++ b/qt/hatch_build.py @@ -67,16 +67,12 @@ class CustomBuildHook(BuildHookInterface): def _should_exclude(self, path: Path) -> bool: """Check if a file should be excluded from the wheel.""" - path_str = str(path) - # Exclude __pycache__ - if "/__pycache__/" in path_str: + if "/__pycache__/" in str(path): return True if path.suffix in [".ui", ".scss", ".map", ".ts"]: return True if path.name.startswith("tsconfig"): return True - if "/aqt/data" in path_str: - return True return False diff --git a/qt/pyproject.toml b/qt/pyproject.toml index 5a237edb0..19b243506 100644 --- a/qt/pyproject.toml +++ b/qt/pyproject.toml @@ -77,7 +77,7 @@ ankiw = "aqt:run" [tool.hatch.build.targets.wheel] packages = ["aqt"] -exclude = ["**/*.scss", "**/*.ui"] +exclude = ["aqt/data", "**/*.ui"] [tool.hatch.version] source = "code"