summaryrefslogtreecommitdiff
path: root/modules/language/python/guilemod.scm
diff options
context:
space:
mode:
Diffstat (limited to 'modules/language/python/guilemod.scm')
-rw-r--r--modules/language/python/guilemod.scm6
1 files changed, 5 insertions, 1 deletions
diff --git a/modules/language/python/guilemod.scm b/modules/language/python/guilemod.scm
index 3f7ec7f..da1f5c7 100644
--- a/modules/language/python/guilemod.scm
+++ b/modules/language/python/guilemod.scm
@@ -27,6 +27,7 @@
(define-exp-C *do-extension-dispatch* #t)
(define-exp-C *extension-dispatches* '((("py" "python") . python)
(("pl" "prolog") . prolog)))
+(define-exp-C %current-file% (make-fluid '(guile)))
(define-C default-language
(lambda (file)
@@ -57,9 +58,12 @@
(env ((C default-environment) from))
(opts '())
(canonicalization 'relative))
+
(with-fluids (((C %in-compile ) #t )
((M %dont-warn-list ) '() )
- ((C %file-port-name-canonicalization) canonicalization))
+ ((C %file-port-name-canonicalization) canonicalization )
+ ((C %current-file% ) file))
+
(let* ((comp (or output-file ((C compiled-file-name) file)
(error "failed to create path for auto-compiled file"
file)))