You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@incubator.apache.org by jm...@apache.org on 2026/09/12 03:42:55 UTC
(incubator) 01/02: fix packagng
This is an automated email from the ASF dual-hosted git repository.
justinmclean pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator.git
commit c330fd079079acf5b2a161a5a38c15e802a1aea3
Author: Justin Mclean <jm...@apache.org>
AuthorDate: Sat Sep 12 13:40:35 2026 +1000
fix packagng
---
tools/skills/package-skills.py | 19 +++++++++++++++----
1 file changed, 15 insertions(+), 4 deletions(-)
diff --git a/tools/skills/package-skills.py b/tools/skills/package-skills.py
index 35eb89f1c..5a7d0a4e1 100644
--- a/tools/skills/package-skills.py
+++ b/tools/skills/package-skills.py
@@ -27,8 +27,10 @@ compiled packages in one place and the sources somewhere else:
Output: dist/<skill-name>.skill next to this script. Exit status is the
number of skills that failed to package (0 = all good).
-Excluded from packages: __pycache__/, *.pyc, .DS_Store, node_modules/, and a
-skill's root-level evals/ or output/ directories — evals live in the repo,
+Excluded from packages: __pycache__/, *.pyc, .DS_Store, node_modules/, a
+skill's root-level evals/ or output/ directories, its root-level build and
+maintainer files (Makefile, README.md, .gitignore), and test files
+(test_*.py, *_test.py, conftest.py) at any depth — those live in the repo,
not in the shipped skill.
"""
@@ -40,10 +42,17 @@ from pathlib import Path
ROOT = Path(__file__).resolve().parent
DIST = ROOT / "dist"
-EXCLUDE_DIRS = {"__pycache__", "node_modules"}
-EXCLUDE_GLOBS = {"*.pyc"}
+EXCLUDE_DIRS = {"__pycache__", "node_modules", ".pytest_cache"}
+# Tests are repo artefacts like the Makefile: they gate a build, they are not
+# part of what gets installed. Matched at any depth, not just the root.
+EXCLUDE_GLOBS = {"*.pyc", "test_*.py", "*_test.py", "conftest.py"}
EXCLUDE_FILES = {".DS_Store"}
ROOT_EXCLUDE_DIRS = {"evals", "output"}
+# Build and maintainer files at a skill's root. Same reasoning as evals/:
+# they belong in the repo, not in the thing people install. A Makefile is the
+# clearest case, since it drives this packager and cannot work once unpacked.
+ROOT_EXCLUDE_FILES = {"Makefile", "makefile", "GNUmakefile", ".gitignore",
+ ".gitattributes", "README.md"}
def validate(md: Path) -> str | None:
@@ -67,6 +76,8 @@ def should_exclude(arcname: Path) -> bool:
return True
if len(parts) > 1 and parts[1] in ROOT_EXCLUDE_DIRS:
return True
+ if len(parts) == 2 and parts[1] in ROOT_EXCLUDE_FILES:
+ return True
if arcname.name in EXCLUDE_FILES:
return True
return any(fnmatch.fnmatch(arcname.name, pat) for pat in EXCLUDE_GLOBS)
---------------------------------------------------------------------
To unsubscribe, e-mail: cvs-unsubscribe@incubator.apache.org
For additional commands, e-mail: cvs-help@incubator.apache.org