OpenSCAD: Support installation into read-only locations

This commit is contained in:
Chris Hennes
2022-02-12 16:15:38 -06:00
parent dc332a5ca0
commit 2a79ce4bdc

View File

@@ -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')