Skip to content

Commit 3f72bf9

Browse files
committed
include filepath as __file__ in global scope
1 parent 8476696 commit 3f72bf9

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/rez/serialise.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -329,6 +329,7 @@ def _process(value):
329329

330330
# apply globals
331331
fn.__globals__["this"] = EarlyThis(data)
332+
fn.__globals__["__file__"] = filepath
332333
fn.__globals__.update(get_objects())
333334

334335
# execute the function

0 commit comments

Comments
 (0)