spadix-cli 0.7.2__py3-none-any.whl → 0.7.4__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.
spadix_cli/__init__.py CHANGED
@@ -26,7 +26,7 @@ from sys import stderr
26
26
 
27
27
  from lark import Lark, Transformer, v_args
28
28
 
29
- __version__ = '0.7.2'
29
+ __version__ = '0.7.4'
30
30
 
31
31
  ###############################################################################
32
32
  USAGE = """
@@ -41,6 +41,7 @@ spadix [Global options] [command] [command options] ...
41
41
  --no-console : Don't use the default console mode: `--event-handlers console_direct+`
42
42
  --no-root-check : Don't check that spadix being started from the root of a git project
43
43
  --dry-run : Don't run `colcon` command, instead print the command line and exit
44
+ --ninja : Use Ninja during the build. Ignored if it's not a build
44
45
 
45
46
  Commands:
46
47
  clean :Clean all packages (`rm -rf log install build`)
@@ -245,6 +246,7 @@ class command_line_parser:
245
246
  self.dry_run = False
246
247
  self.is_test = False
247
248
  self.is_parallel_overridden = False
249
+ self.use_ninja = False
248
250
 
249
251
  ###########################################################################
250
252
  # Extract global options form the provided arguments
@@ -262,6 +264,8 @@ class command_line_parser:
262
264
  self.no_root_check = True
263
265
  elif arg == '--dry-run':
264
266
  self.dry_run = True
267
+ elif arg == '--ninja':
268
+ self.use_ninja = True
265
269
  else:
266
270
  self.cmd_line.append(arg)
267
271
  else:
@@ -306,6 +310,8 @@ class command_line_parser:
306
310
  expect_cmake_args = False
307
311
 
308
312
  cmake_args = ['--cmake-args']
313
+ if self.use_ninja:
314
+ cmake_args.append(" -GNinja")
309
315
 
310
316
  is_debug = False
311
317
  if is_windows():
@@ -364,7 +370,7 @@ class command_line_parser:
364
370
  self.cmd_line.extend(RM_DIRS_WIN)
365
371
  else:
366
372
  self.cmd_line.extend(RM_DIRS_UNX)
367
- self.cmd_line.extend(['docs', 'latex', 'CTCHTML', 'coverage',
373
+ self.cmd_line.extend(['latex', 'CTCHTML', 'coverage',
368
374
  self.LOG_BASE, self.INSTALL_BASE, self.BUILD_BASE])
369
375
  elif arg.startswith('clean:'):
370
376
  self.cmd_line = []
@@ -424,7 +430,7 @@ class command_line_parser:
424
430
  self.pre_cmd_line.extend(RM_DIRS_WIN)
425
431
  else:
426
432
  self.pre_cmd_line.extend(RM_DIRS_UNX)
427
- self.pre_cmd_line.extend(['docs', 'latex', 'CTCHTML', 'coverage',
433
+ self.pre_cmd_line.extend(['latex', 'CTCHTML', 'coverage',
428
434
  self.LOG_BASE, self.INSTALL_BASE, self.BUILD_BASE])
429
435
  self.cmd_line.append('build')
430
436
  self.add_console_and_merge()
@@ -525,8 +531,10 @@ class command_line_parser:
525
531
  if is_debug:
526
532
  cmake_args.append(' -DCMAKE_BUILD_TYPE=Debug')
527
533
  else:
528
- cmake_args.append(' -DCMAKE_BUILD_TYPE=RelWithDebInfo')
529
- self.cmd_line.extend(cmake_args)
534
+ cmake_args.append(' -DCMAKE_BUILD_TYPE=Release')
535
+
536
+ if len(cmake_args) > 1:
537
+ self.cmd_line.extend(cmake_args)
530
538
 
531
539
  if self.is_test and (not self.is_parallel_overridden):
532
540
  self.cmd_line.extend(['--parallel-workers', '1'])
@@ -588,9 +596,10 @@ def main():
588
596
 
589
597
  if os.path.exists('.spadixrc'):
590
598
  with open('.spadixrc', 'rt', encoding='utf-8') as f:
591
- argv = f.readlines()
592
- for i in range(0, len(argv)):
593
- argv[i] = argv[i].rstrip()
599
+ lines = f.readlines()
600
+ for line in lines:
601
+ if len(line.rstrip(' \n\t\r')) > 0:
602
+ argv.append(line.rstrip(' \n\t\r'))
594
603
 
595
604
  for arg in sys.argv[1:]:
596
605
  argv.append(arg)
@@ -601,7 +610,7 @@ def main():
601
610
  print('--------------------------------------------------------------')
602
611
  print(USAGE.format(version=__version__))
603
612
  return retval.returncode
604
- elif(argv[0] == '--version'):
613
+ elif '--version' in argv:
605
614
  print(__version__)
606
615
  return 0
607
616
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: spadix-cli
3
- Version: 0.7.2
3
+ Version: 0.7.4
4
4
  Summary: SAF friendly wrapper for colcon
5
5
  Home-page: https://safeai.ai
6
6
  Author: Serge Nikulin
@@ -16,6 +16,7 @@ Requires-Python: >=3.6
16
16
  Description-Content-Type: text/markdown
17
17
  License-File: LICENSE
18
18
  Requires-Dist: setuptools
19
+ Requires-Dist: lark
19
20
 
20
21
  # Spadix, a friendly wrapper for `colcon`
21
22
 
@@ -0,0 +1,8 @@
1
+ spadix_cli/__init__.py,sha256=9HpFTG4LtBSh0nFCWO37mgYg2GACJ731HuQz7AdG1NI,24059
2
+ spadix_cli/__main__.py,sha256=rPu64Cx0WavfzKIa5PAHEfBhOL37eaSYC3NGC7b-Lxc,728
3
+ spadix_cli-0.7.4.dist-info/LICENSE,sha256=Mibvrd1h1r-JGmJDpdKRxcyy_QQXVYvC3IkOd_MEHKE,1049
4
+ spadix_cli-0.7.4.dist-info/METADATA,sha256=CTCPrJtaZjfov4HieG8UvnX8yfgYpbEbI6Ko7diDilc,2675
5
+ spadix_cli-0.7.4.dist-info/WHEEL,sha256=iAkIy5fosb7FzIOwONchHf19Qu7_1wCWyFNR5gu9nU0,91
6
+ spadix_cli-0.7.4.dist-info/entry_points.txt,sha256=oUDP6DnZCF5Ynkmodv1uKAoWK_uFmly093arRd7H3f0,52
7
+ spadix_cli-0.7.4.dist-info/top_level.txt,sha256=2nIIYCRacGMBV3v38jf8tNUxx52VlCJSoklnyuF2H5A,11
8
+ spadix_cli-0.7.4.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: bdist_wheel (0.40.0)
2
+ Generator: setuptools (75.3.2)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5
 
@@ -1,8 +0,0 @@
1
- spadix_cli/__init__.py,sha256=3X2Hk0Kqi0ELfrCooQGBRpk7xiYqQb3gnyoEikornv4,23732
2
- spadix_cli/__main__.py,sha256=rPu64Cx0WavfzKIa5PAHEfBhOL37eaSYC3NGC7b-Lxc,728
3
- spadix_cli-0.7.2.dist-info/LICENSE,sha256=Mibvrd1h1r-JGmJDpdKRxcyy_QQXVYvC3IkOd_MEHKE,1049
4
- spadix_cli-0.7.2.dist-info/METADATA,sha256=msIWUGUwPrbKweARAHeW9Hok6_7pcgsY8wALcO911k4,2654
5
- spadix_cli-0.7.2.dist-info/WHEEL,sha256=pkctZYzUS4AYVn6dJ-7367OJZivF2e8RA9b_ZBjif18,92
6
- spadix_cli-0.7.2.dist-info/entry_points.txt,sha256=oUDP6DnZCF5Ynkmodv1uKAoWK_uFmly093arRd7H3f0,52
7
- spadix_cli-0.7.2.dist-info/top_level.txt,sha256=2nIIYCRacGMBV3v38jf8tNUxx52VlCJSoklnyuF2H5A,11
8
- spadix_cli-0.7.2.dist-info/RECORD,,