MCPcopy Create free account
hub / github.com/deepnote/deepnote / _binary_path

Function _binary_path

packages/cli/pypi/src/deepnote_cli/_launcher.py:9–26  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

7
8
9def _binary_path() -> str:
10 executable = "deepnote.exe" if os.name == "nt" else "deepnote"
11 path = files("deepnote_cli").joinpath("bin", executable)
12
13 if not path.is_file():
14 raise FileNotFoundError(
15 f"Bundled executable not found at {path}. "
16 "This wheel may be incomplete or built incorrectly."
17 )
18
19 # Ensure executable bit is set on POSIX systems.
20 if os.name != "nt":
21 path_str = str(path)
22 if not os.access(path_str, os.X_OK):
23 current_mode = os.stat(path_str).st_mode
24 os.chmod(path_str, current_mode | 0o111)
25
26 return str(path)
27
28
29def main() -> int:

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected