mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 05:52:22 -04:00
aqt wheel: fix unintended inclusion of qt/aqt/data (#4180)
The inclusion of files under qt/aqt is handled by qt/pyproject.toml,
not qt/hatch_build.py, which works with the files under out/qt/_aqt.
Excluding qt/aqt/data and all files ending in .ui in qt/pyproject.toml
fixes the issue, since the other unwanted files (**/*.scss, **/*.ts, and
**/tsconfig*) all reside under qt/aqt/data.
Fixes: 04996c77f3
This commit is contained in:
parent
8a3b72e6e5
commit
7fe201d6bd
2 changed files with 2 additions and 6 deletions
|
@ -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
|
||||
|
|
|
@ -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"
|
||||
|
|
Loading…
Reference in a new issue