1313- .pure-py/
1414"""
1515from importlib import import_module
16- from typing import Dict , List , Iterable , cast
16+ from typing import Dict , List , Iterable
1717from subprocess import check_call
1818from distutils .dir_util import copy_tree
1919from purescripto .configure_consts import *
2424import wisepy2
2525
2626_TEMPLATE = {
27- CKey .CoreFnDir : CValue .CoreFnDir ,
27+ CKey .CoreFnDir : CValue .CoreFnDir ,
2828 CKey .EntryModule : CValue .EntryModule ,
29- CKey .BluePrint : CValue .BluePrint ,
29+ CKey .BluePrint : CValue .BluePrint ,
3030 CKey .IndexMirror : CValue .IndexMirror ,
31- CKey .IsPrettyPrint : CValue .IsPrettyPrint ,
31+ CKey .DataFormat : CValue .DataFormat ,
3232}
3333
3434
@@ -41,7 +41,7 @@ def mk_ps_blueprint_cmd(
4141 python_pack_name : str ,
4242 entry : str ,
4343 ffi_deps_path : str ,
44- is_pretty_print : bool ,
44+ format : str ,
4545):
4646 return [
4747 pspy_blueprint ,
@@ -51,8 +51,8 @@ def mk_ps_blueprint_cmd(
5151 entry ,
5252 "--ffi-dep" ,
5353 ffi_deps_path ,
54- "--out-pretty " ,
55- str ( is_pretty_print ) ,
54+ "--out-format " ,
55+ format ,
5656 ]
5757
5858
@@ -171,15 +171,15 @@ def pspy(
171171 conf_dict .setdefault (CKey .PyPack , py_pack_name_default )
172172 conf_dict .setdefault (CKey .CoreFnDir , CValue .CoreFnDir )
173173 conf_dict .setdefault (CKey .EntryModule , CValue .EntryModule )
174- conf_dict .setdefault (CKey .IsPrettyPrint , CValue .IsPrettyPrint )
174+ conf_dict .setdefault (CKey .DataFormat , CValue .DataFormat )
175175
176176 conf = CValue ()
177177 conf .IndexMirror = conf_dict [CKey .IndexMirror ]
178178 conf .BluePrint = conf_dict [CKey .BluePrint ]
179179 conf .PyPack = conf_dict [CKey .PyPack ]
180180 conf .CoreFnDir = conf_dict [CKey .CoreFnDir ]
181181 conf .EntryModule = conf_dict [CKey .EntryModule ]
182- conf .IsPrettyPrint = cast ( bool , conf_dict [CKey .IsPrettyPrint ])
182+ conf .DataFormat = conf_dict [CKey .DataFormat ]
183183
184184 # TODO: currently unused.
185185 # support custom corefn output path in pspy-blueprint.
@@ -209,7 +209,7 @@ def pspy(
209209 conf .PyPack ,
210210 conf .EntryModule ,
211211 str (ffi_deps_file ),
212- conf .IsPrettyPrint ,
212+ conf .DataFormat ,
213213 )
214214 try :
215215 check_call (cmd )
0 commit comments