MCPcopy
hub / github.com/pyodide/pyodide / _should_skip

Function _should_skip

tools/create_zipfile.py:22–43  ·  view source on GitHub ↗

Skip common files that are not needed in the zip file.

(path: Path)

Source from the content-addressed store, hash-verified

20 """
21
22 def _should_skip(path: Path) -> bool:
23 """Skip common files that are not needed in the zip file."""
24 name = path.name
25
26 if path.is_dir() and name in ("__pycache__", "dist"):
27 return True
28
29 if path.is_dir() and name.endswith((".egg-info", ".dist-info")):
30 return True
31
32 if path.is_file() and name in (
33 "LICENSE",
34 "LICENSE.txt",
35 "setup.py",
36 ".gitignore",
37 ):
38 return True
39
40 if path.is_file() and name.endswith(("pyi", "toml", "cfg", "md", "rst")):
41 return True
42
43 return False
44
45 def filterfunc(path: Path | str, names: list[str]) -> set[str]:
46 filtered_files = {(root / f).resolve() for f in excludes}

Callers 1

filterfuncFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…