We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a2d4240 commit 9781490Copy full SHA for 9781490
mesop/utils/runfiles.py
@@ -3,4 +3,10 @@
3
4
def get_runfile_location(identifier: str) -> str:
5
"""Use this wrapper to retrieve a runfile because this util is replaced in downstream sync."""
6
+
7
+ # runfiles doesn't exist when running outside of bazel (e.g. pip install)
8
+ if runfiles.Create() is None: # type: ignore
9
+ # TODO: make this less brittle and don't hard code "../", instead walk up
10
+ # to the "mesop" directory.
11
+ return "../" + identifier[len("mesop/mesop/") :]
12
return runfiles.Create().Rlocation(identifier) # type: ignore
0 commit comments