MCPcopy
hub / github.com/mherrmann/fbs / path

Function path

fbs/__init__.py:45–59  ·  view source on GitHub ↗

Return the absolute path of the given file in the project directory. For instance: path('src/main/python'). The `path_str` argument should always use forward slashes `/`, even on Windows. You can use placeholders to refer to settings. For example: path('${freeze_dir}/foo').

(path_str)

Source from the content-addressed store, hash-verified

43 SETTINGS.update(load_settings(json_paths, core_settings))
44
45def path(path_str):
46 """
47 Return the absolute path of the given file in the project directory. For
48 instance: path('src/main/python'). The `path_str` argument should always use
49 forward slashes `/`, even on Windows. You can use placeholders to refer to
50 settings. For example: path('${freeze_dir}/foo').
51 """
52 path_str = expand_placeholders(path_str, SETTINGS)
53 try:
54 project_dir = SETTINGS['project_dir']
55 except KeyError:
56 error_message = "Cannot call path(...) until fbs.init(...) has been " \
57 "called."
58 raise FbsError(error_message) from None
59 return _source.path(project_dir, path_str)

Callers 15

test_freeze_installerMethod · 0.90
get_iconsFunction · 0.90
_upload_repoFunction · 0.90
sign_installer_archFunction · 0.90
sign_installer_fedoraFunction · 0.90
sign_installer_windowsFunction · 0.90
create_repo_archFunction · 0.90
create_repo_fedoraFunction · 0.90
create_repo_ubuntuFunction · 0.90
freeze_linuxFunction · 0.90
remove_shared_librariesFunction · 0.90

Calls 2

expand_placeholdersFunction · 0.90
FbsErrorClass · 0.90

Tested by 2

test_freeze_installerMethod · 0.72