File tree 3 files changed +6
-8
lines changed
3 files changed +6
-8
lines changed Original file line number Diff line number Diff line change 35
35
import os
36
36
import shutil
37
37
import stat
38
- from utils import *
38
+ # from utils import *
39
+ from . import utils
39
40
from pathlib import Path
40
41
41
42
# Get location of this file.
42
43
# Need to use this so that template look-ups are decoupled from the caller's working directory
43
44
here = Path (__file__ ).parent
44
45
45
46
# Load default values for template from master "inject" folder so that we don't have to maintain multiple copies of the settings
46
- defaults = parse_json (here .joinpath ("MaximSDK/Inject/.vscode/settings.json" ))
47
+ defaults = utils . parse_json (here .joinpath ("MaximSDK/Inject/.vscode/settings.json" ))
47
48
48
49
whitelist = [
49
50
"MAX32650" ,
61
62
]
62
63
63
64
def create_project (
64
- out_path : str ,
65
+ out_root : str ,
66
+ out_stem : str ,
65
67
target : str ,
66
68
board : str ,
67
69
overwrite = False ,
@@ -85,7 +87,7 @@ def create_project(
85
87
Generates Visual Studio Code project files from the VSCode-Maxim project.
86
88
"""
87
89
88
- out_path = Path (out_path )
90
+ out_path = Path (out_root ). joinpath ( out_stem )
89
91
90
92
template_dir = here .joinpath ("MaximSDK/Template" ).resolve ()
91
93
# Where to find the VS Code template directory relative to this script
Original file line number Diff line number Diff line change 33
33
"""
34
34
35
35
from collections .abc import MutableMapping
36
- from string import Template
37
36
import json
38
37
from pathlib import Path
39
38
import hashlib
@@ -62,9 +61,6 @@ def __iter__(self):
62
61
def __len__ (self ):
63
62
return len (self .d )
64
63
65
- class MSDKTemplate (Template ):
66
- delimiter = "##__"
67
-
68
64
def parse_json (filename ):
69
65
"""
70
66
Parse values from a json file into a template-friendly (all-caps keys) dictionary
You can’t perform that action at this time.
0 commit comments