siliconcompiler 0.34.1__py3-none-any.whl → 0.34.2__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- siliconcompiler/__init__.py +14 -2
- siliconcompiler/_metadata.py +1 -1
- siliconcompiler/apps/sc_show.py +1 -1
- siliconcompiler/constraints/__init__.py +17 -0
- siliconcompiler/constraints/asic_component.py +378 -0
- siliconcompiler/constraints/asic_floorplan.py +449 -0
- siliconcompiler/constraints/asic_pins.py +489 -0
- siliconcompiler/constraints/asic_timing.py +517 -0
- siliconcompiler/core.py +3 -3
- siliconcompiler/dependencyschema.py +10 -174
- siliconcompiler/design.py +235 -118
- siliconcompiler/flowgraph.py +27 -14
- siliconcompiler/library.py +133 -0
- siliconcompiler/metric.py +94 -72
- siliconcompiler/metrics/__init__.py +7 -0
- siliconcompiler/metrics/asic.py +245 -0
- siliconcompiler/metrics/fpga.py +220 -0
- siliconcompiler/package/__init__.py +138 -35
- siliconcompiler/package/github.py +6 -10
- siliconcompiler/packageschema.py +256 -12
- siliconcompiler/pathschema.py +226 -0
- siliconcompiler/project.py +459 -0
- siliconcompiler/scheduler/docker.py +2 -3
- siliconcompiler/scheduler/run_node.py +2 -1
- siliconcompiler/scheduler/scheduler.py +4 -13
- siliconcompiler/scheduler/schedulernode.py +25 -17
- siliconcompiler/scheduler/taskscheduler.py +2 -1
- siliconcompiler/schema/__init__.py +0 -2
- siliconcompiler/schema/baseschema.py +147 -24
- siliconcompiler/schema/editableschema.py +14 -6
- siliconcompiler/schema/journal.py +23 -15
- siliconcompiler/schema/namedschema.py +6 -4
- siliconcompiler/schema/parameter.py +34 -19
- siliconcompiler/schema/parametertype.py +2 -0
- siliconcompiler/schema/parametervalue.py +198 -15
- siliconcompiler/schema/schema_cfg.py +18 -14
- siliconcompiler/schema_obj.py +5 -3
- siliconcompiler/tool.py +199 -10
- siliconcompiler/toolscripts/_tools.json +4 -4
- {siliconcompiler-0.34.1.dist-info → siliconcompiler-0.34.2.dist-info}/METADATA +3 -3
- {siliconcompiler-0.34.1.dist-info → siliconcompiler-0.34.2.dist-info}/RECORD +45 -35
- siliconcompiler/schema/packageschema.py +0 -101
- {siliconcompiler-0.34.1.dist-info → siliconcompiler-0.34.2.dist-info}/WHEEL +0 -0
- {siliconcompiler-0.34.1.dist-info → siliconcompiler-0.34.2.dist-info}/entry_points.txt +0 -0
- {siliconcompiler-0.34.1.dist-info → siliconcompiler-0.34.2.dist-info}/licenses/LICENSE +0 -0
- {siliconcompiler-0.34.1.dist-info → siliconcompiler-0.34.2.dist-info}/top_level.txt +0 -0
siliconcompiler/tool.py
CHANGED
|
@@ -29,7 +29,9 @@ import os.path
|
|
|
29
29
|
from packaging.version import Version, InvalidVersion
|
|
30
30
|
from packaging.specifiers import SpecifierSet, InvalidSpecifier
|
|
31
31
|
|
|
32
|
-
from
|
|
32
|
+
from typing import List, Union
|
|
33
|
+
|
|
34
|
+
from siliconcompiler.schema import BaseSchema, NamedSchema, Journal
|
|
33
35
|
from siliconcompiler.schema import EditableSchema, Parameter, PerNode, Scope
|
|
34
36
|
from siliconcompiler.schema.parametertype import NodeType
|
|
35
37
|
from siliconcompiler.schema.utils import trim
|
|
@@ -116,15 +118,19 @@ class TaskSchema(NamedSchema):
|
|
|
116
118
|
self.__logger = None
|
|
117
119
|
self.__design_name = None
|
|
118
120
|
self.__design_top = None
|
|
121
|
+
self.__design_top_global = None
|
|
119
122
|
self.__cwd = None
|
|
120
123
|
self.__relpath = relpath
|
|
124
|
+
self.__collection_path = None
|
|
121
125
|
if chip:
|
|
122
126
|
self.__chip = chip
|
|
123
127
|
self.__schema_full = chip.schema
|
|
124
128
|
self.__logger = chip.logger
|
|
125
129
|
self.__design_name = chip.design
|
|
126
|
-
self.__design_top = chip.top()
|
|
130
|
+
self.__design_top = chip.top(step=step, index=index)
|
|
131
|
+
self.__design_top_global = chip.top()
|
|
127
132
|
self.__cwd = chip.cwd
|
|
133
|
+
self.__collection_path = chip._getcollectdir()
|
|
128
134
|
|
|
129
135
|
self.__step = step
|
|
130
136
|
self.__index = index
|
|
@@ -157,6 +163,20 @@ class TaskSchema(NamedSchema):
|
|
|
157
163
|
from_steps=set([step for step, _ in self.__schema_flow.get_entry_nodes()]),
|
|
158
164
|
prune_nodes=self.__schema_full.get('option', 'prune'))
|
|
159
165
|
|
|
166
|
+
def design_name(self) -> str:
|
|
167
|
+
'''
|
|
168
|
+
Returns:
|
|
169
|
+
name of the design
|
|
170
|
+
'''
|
|
171
|
+
return self.__design_name
|
|
172
|
+
|
|
173
|
+
def design_topmodule(self) -> str:
|
|
174
|
+
'''
|
|
175
|
+
Returns:
|
|
176
|
+
top module of the design
|
|
177
|
+
'''
|
|
178
|
+
return self.__design_top
|
|
179
|
+
|
|
160
180
|
def node(self):
|
|
161
181
|
'''
|
|
162
182
|
Returns:
|
|
@@ -213,7 +233,14 @@ class TaskSchema(NamedSchema):
|
|
|
213
233
|
else:
|
|
214
234
|
raise ValueError(f"{type} is not a schema section")
|
|
215
235
|
|
|
216
|
-
def
|
|
236
|
+
def has_breakpoint(self) -> bool:
|
|
237
|
+
'''
|
|
238
|
+
Returns:
|
|
239
|
+
True if this task has a breakpoint associated with it
|
|
240
|
+
'''
|
|
241
|
+
return self.schema().get("option", "breakpoint", step=self.__step, index=self.__index)
|
|
242
|
+
|
|
243
|
+
def get_exe(self) -> str:
|
|
217
244
|
'''
|
|
218
245
|
Determines the absolute path for the specified executable.
|
|
219
246
|
|
|
@@ -239,7 +266,7 @@ class TaskSchema(NamedSchema):
|
|
|
239
266
|
|
|
240
267
|
return fullexe
|
|
241
268
|
|
|
242
|
-
def get_exe_version(self):
|
|
269
|
+
def get_exe_version(self) -> str:
|
|
243
270
|
'''
|
|
244
271
|
Gets the version of the specified executable.
|
|
245
272
|
|
|
@@ -292,7 +319,7 @@ class TaskSchema(NamedSchema):
|
|
|
292
319
|
|
|
293
320
|
return version
|
|
294
321
|
|
|
295
|
-
def check_exe_version(self, reported_version):
|
|
322
|
+
def check_exe_version(self, reported_version) -> bool:
|
|
296
323
|
'''
|
|
297
324
|
Check if the reported version matches the versions specified in
|
|
298
325
|
:keypath:`tool,<tool>,version`.
|
|
@@ -392,8 +419,8 @@ class TaskSchema(NamedSchema):
|
|
|
392
419
|
if include_path:
|
|
393
420
|
path = self.schema("tool").find_files(
|
|
394
421
|
"path", step=self.__step, index=self.__index,
|
|
395
|
-
packages=self.schema().get("package", field="schema").get_resolvers(),
|
|
396
422
|
cwd=self.__cwd,
|
|
423
|
+
collection_dir=self.__collection_path,
|
|
397
424
|
missing_ok=True)
|
|
398
425
|
|
|
399
426
|
envvars["PATH"] = os.getenv("PATH", os.defpath)
|
|
@@ -426,6 +453,7 @@ class TaskSchema(NamedSchema):
|
|
|
426
453
|
if self.__relpath:
|
|
427
454
|
args = []
|
|
428
455
|
for arg in self.runtime_options():
|
|
456
|
+
arg = str(arg)
|
|
429
457
|
if os.path.isabs(arg) and os.path.exists(arg):
|
|
430
458
|
args.append(os.path.relpath(arg, self.__relpath))
|
|
431
459
|
else:
|
|
@@ -673,7 +701,7 @@ class TaskSchema(NamedSchema):
|
|
|
673
701
|
io_file = f"{self.__step}.{suffix}"
|
|
674
702
|
io_log = True
|
|
675
703
|
elif destination == 'output':
|
|
676
|
-
io_file = os.path.join('outputs', f"{self.
|
|
704
|
+
io_file = os.path.join('outputs', f"{self.__design_top_global}.{suffix}")
|
|
677
705
|
elif destination == 'none':
|
|
678
706
|
io_file = os.devnull
|
|
679
707
|
|
|
@@ -1005,7 +1033,7 @@ class TaskSchema(NamedSchema):
|
|
|
1005
1033
|
else:
|
|
1006
1034
|
return f'{filename}.{step}{index}'
|
|
1007
1035
|
|
|
1008
|
-
def add_parameter(self, name, type, help, defvalue=None):
|
|
1036
|
+
def add_parameter(self, name, type, help, defvalue=None, **kwargs):
|
|
1009
1037
|
'''
|
|
1010
1038
|
Adds a parameter to the task definition.
|
|
1011
1039
|
|
|
@@ -1018,6 +1046,7 @@ class TaskSchema(NamedSchema):
|
|
|
1018
1046
|
help = trim(help)
|
|
1019
1047
|
param = Parameter(
|
|
1020
1048
|
type,
|
|
1049
|
+
**kwargs,
|
|
1021
1050
|
defvalue=defvalue,
|
|
1022
1051
|
scope=Scope.JOB,
|
|
1023
1052
|
pernode=PerNode.OPTIONAL,
|
|
@@ -1029,6 +1058,143 @@ class TaskSchema(NamedSchema):
|
|
|
1029
1058
|
|
|
1030
1059
|
return param
|
|
1031
1060
|
|
|
1061
|
+
def add_required_tool_key(self, *key: str):
|
|
1062
|
+
'''
|
|
1063
|
+
Adds a required tool keypath to the task driver.
|
|
1064
|
+
|
|
1065
|
+
Args:
|
|
1066
|
+
key (list of str): required key path
|
|
1067
|
+
'''
|
|
1068
|
+
return self.add_required_key(self, *key)
|
|
1069
|
+
|
|
1070
|
+
def add_required_key(self, obj: Union[BaseSchema, str], *key: str):
|
|
1071
|
+
'''
|
|
1072
|
+
Adds a required keypath to the task driver.
|
|
1073
|
+
|
|
1074
|
+
Args:
|
|
1075
|
+
obj (:class:`BaseSchema` or str): if this is a string it will be considered
|
|
1076
|
+
part of the key, otherwise the keypath to the obj will be prepended to
|
|
1077
|
+
the key
|
|
1078
|
+
key (list of str): required key path
|
|
1079
|
+
'''
|
|
1080
|
+
|
|
1081
|
+
if isinstance(obj, BaseSchema):
|
|
1082
|
+
key = (*obj._keypath, *key)
|
|
1083
|
+
else:
|
|
1084
|
+
key = (obj, *key)
|
|
1085
|
+
|
|
1086
|
+
if any([not isinstance(k, str) for k in key]):
|
|
1087
|
+
raise ValueError("key can only contain strings")
|
|
1088
|
+
|
|
1089
|
+
return self.add("require", ",".join(key))
|
|
1090
|
+
|
|
1091
|
+
def set_threads(self, max_threads: int = None, clobber: bool = False):
|
|
1092
|
+
"""
|
|
1093
|
+
Sets the requested thread count for the task
|
|
1094
|
+
|
|
1095
|
+
Args:
|
|
1096
|
+
max_threads (int): if provided the requested thread count
|
|
1097
|
+
will be set this value, otherwise the current machines
|
|
1098
|
+
core count will be used.
|
|
1099
|
+
clobber (bool): overwrite existing value
|
|
1100
|
+
"""
|
|
1101
|
+
if max_threads is None or max_threads <= 0:
|
|
1102
|
+
max_threads = utils.get_cores(None)
|
|
1103
|
+
|
|
1104
|
+
return self.set("threads", max_threads, clobber=clobber)
|
|
1105
|
+
|
|
1106
|
+
def get_threads(self) -> int:
|
|
1107
|
+
"""
|
|
1108
|
+
Returns the number of threads requested.
|
|
1109
|
+
"""
|
|
1110
|
+
return self.get("threads")
|
|
1111
|
+
|
|
1112
|
+
def add_commandline_option(self, option: Union[List[str], str], clobber: bool = False):
|
|
1113
|
+
"""
|
|
1114
|
+
Add to the command line options for the task
|
|
1115
|
+
|
|
1116
|
+
Args:
|
|
1117
|
+
option (list of str or str): options to add to the commandline
|
|
1118
|
+
clobber (bool): overwrite existing value
|
|
1119
|
+
"""
|
|
1120
|
+
|
|
1121
|
+
if clobber:
|
|
1122
|
+
return self.set("option", option)
|
|
1123
|
+
else:
|
|
1124
|
+
return self.add("option", option)
|
|
1125
|
+
|
|
1126
|
+
def get_commandline_options(self) -> List[str]:
|
|
1127
|
+
"""
|
|
1128
|
+
Returns the command line options specified
|
|
1129
|
+
"""
|
|
1130
|
+
return self.get("option")
|
|
1131
|
+
|
|
1132
|
+
def add_input_file(self, file: str = None, ext: str = None, clobber: bool = False):
|
|
1133
|
+
"""
|
|
1134
|
+
Add a required input file from the previous step in the flow.
|
|
1135
|
+
file and ext are mutually exclusive.
|
|
1136
|
+
|
|
1137
|
+
Args:
|
|
1138
|
+
file (str): full filename
|
|
1139
|
+
ext (str): file extension, if specified, the filename will be <top>.<ext>
|
|
1140
|
+
clobber (bool): overwrite existing value
|
|
1141
|
+
"""
|
|
1142
|
+
if file and ext:
|
|
1143
|
+
raise ValueError("only file or ext can be specified")
|
|
1144
|
+
|
|
1145
|
+
if ext:
|
|
1146
|
+
file = f"{self.design_topmodule()}.{ext}"
|
|
1147
|
+
|
|
1148
|
+
if clobber:
|
|
1149
|
+
return self.set("input", file)
|
|
1150
|
+
else:
|
|
1151
|
+
return self.add("input", file)
|
|
1152
|
+
|
|
1153
|
+
def add_output_file(self, file: str = None, ext: str = None, clobber: bool = False):
|
|
1154
|
+
"""
|
|
1155
|
+
Add an output file that this task will produce
|
|
1156
|
+
file and ext are mutually exclusive.
|
|
1157
|
+
|
|
1158
|
+
Args:
|
|
1159
|
+
file (str): full filename
|
|
1160
|
+
ext (str): file extension, if specified, the filename will be <top>.<ext>
|
|
1161
|
+
clobber (bool): overwrite existing value
|
|
1162
|
+
"""
|
|
1163
|
+
if file and ext:
|
|
1164
|
+
raise ValueError("only file or ext can be specified")
|
|
1165
|
+
|
|
1166
|
+
if ext:
|
|
1167
|
+
file = f"{self.design_topmodule()}.{ext}"
|
|
1168
|
+
|
|
1169
|
+
if clobber:
|
|
1170
|
+
return self.set("output", file)
|
|
1171
|
+
else:
|
|
1172
|
+
return self.add("output", file)
|
|
1173
|
+
|
|
1174
|
+
def record_metric(self, metric, value, source_file=None, source_unit=None):
|
|
1175
|
+
'''
|
|
1176
|
+
Records a metric and associates the source file with it.
|
|
1177
|
+
|
|
1178
|
+
Args:
|
|
1179
|
+
metric (str): metric to record
|
|
1180
|
+
value (float/int): value of the metric that is being recorded
|
|
1181
|
+
source (str): file the value came from
|
|
1182
|
+
source_unit (str): unit of the value, if not provided it is assumed to have no units
|
|
1183
|
+
|
|
1184
|
+
Examples:
|
|
1185
|
+
>>> self.record_metric('cellarea', 500.0, 'reports/metrics.json', \\
|
|
1186
|
+
source_units='um^2')
|
|
1187
|
+
Records the metric cell area and notes the source as 'reports/metrics.json'
|
|
1188
|
+
'''
|
|
1189
|
+
|
|
1190
|
+
if metric not in self.schema("metric").getkeys():
|
|
1191
|
+
self.logger().warning(f"{metric} is not a valid metric")
|
|
1192
|
+
return
|
|
1193
|
+
|
|
1194
|
+
self.schema("metric").record(self.__step, self.__index, metric, value, unit=source_unit)
|
|
1195
|
+
if source_file:
|
|
1196
|
+
self.add("report", metric, source_file)
|
|
1197
|
+
|
|
1032
1198
|
###############################################################
|
|
1033
1199
|
def get(self, *keypath, field='value'):
|
|
1034
1200
|
return super().get(*keypath, field=field,
|
|
@@ -1041,6 +1207,25 @@ class TaskSchema(NamedSchema):
|
|
|
1041
1207
|
def add(self, *args, field='value'):
|
|
1042
1208
|
return super().add(*args, field=field, step=self.__step, index=self.__index)
|
|
1043
1209
|
|
|
1210
|
+
def _find_files_search_paths(self, keypath, step, index):
|
|
1211
|
+
paths = super()._find_files_search_paths(keypath, step, index)
|
|
1212
|
+
if keypath == "script":
|
|
1213
|
+
paths.extend(self.find_files(
|
|
1214
|
+
"refdir",
|
|
1215
|
+
step=step, index=index,
|
|
1216
|
+
cwd=self.__cwd,
|
|
1217
|
+
collection_dir=self.__collection_path))
|
|
1218
|
+
elif keypath == "input":
|
|
1219
|
+
paths.append(os.path.join(self._parent(root=True).getworkdir(step=step, index=index),
|
|
1220
|
+
"inputs"))
|
|
1221
|
+
elif keypath == "report":
|
|
1222
|
+
paths.append(os.path.join(self._parent(root=True).getworkdir(step=step, index=index),
|
|
1223
|
+
"report"))
|
|
1224
|
+
elif keypath == "output":
|
|
1225
|
+
paths.append(os.path.join(self._parent(root=True).getworkdir(step=step, index=index),
|
|
1226
|
+
"outputs"))
|
|
1227
|
+
return paths
|
|
1228
|
+
|
|
1044
1229
|
###############################################################
|
|
1045
1230
|
def parse_version(self, stdout):
|
|
1046
1231
|
raise NotImplementedError("must be implemented by the implementation class")
|
|
@@ -1063,8 +1248,12 @@ class TaskSchema(NamedSchema):
|
|
|
1063
1248
|
cmdargs.extend(self.get("option"))
|
|
1064
1249
|
|
|
1065
1250
|
# Add scripts files / TODO:
|
|
1066
|
-
scripts = self.
|
|
1067
|
-
|
|
1251
|
+
scripts = self.find_files(
|
|
1252
|
+
'script',
|
|
1253
|
+
step=self.__step, index=self.__index,
|
|
1254
|
+
cwd=self.__cwd,
|
|
1255
|
+
collection_dir=self.__collection_path,
|
|
1256
|
+
missing_ok=True)
|
|
1068
1257
|
|
|
1069
1258
|
cmdargs.extend(scripts)
|
|
1070
1259
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"openroad": {
|
|
3
3
|
"git-url": "https://github.com/The-OpenROAD-Project/OpenROAD.git",
|
|
4
|
-
"git-commit": "
|
|
4
|
+
"git-commit": "e4f795a39cceb3608a6e755000253af491a69a3f",
|
|
5
5
|
"docker-cmds": [
|
|
6
6
|
"# Remove OR-Tools files",
|
|
7
7
|
"RUN rm -f $SC_PREFIX/Makefile $SC_PREFIX/README.md",
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
},
|
|
18
18
|
"opensta": {
|
|
19
19
|
"git-url": "https://github.com/parallaxsw/OpenSTA.git",
|
|
20
|
-
"git-commit": "
|
|
20
|
+
"git-commit": "4a32cef237d1feed335e3c6328b5b1f3794909fc",
|
|
21
21
|
"auto-update": true
|
|
22
22
|
},
|
|
23
23
|
"netgen": {
|
|
@@ -101,7 +101,7 @@
|
|
|
101
101
|
},
|
|
102
102
|
"yosys": {
|
|
103
103
|
"git-url": "https://github.com/YosysHQ/yosys.git",
|
|
104
|
-
"git-commit": "v0.
|
|
104
|
+
"git-commit": "v0.55",
|
|
105
105
|
"version-prefix": "",
|
|
106
106
|
"auto-update": true
|
|
107
107
|
},
|
|
@@ -151,7 +151,7 @@
|
|
|
151
151
|
},
|
|
152
152
|
"yosys-slang": {
|
|
153
153
|
"git-url": "https://github.com/povik/yosys-slang.git",
|
|
154
|
-
"git-commit": "
|
|
154
|
+
"git-commit": "f106ae3a68155ee470d51b168c72282a1453171b",
|
|
155
155
|
"docker-depends": "yosys",
|
|
156
156
|
"auto-update": true
|
|
157
157
|
},
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: siliconcompiler
|
|
3
|
-
Version: 0.34.
|
|
3
|
+
Version: 0.34.2
|
|
4
4
|
Summary: A compiler framework that automates translation from source code to silicon.
|
|
5
5
|
Author-email: Andreas Olofsson <andreas.d.olofsson@gmail.com>
|
|
6
6
|
License: Apache License 2.0
|
|
@@ -42,7 +42,7 @@ Requires-Dist: fasteners==0.19
|
|
|
42
42
|
Requires-Dist: fastjsonschema==2.21.1
|
|
43
43
|
Requires-Dist: docker==7.1.0
|
|
44
44
|
Requires-Dist: importlib_metadata; python_version < "3.10"
|
|
45
|
-
Requires-Dist: orjson==3.
|
|
45
|
+
Requires-Dist: orjson==3.11.0
|
|
46
46
|
Requires-Dist: pyslang==8.1.0
|
|
47
47
|
Requires-Dist: streamlit==1.46.1; python_full_version != "3.9.7"
|
|
48
48
|
Requires-Dist: streamlit_agraph==0.0.45; python_full_version != "3.9.7"
|
|
@@ -54,7 +54,7 @@ Provides-Extra: test
|
|
|
54
54
|
Requires-Dist: pytest==8.4.1; extra == "test"
|
|
55
55
|
Requires-Dist: pytest-xdist==3.8.0; extra == "test"
|
|
56
56
|
Requires-Dist: pytest-timeout==2.4.0; extra == "test"
|
|
57
|
-
Requires-Dist: pytest-asyncio==1.
|
|
57
|
+
Requires-Dist: pytest-asyncio==1.1.0; extra == "test"
|
|
58
58
|
Requires-Dist: pytest-cov==6.2.1; extra == "test"
|
|
59
59
|
Requires-Dist: responses==0.25.7; extra == "test"
|
|
60
60
|
Requires-Dist: PyVirtualDisplay==3.0; extra == "test"
|
|
@@ -1,20 +1,23 @@
|
|
|
1
|
-
siliconcompiler/__init__.py,sha256=
|
|
1
|
+
siliconcompiler/__init__.py,sha256=IOyIU4DBYTGHDfC3YT_8tVkJjBDN-lG7slZPrcx7Y6U,1423
|
|
2
2
|
siliconcompiler/__main__.py,sha256=JwWkcvaNngqgMWprEQ1cFy2Wdq9GMvk46UGTHyh_qvM,170
|
|
3
3
|
siliconcompiler/_common.py,sha256=wt6W8iAHpx7ezVPPYxe_QFUc3YM1TLdDdq89eYaFMBA,1578
|
|
4
|
-
siliconcompiler/_metadata.py,sha256=
|
|
4
|
+
siliconcompiler/_metadata.py,sha256=cUHQjSe2ab5rQNEJCncBpHUBsG3G9njWK6AuR_JnDb8,1286
|
|
5
5
|
siliconcompiler/asic.py,sha256=vNBYrXlOZ1RqGrMZz9MdJIYR3aq4V0VlVPT6VZ9knyM,4287
|
|
6
6
|
siliconcompiler/checklist.py,sha256=i_TkKtpT5AvSPTOrZCrwwwWgMQsB7hS-hemXJ2TuiJg,13894
|
|
7
|
-
siliconcompiler/core.py,sha256
|
|
8
|
-
siliconcompiler/dependencyschema.py,sha256=
|
|
9
|
-
siliconcompiler/design.py,sha256=
|
|
10
|
-
siliconcompiler/flowgraph.py,sha256=
|
|
7
|
+
siliconcompiler/core.py,sha256=16rB2sC5sie0eePZW4o066cjf7_-wN9Q_VmdTesx-CM,129053
|
|
8
|
+
siliconcompiler/dependencyschema.py,sha256=OP7wkC9-lSRuJVYwF0ASdoiqaYlcuUKdv21lP7SVfy8,7328
|
|
9
|
+
siliconcompiler/design.py,sha256=gJsb-y7m_paeTG282AM2LdDuC9DNczVxnB3JOKMIeuo,30261
|
|
10
|
+
siliconcompiler/flowgraph.py,sha256=jPK6BnFfrAnOT2itisov7OE6uL-NymWRQO1xa3Xzz_I,32543
|
|
11
11
|
siliconcompiler/fpga.py,sha256=pww3UMIo9bNXUFCSwNYQbAeDpmdC1xF70B53Oa6rrO4,3036
|
|
12
|
-
siliconcompiler/
|
|
13
|
-
siliconcompiler/
|
|
12
|
+
siliconcompiler/library.py,sha256=V8f1CTX0FGrOw8zlWwA-DC_lvpUVAkueNa9iWIlmCCk,4509
|
|
13
|
+
siliconcompiler/metric.py,sha256=AolrfVlVDTZ86GoNLG5v6YBAzKm3wO9nBZSo7Lk-_h4,20682
|
|
14
|
+
siliconcompiler/packageschema.py,sha256=k0yCjeh3Nc9FCHlyqYHhBI5l_r5-7p9ETwAOONbCzIY,17802
|
|
15
|
+
siliconcompiler/pathschema.py,sha256=NyLJO0mdv-QSZ2Ja_tBhMJ6ri-h7bO0TjqcqK7gz1RY,8593
|
|
14
16
|
siliconcompiler/pdk.py,sha256=id1T1PVgcFY4MB-fV5sX89uZQqJCt1zBzameKD6Itc0,18571
|
|
17
|
+
siliconcompiler/project.py,sha256=6RfUS1J7lO0ZI1oBDYB0NRI8CaZMGEFGri3QrsvaV7E,15593
|
|
15
18
|
siliconcompiler/record.py,sha256=sQsU1r3x-pm94g5NBdgABGuO2zrgMzjTAlHiEdv7bzQ,17758
|
|
16
|
-
siliconcompiler/schema_obj.py,sha256=
|
|
17
|
-
siliconcompiler/tool.py,sha256=
|
|
19
|
+
siliconcompiler/schema_obj.py,sha256=BPetWwvR17KQRbXsF8Ksaq9jpxkTfcuUm5v3EkjiJVk,4226
|
|
20
|
+
siliconcompiler/tool.py,sha256=atjYtIKmvR-XdiW5HkyTxefz-vtU-2MxS0_tdxBMWbg,72822
|
|
18
21
|
siliconcompiler/use.py,sha256=zu17ogJv0x2t_6J9yb_5tH1DjridVQj0MrIRxJRJVGQ,6202
|
|
19
22
|
siliconcompiler/apps/__init__.py,sha256=6LuAljPtVB6g5yXl_58ODoB4Svb6UfKaDbX1e0aNZfE,668
|
|
20
23
|
siliconcompiler/apps/_common.py,sha256=6-vNzHW3tFVCJIIKtcZ2jEUoE0A2KgBANbmzEevK5Yo,4426
|
|
@@ -24,12 +27,17 @@ siliconcompiler/apps/sc_install.py,sha256=4U9o9-GyZckKz-iHPQ6FTZuFY9TlK8kZh-lRiM
|
|
|
24
27
|
siliconcompiler/apps/sc_issue.py,sha256=vkMAwYHMlHzz2d3jFFOXjHlMHpo9ZaeuQ5cfuNqDNig,6431
|
|
25
28
|
siliconcompiler/apps/sc_remote.py,sha256=NQAuRqVDSRfBVJyZ-FYSsHdOom-5J_hdZLcVjIvn1Cc,6700
|
|
26
29
|
siliconcompiler/apps/sc_server.py,sha256=d3SCfKtNneIBiAk7Udc5SqXvSIoFSK40iHWcKuY7unk,894
|
|
27
|
-
siliconcompiler/apps/sc_show.py,sha256=
|
|
30
|
+
siliconcompiler/apps/sc_show.py,sha256=Wo-9NGDRzf4Lx6t41it9LQoyayMtvaiuGJss92NssyY,4837
|
|
28
31
|
siliconcompiler/apps/smake.py,sha256=jj69IuMLf4jblpVGeLT3GAvC-zDLHwPq16YPKtHosdA,7124
|
|
29
32
|
siliconcompiler/apps/utils/replay.py,sha256=8yrrSi78v4U3ikV-M4jjSobumlAWsELe_2F_7Fgo3JE,5958
|
|
30
33
|
siliconcompiler/apps/utils/summarize.py,sha256=CC6YwyEShiuZekU-D1Uk_m074aj8LviwotcgJMvZhuY,1250
|
|
31
34
|
siliconcompiler/checklists/__init__.py,sha256=xnrgpMdgDLoYinDXVXRIAhX__BiBpBw16_gmg2dAwYo,247
|
|
32
35
|
siliconcompiler/checklists/oh_tapeout.py,sha256=xBXAHOVNslFUlOfVTLLoPEJazczP8MTsa5EGo5GYQk0,1441
|
|
36
|
+
siliconcompiler/constraints/__init__.py,sha256=eZANIxn07CZBpufZqvZY-FfM6A6Vcc79BSsum22nCIA,610
|
|
37
|
+
siliconcompiler/constraints/asic_component.py,sha256=KLuyfNkc-UayfPsiGrVb_lsZXsfe77626fevABV-X0Y,16191
|
|
38
|
+
siliconcompiler/constraints/asic_floorplan.py,sha256=3LiSX4S8PHjcKSSPHbhAbNCa6Xrf8x5fgIkgTtjve-Q,19359
|
|
39
|
+
siliconcompiler/constraints/asic_pins.py,sha256=WWOkyJvIhJX3HzLmWeRcwL23EYd5YsIRI3OkhIIahr4,19443
|
|
40
|
+
siliconcompiler/constraints/asic_timing.py,sha256=DFhMlC01gkPvgIFQg-DimY1sASpQmJFxTLg2p9RbJO0,20074
|
|
33
41
|
siliconcompiler/data/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
34
42
|
siliconcompiler/data/heartbeat.v,sha256=6HKc1j1JuuCj8oTIsbFBlDEoytzzEheUyTyokte2b18,420
|
|
35
43
|
siliconcompiler/data/logo.png,sha256=yNR4onh4CBnkqBK_N170SMnKWOykSR-Oer6u2slCsKA,45172
|
|
@@ -73,11 +81,14 @@ siliconcompiler/flows/synflow.py,sha256=Tydj7b_Aq610IOoo4CQ_FA4Nletvfn-l2XyZ0NHl
|
|
|
73
81
|
siliconcompiler/fpgas/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
74
82
|
siliconcompiler/fpgas/lattice_ice40.py,sha256=NsFgGvTnBVXpJeg3IiKKufsUwV7TYl-XU6mE2jNjK60,791
|
|
75
83
|
siliconcompiler/libs/__init__.py,sha256=KXw1vU0KP83fg3rB8iKkpDhJZBLz_PWGZG65L3lAQ1Q,86
|
|
84
|
+
siliconcompiler/metrics/__init__.py,sha256=uWeluiGr1aTENaALNRMMvGBWmErcTLVDfYmaE4Dhx20,182
|
|
85
|
+
siliconcompiler/metrics/asic.py,sha256=i0A9kPvdskqiRWIZbAw0j_vxnPk3YObnKNkIOxRHkm0,11148
|
|
86
|
+
siliconcompiler/metrics/fpga.py,sha256=Z4dJawmviLv2GSVaj5oGgSl2889yQeGBDDD7G35FqKQ,10035
|
|
76
87
|
siliconcompiler/optimizer/__init__.py,sha256=wdSuv3U7hoSdZn-TkaQtYehVdhS5F35Mb1McgaUw3hc,6599
|
|
77
88
|
siliconcompiler/optimizer/vizier.py,sha256=JtoPktsa-qHN0i4PsfRnxvQAT0yVvQVRfdyYNOCYgU4,9011
|
|
78
|
-
siliconcompiler/package/__init__.py,sha256=
|
|
89
|
+
siliconcompiler/package/__init__.py,sha256=rOX8TaTrHMJrYBXrOui6KQnchXtFGLQgAfNYJrFaGt8,17326
|
|
79
90
|
siliconcompiler/package/git.py,sha256=H9Wvi7_RLD7RqfubRTQaf_mbhBBxuYhNFNv2fi1NxSQ,2761
|
|
80
|
-
siliconcompiler/package/github.py,sha256=
|
|
91
|
+
siliconcompiler/package/github.py,sha256=QeXA9xCMpo01KqhD_TshYmjrSstbzYebEsz1JN37hfw,2913
|
|
81
92
|
siliconcompiler/package/https.py,sha256=Hmuz5vXxNoY7XUO6N8E3eapFOTX45uBmUSbzKyLoOvA,2760
|
|
82
93
|
siliconcompiler/pdks/__init__.py,sha256=bWhtNR-Kq3fEyknon-x5vQX877b88g9EJXAHBMiDyGM,81
|
|
83
94
|
siliconcompiler/remote/__init__.py,sha256=MoYnC1lkgbT5hN5Qi-0gTItaTWI2U1E8OuleffdTDSQ,977
|
|
@@ -122,27 +133,26 @@ siliconcompiler/report/dashboard/web/layouts/vertical_flowgraph_sac_tabs.py,sha2
|
|
|
122
133
|
siliconcompiler/report/dashboard/web/utils/__init__.py,sha256=zLL_GmHOw0SMnaso_-SO7gHDxpYXnQTiMefFmaLdo9k,2699
|
|
123
134
|
siliconcompiler/report/dashboard/web/utils/file_utils.py,sha256=5MKAyf7TGXQIc3yxwbP1H6xi0NGwUfzu2j3LOv1Yei0,3333
|
|
124
135
|
siliconcompiler/scheduler/__init__.py,sha256=JTgpHKwESxjT1eSXRIUPSNzfOWTFBQSnGH0_QXczxMg,101
|
|
125
|
-
siliconcompiler/scheduler/docker.py,sha256=
|
|
126
|
-
siliconcompiler/scheduler/run_node.py,sha256=
|
|
127
|
-
siliconcompiler/scheduler/scheduler.py,sha256=
|
|
128
|
-
siliconcompiler/scheduler/schedulernode.py,sha256=
|
|
136
|
+
siliconcompiler/scheduler/docker.py,sha256=PzvUOPGv0GfhrT7CQTLa91rNK9uugy5UY6WI-cYD0h0,8813
|
|
137
|
+
siliconcompiler/scheduler/run_node.py,sha256=08t-2HcLUMLa5xwTTdIPABQAtq46omg8AE_qJs0KwDw,5065
|
|
138
|
+
siliconcompiler/scheduler/scheduler.py,sha256=qcX-naX4Gbue037do8BUMYREAdG1FwIHCXpjatqTLwQ,12002
|
|
139
|
+
siliconcompiler/scheduler/schedulernode.py,sha256=an_PWyQJ_aocVGYuPntuebuPCuXQCjj8VxXEjmUIdZw,37246
|
|
129
140
|
siliconcompiler/scheduler/send_messages.py,sha256=xA0yCMvp5NspgZ7LSPde74xw8KPu0E_kQxGoaIAB9JQ,6865
|
|
130
141
|
siliconcompiler/scheduler/slurm.py,sha256=NXX08wFkW4Y-YIM6Fi8XZ9JlNnTY1t14t2ZW0Fy4m5Q,6137
|
|
131
|
-
siliconcompiler/scheduler/taskscheduler.py,sha256=
|
|
142
|
+
siliconcompiler/scheduler/taskscheduler.py,sha256=KtSqkNcJ3RcC4pEC3EAoUHP2ScF_YcYFyHPR7KrHzrQ,11581
|
|
132
143
|
siliconcompiler/scheduler/validation/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
133
144
|
siliconcompiler/scheduler/validation/email_credentials.json,sha256=hkJs0U2h2Bgm1zxeXvanIJ-prPhpn_aU6e3qwIs7qA0,1997
|
|
134
|
-
siliconcompiler/schema/__init__.py,sha256=
|
|
135
|
-
siliconcompiler/schema/baseschema.py,sha256=
|
|
145
|
+
siliconcompiler/schema/__init__.py,sha256=pRZxuNzM8SdAJpCYFJvLi9TBwrTrBkU99umoghUJ57g,511
|
|
146
|
+
siliconcompiler/schema/baseschema.py,sha256=v1blrD5J4-hntO7p_Mm94E8xhmhhp_Ph0zi-Eup1TH0,30595
|
|
136
147
|
siliconcompiler/schema/cmdlineschema.py,sha256=NCZJN-qQU1KQAZGRXDQDoHttdOfrDcYN91re4xs0ahU,10512
|
|
137
|
-
siliconcompiler/schema/editableschema.py,sha256=
|
|
138
|
-
siliconcompiler/schema/journal.py,sha256=
|
|
139
|
-
siliconcompiler/schema/namedschema.py,sha256=
|
|
140
|
-
siliconcompiler/schema/
|
|
141
|
-
siliconcompiler/schema/
|
|
142
|
-
siliconcompiler/schema/
|
|
143
|
-
siliconcompiler/schema/parametervalue.py,sha256=BJ3WRwpS-cuN8UIRUkYpBO3LSvE_oYCn5Ox-YquyOXY,20282
|
|
148
|
+
siliconcompiler/schema/editableschema.py,sha256=qkffyHPiusCfPlDJ7iRjdMjYuX5vXbAn8KSRpDYliH0,5044
|
|
149
|
+
siliconcompiler/schema/journal.py,sha256=c5F2q4b3TlpaXAGjqcbN29UphdVuHsSuhobYsHrCJrc,6079
|
|
150
|
+
siliconcompiler/schema/namedschema.py,sha256=FnUdIGko2TWGaic_rzEIIGEqrPgek8dZ8GMMVWVcHRc,2540
|
|
151
|
+
siliconcompiler/schema/parameter.py,sha256=2fNLdknPyOp8W7ribkqPiBHAb-vM-UycEov3CUNn5s0,28579
|
|
152
|
+
siliconcompiler/schema/parametertype.py,sha256=oEkZN81sftAgnEEv84M9Vz8UPxwIRioxE6sJszV1A8o,11549
|
|
153
|
+
siliconcompiler/schema/parametervalue.py,sha256=cVAHM97Bes8ByLTibWR5X11Rh3YgGnI9yQu4Ki1iMrw,25497
|
|
144
154
|
siliconcompiler/schema/safeschema.py,sha256=H4nDo6D_A4xkTiUFuOSUz974HIBM2DUjyXz1_2xS4lw,1241
|
|
145
|
-
siliconcompiler/schema/schema_cfg.py,sha256=
|
|
155
|
+
siliconcompiler/schema/schema_cfg.py,sha256=cy242jWLYPWQZkJgtfVoMLEl05_utWnn8nZ160mnGqs,104733
|
|
146
156
|
siliconcompiler/schema/utils.py,sha256=YNtwoeueoL-56lBGHZW75uZNfsnLARvtwzUAv4PgjuM,1494
|
|
147
157
|
siliconcompiler/schema/docs/__init__.py,sha256=1DRpzj1hl3pE0g4duKolKr1ahqzsnHE0Z14YazU_hKo,1924
|
|
148
158
|
siliconcompiler/schema/docs/dynamicgen.py,sha256=ZZi2LMr9Z4iBbVFYQTY5H6oxleAqvVlMrfx1X12Kfzg,34299
|
|
@@ -367,7 +377,7 @@ siliconcompiler/tools/yosys/techmaps/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeu
|
|
|
367
377
|
siliconcompiler/tools/yosys/techmaps/lcu_kogge_stone.v,sha256=M4T-ygiKmlsprl5eGGLaV5w6HVqlEepn0wlUDmOkapg,773
|
|
368
378
|
siliconcompiler/tools/yosys/templates/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
369
379
|
siliconcompiler/tools/yosys/templates/abc.const,sha256=TAq9ThdLMYCJGrtToEU0gWcLuEtjE4Gk8huBbTm1v-I,116
|
|
370
|
-
siliconcompiler/toolscripts/_tools.json,sha256=
|
|
380
|
+
siliconcompiler/toolscripts/_tools.json,sha256=t5Xso_vngYhBrPBiHsYZlM-yTJdnMT_vh01CcHuEEjg,5113
|
|
371
381
|
siliconcompiler/toolscripts/_tools.py,sha256=P30KY_xbbjl8eHGsPAxDcAzWvJJpiL07ZfGZZDQbdR8,7174
|
|
372
382
|
siliconcompiler/toolscripts/rhel8/install-chisel.sh,sha256=RJ7BiZhsXBLTgQhHUcRZmHqhKB6syVaC2nvVoGrIXOI,709
|
|
373
383
|
siliconcompiler/toolscripts/rhel8/install-icarus.sh,sha256=EW7308IUGYOx7A22s7s0tNq90nHhrpHHUMrx3cd9lMM,962
|
|
@@ -487,9 +497,9 @@ siliconcompiler/utils/issue.py,sha256=rW5cE2kRdvwtprdiHYifIHTD5q-m_e2OO3jXNZfiOr
|
|
|
487
497
|
siliconcompiler/utils/logging.py,sha256=FSwvZ96gea5Txtwh8-b4Z_eBfl7rbduE0dKBPc_zrSo,4908
|
|
488
498
|
siliconcompiler/utils/showtools.py,sha256=uHPryePILYZTHi0KPbBcaYxm6OSuj8SWiYvKs5j2X3M,2058
|
|
489
499
|
siliconcompiler/utils/units.py,sha256=M_ZxViSysymv8mFdCtbQwfccEwEsBeiCmc8TcnoXZbk,5845
|
|
490
|
-
siliconcompiler-0.34.
|
|
491
|
-
siliconcompiler-0.34.
|
|
492
|
-
siliconcompiler-0.34.
|
|
493
|
-
siliconcompiler-0.34.
|
|
494
|
-
siliconcompiler-0.34.
|
|
495
|
-
siliconcompiler-0.34.
|
|
500
|
+
siliconcompiler-0.34.2.dist-info/licenses/LICENSE,sha256=lbLR6sRo_CYJOf7SVgHi-U6CZdD8esESEZE5TZazOQE,10766
|
|
501
|
+
siliconcompiler-0.34.2.dist-info/METADATA,sha256=ecUzpWyA8tSUhYf1j4fbhO_rC1_tDh4tucE3cerlj64,10927
|
|
502
|
+
siliconcompiler-0.34.2.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
503
|
+
siliconcompiler-0.34.2.dist-info/entry_points.txt,sha256=zOgup2DTMyBOSX9tMOvtycVWmlk8MVEvub-C-tdTn78,1139
|
|
504
|
+
siliconcompiler-0.34.2.dist-info/top_level.txt,sha256=H8TOYhnEUZAV1RJTa8JRtjLIebwHzkQUhA2wkNU2O6M,16
|
|
505
|
+
siliconcompiler-0.34.2.dist-info/RECORD,,
|
|
@@ -1,101 +0,0 @@
|
|
|
1
|
-
# Copyright 2025 Silicon Compiler Authors. All Rights Reserved.
|
|
2
|
-
|
|
3
|
-
# NOTE: this file cannot rely on any third-party dependencies, including other
|
|
4
|
-
# SC dependencies outside of its directory, since it may be used by tool drivers
|
|
5
|
-
# that have isolated Python environments.
|
|
6
|
-
|
|
7
|
-
from .baseschema import BaseSchema
|
|
8
|
-
from .parametertype import NodeType
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
class PackageSchema(BaseSchema):
|
|
12
|
-
'''
|
|
13
|
-
This object provides easier access to the package field in the path datatypes.
|
|
14
|
-
|
|
15
|
-
Args:
|
|
16
|
-
package (str): name of the package
|
|
17
|
-
'''
|
|
18
|
-
|
|
19
|
-
def __init__(self, package=None):
|
|
20
|
-
super().__init__()
|
|
21
|
-
|
|
22
|
-
if package is not None and not isinstance(package, str):
|
|
23
|
-
raise ValueError("package must be a string")
|
|
24
|
-
|
|
25
|
-
self.__package = package
|
|
26
|
-
|
|
27
|
-
def set(self, *args, field='value', clobber=True, step=None, index=None, package=None):
|
|
28
|
-
'''
|
|
29
|
-
Sets a schema parameter field.
|
|
30
|
-
|
|
31
|
-
Sets a schema parameter field based on the keypath and value provided in
|
|
32
|
-
the ``*args``. New schema entries are automatically created for keypaths
|
|
33
|
-
that overlap with 'default' entries.
|
|
34
|
-
|
|
35
|
-
Args:
|
|
36
|
-
args (list): Parameter keypath followed by a value to set.
|
|
37
|
-
field (str): Parameter field to set.
|
|
38
|
-
clobber (bool): Existing value is overwritten if True.
|
|
39
|
-
step (str): Step name to set for parameters that may be specified
|
|
40
|
-
on a per-node basis.
|
|
41
|
-
index (str): Index name to set for parameters that may be specified
|
|
42
|
-
on a per-node basis.
|
|
43
|
-
package (str): Name of package to associate with this value.
|
|
44
|
-
|
|
45
|
-
Examples:
|
|
46
|
-
>>> schema.set('design', 'top')
|
|
47
|
-
Sets the [design] value to 'top'
|
|
48
|
-
'''
|
|
49
|
-
|
|
50
|
-
params = super().set(*args, field=field, clobber=clobber, step=step, index=index)
|
|
51
|
-
|
|
52
|
-
if field == 'value' and (package or self.__package):
|
|
53
|
-
self.__set_package(params, package or self.__package)
|
|
54
|
-
|
|
55
|
-
return params
|
|
56
|
-
|
|
57
|
-
def add(self, *args, field='value', step=None, index=None, package=None):
|
|
58
|
-
'''
|
|
59
|
-
Adds item(s) to a schema parameter list.
|
|
60
|
-
|
|
61
|
-
Adds item(s) to schema parameter list based on the keypath and value
|
|
62
|
-
provided in the ``*args``. New schema entries are automatically created
|
|
63
|
-
for keypaths that overlap with 'default' entries.
|
|
64
|
-
|
|
65
|
-
Args:
|
|
66
|
-
args (list): Parameter keypath followed by a value to add.
|
|
67
|
-
field (str): Parameter field to modify.
|
|
68
|
-
step (str): Step name to modify for parameters that may be specified
|
|
69
|
-
on a per-node basis.
|
|
70
|
-
index (str): Index name to modify for parameters that may be specified
|
|
71
|
-
on a per-node basis.
|
|
72
|
-
package (str): Name of package to associate with this value.
|
|
73
|
-
|
|
74
|
-
Examples:
|
|
75
|
-
>>> schema.add('input', 'rtl', 'verilog', 'hello.v')
|
|
76
|
-
Adds the file 'hello.v' to the [input,rtl,verilog] key.
|
|
77
|
-
'''
|
|
78
|
-
|
|
79
|
-
params = super().add(*args, field=field, step=step, index=index)
|
|
80
|
-
|
|
81
|
-
if field == 'value' and (package or self.__package):
|
|
82
|
-
self.__set_package(params, package or self.__package)
|
|
83
|
-
|
|
84
|
-
return params
|
|
85
|
-
|
|
86
|
-
def __set_package(self, params, packages):
|
|
87
|
-
if not isinstance(params, (list, tuple, set)):
|
|
88
|
-
params = [params]
|
|
89
|
-
|
|
90
|
-
if not isinstance(packages, (list, tuple, set)):
|
|
91
|
-
packages = [packages]
|
|
92
|
-
|
|
93
|
-
if len(params) != len(packages):
|
|
94
|
-
if len(packages) == 1:
|
|
95
|
-
packages = len(params) * packages
|
|
96
|
-
else:
|
|
97
|
-
raise ValueError("unable to determine package mapping")
|
|
98
|
-
|
|
99
|
-
for param, package in zip(params, packages):
|
|
100
|
-
if NodeType.contains(param.type, 'file') or NodeType.contains(param.type, 'dir'):
|
|
101
|
-
param.set(package, field='package')
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|