From 04a01d3b3fcdc19cd6b93613b9b44994ab60b0fe Mon Sep 17 00:00:00 2001 From: hraban Date: Thu, 13 Mar 2025 20:14:43 +0100 Subject: [PATCH] =?UTF-8?q?Workaround=20f=C3=BCr=20komische=20Python-Pfade?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scm/yaml_parser.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scm/yaml_parser.scm b/scm/yaml_parser.scm index 7930a52..577549e 100644 --- a/scm/yaml_parser.scm +++ b/scm/yaml_parser.scm @@ -4,9 +4,9 @@ (let* ((python_cmd (string-append "import sys, yaml, json; print(json.dumps(yaml.safe_load(open('" filename "'))))")) ; WTF? On Windows there is "py" and we need to specify the encoding, on linux there is "python3" or "python" ; but "python3" seems to work better. Be sure you have PyYAML installed. - (pipe (open-pipe* OPEN_READ (if windows? "py" "python3") "-X" "utf8" "-c" python_cmd)) + (pipe (open-pipe (string-append "PYTHONHOME='' " (if windows? "py" "python3") " -X utf8 -c \"" python_cmd "\"") OPEN_READ)) (json (get-string-all pipe))) (close-pipe pipe) (json-string->scm json))) -(define (parse-yml-file filename) (resolve-inherits (yml-file->scm filename))) \ No newline at end of file +(define (parse-yml-file filename) (resolve-inherits (yml-file->scm filename)))