MCPcopy Index your code
hub / github.com/python/cpython / subdir

Function subdir

Platforms/Apple/__main__.py:81–92  ·  view source on GitHub ↗

Ensure that a cross-build directory for the given name exists.

(name: str, create: bool = False)

Source from the content-addressed store, hash-verified

79
80
81def subdir(name: str, create: bool = False) -> Path:
82 """Ensure that a cross-build directory for the given name exists."""
83 path = CROSS_BUILD_DIR / name
84 if not path.exists():
85 if not create:
86 sys.exit(
87 f"{path} does not exist. Create it by running the appropriate "
88 f"`configure` subcommand of {SCRIPT_NAME}."
89 )
90 else:
91 path.mkdir(parents=True)
92 return path
93
94
95def run(

Callers 7

apple_envFunction · 0.70
build_python_pathFunction · 0.70
configure_build_pythonFunction · 0.70
make_build_pythonFunction · 0.70
configure_host_pythonFunction · 0.70
make_host_pythonFunction · 0.70
create_xcframeworkFunction · 0.70

Calls 3

existsMethod · 0.45
exitMethod · 0.45
mkdirMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…