From 30795ecae887ce20ba05eeab951a96435c5c2417 Mon Sep 17 00:00:00 2001 From: "george.ridal" Date: Tue, 8 Oct 2024 10:00:07 +1100 Subject: [PATCH] include filepath as __file__ in global scope Signed-off-by: george.ridal --- src/rez/serialise.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/rez/serialise.py b/src/rez/serialise.py index fe82421ea..2608fcabb 100644 --- a/src/rez/serialise.py +++ b/src/rez/serialise.py @@ -329,6 +329,7 @@ def _process(value): # apply globals fn.__globals__["this"] = EarlyThis(data) + fn.__globals__["__file__"] = filepath fn.__globals__.update(get_objects()) # execute the function