struct-frame 0.0.19__py3-none-any.whl → 0.0.20__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.
Potentially problematic release.
This version of struct-frame might be problematic. Click here for more details.
- struct_frame/generate.py +17 -4
- {struct_frame-0.0.19.dist-info → struct_frame-0.0.20.dist-info}/METADATA +1 -1
- {struct_frame-0.0.19.dist-info → struct_frame-0.0.20.dist-info}/RECORD +5 -5
- {struct_frame-0.0.19.dist-info → struct_frame-0.0.20.dist-info}/WHEEL +0 -0
- {struct_frame-0.0.19.dist-info → struct_frame-0.0.20.dist-info}/licenses/LICENSE +0 -0
struct_frame/generate.py
CHANGED
|
@@ -251,6 +251,8 @@ parser = argparse.ArgumentParser(
|
|
|
251
251
|
|
|
252
252
|
parser.add_argument('filename')
|
|
253
253
|
parser.add_argument('--debug', action='store_true')
|
|
254
|
+
parser.add_argument('--build_c', action='store_true')
|
|
255
|
+
parser.add_argument('--build_ts', action='store_true')
|
|
254
256
|
parser.add_argument('--c_path', nargs=1, type=str, default=['c/'])
|
|
255
257
|
parser.add_argument('--ts_path', nargs=1, type=str, default=['ts/'])
|
|
256
258
|
|
|
@@ -332,14 +334,21 @@ def main():
|
|
|
332
334
|
args = parser.parse_args()
|
|
333
335
|
parseFile(args.filename)
|
|
334
336
|
|
|
337
|
+
if (not args.build_c and not args.build_ts):
|
|
338
|
+
print("Select at least one build argument")
|
|
339
|
+
return
|
|
340
|
+
|
|
335
341
|
try:
|
|
336
342
|
validatePackages()
|
|
337
343
|
except RecursionError as err:
|
|
338
344
|
print(
|
|
339
345
|
f'Recursion Error. Messages most likely have a cyclical dependancy. Check Message: {recErrCurrentMessage} and Field: {recErrCurrentField}')
|
|
340
346
|
|
|
341
|
-
|
|
342
|
-
|
|
347
|
+
if (args.build_c):
|
|
348
|
+
files = generateCFileStrings(args.c_path[0])
|
|
349
|
+
|
|
350
|
+
if (args.build_ts):
|
|
351
|
+
files.update(generateTsFileStrings(args.ts_path[0]))
|
|
343
352
|
|
|
344
353
|
for filename, filedata in files.items():
|
|
345
354
|
dirname = os.path.dirname(filename)
|
|
@@ -350,8 +359,12 @@ def main():
|
|
|
350
359
|
f.write(filedata)
|
|
351
360
|
|
|
352
361
|
dir_path = os.path.dirname(os.path.realpath(__file__))
|
|
353
|
-
|
|
354
|
-
|
|
362
|
+
|
|
363
|
+
if (args.build_c):
|
|
364
|
+
shutil.copytree(os.path.join(dir_path,"boilerplate/c"), args.c_path[0], dirs_exist_ok=True)
|
|
365
|
+
|
|
366
|
+
if (args.build_ts):
|
|
367
|
+
shutil.copytree(os.path.join(dir_path,"boilerplate/ts"), args.ts_path[0], dirs_exist_ok=True)
|
|
355
368
|
|
|
356
369
|
if args.debug:
|
|
357
370
|
printPackages()
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: struct-frame
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.20
|
|
4
4
|
Summary: A framework for serializing data with headers
|
|
5
5
|
Project-URL: Homepage, https://github.com/mylonics/struct-frame
|
|
6
6
|
Project-URL: Issues, https://github.com/mylonics/struct-frame/issues
|
|
@@ -2,7 +2,7 @@ struct_frame/__init__.py,sha256=t_GBVV-CeYA4Yupfu-pH5922nisafAOZLsyyfrJtD0c,269
|
|
|
2
2
|
struct_frame/__main__.py,sha256=tIybnBeFHvwiwVhodVOSnxhne5AX_80mtXBx4rneSB4,143
|
|
3
3
|
struct_frame/base.py,sha256=Sx1hwOjpmbhArPldw4jYibvd7UMRtfkSO_P0lu9NqZA,2021
|
|
4
4
|
struct_frame/c_gen.py,sha256=_XC96txPtH0ukbrMSyYegVb5GwV5ADEEDd6yY3Hg3vU,5848
|
|
5
|
-
struct_frame/generate.py,sha256=
|
|
5
|
+
struct_frame/generate.py,sha256=9_DTI54tjG48fP9GUzb6npRmzgynAOUJgIVFXQSlxm8,11819
|
|
6
6
|
struct_frame/ts_gen.py,sha256=b_mx5IwemcWB70082iHSGOAPzqcnnglXB-fEk4Q2uLM,6123
|
|
7
7
|
struct_frame/boilerplate/c/struct_frame.h,sha256=Y0V39aqXfR-eTSNe6f1hdc55GXHXBADBK2kbNrxCo-k,4909
|
|
8
8
|
struct_frame/boilerplate/c/struct_frame_gen.h,sha256=MdXFYOO6E7IN4DM5EaEMXXowZb4auv8UeyQBprkqx68,43
|
|
@@ -12,7 +12,7 @@ struct_frame/boilerplate/ts/struct_frame.ts,sha256=botKdIKVP7Bi6BJdXfIZaGAmoATnu
|
|
|
12
12
|
struct_frame/boilerplate/ts/struct_frame_gen.ts,sha256=pz6QTIWDTIY0rMCFiGNgp3DcfO7cKsmXrx3rj3zgN_U,164
|
|
13
13
|
struct_frame/boilerplate/ts/struct_frame_parser.ts,sha256=6eTbafomqTsX3Fvfn82rxNQMxu4PwTaPug38xw4wrhE,3523
|
|
14
14
|
struct_frame/boilerplate/ts/struct_frame_types.ts,sha256=aBtxVI2lUJKGPTtJAOpbStpS2sXSKvd4XWCIsOnaMk8,2130
|
|
15
|
-
struct_frame-0.0.
|
|
16
|
-
struct_frame-0.0.
|
|
17
|
-
struct_frame-0.0.
|
|
18
|
-
struct_frame-0.0.
|
|
15
|
+
struct_frame-0.0.20.dist-info/METADATA,sha256=ybLoKrdsxSTfOnAOghQzYzwnXhT9jpCzNk1l3LjYX-Q,734
|
|
16
|
+
struct_frame-0.0.20.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
17
|
+
struct_frame-0.0.20.dist-info/licenses/LICENSE,sha256=UjbLtGfcHCIqJg9UzEVGoNW8fyX4Ah9ZbsuAmJ_vhmk,1094
|
|
18
|
+
struct_frame-0.0.20.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|