From 2a79ce4bdc3113a03d3c9bb2d30968ace4766fc0 Mon Sep 17 00:00:00 2001 From: Chris Hennes Date: Sat, 12 Feb 2022 16:15:38 -0600 Subject: [PATCH] OpenSCAD: Support installation into read-only locations --- src/Mod/OpenSCAD/importCSG.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Mod/OpenSCAD/importCSG.py b/src/Mod/OpenSCAD/importCSG.py index b3d9805eeb..4bbc2c0995 100644 --- a/src/Mod/OpenSCAD/importCSG.py +++ b/src/Mod/OpenSCAD/importCSG.py @@ -35,6 +35,7 @@ printverbose = False import FreeCAD import io import os +import tempfile import ply.lex as lex import ply.yacc as yacc @@ -178,7 +179,8 @@ def processcsg(filename): # Build the parser if printverbose: print('Load Parser') # No debug out otherwise Linux has protection exception - parser = yacc.yacc(debug=False) + temp = tempfile.gettempdir() + parser = yacc.yacc(debug=False,outputdir=temp) if printverbose: print('Parser Loaded') # Give the lexer some input #f=open('test.scad', 'r')