spadix-cli 0.7.4__tar.gz → 0.7.6__tar.gz

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.
@@ -1,4 +1,5 @@
1
- Copyright (c) 2021 SafeAI
1
+ Copyright (C) 2021-2024 SafeAI
2
+ Copyright (C) 2025 Pronto.AI
2
3
 
3
4
  Permission is hereby granted, free of charge, to any person obtaining a copy
4
5
  of this software and associated documentation files (the "Software"), to deal
@@ -1,26 +1,41 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.4
2
2
  Name: spadix-cli
3
- Version: 0.7.4
4
- Summary: SAF friendly wrapper for colcon
5
- Home-page: https://safeai.ai
3
+ Version: 0.7.6
4
+ Summary: A friendly wrapper for colcon
5
+ Home-page: https://pronto.ai
6
6
  Author: Serge Nikulin
7
- Author-email: serge@safeai.ai
7
+ Author-email: serge.nikulin@pronto.ai
8
8
  Maintainer: Serge Nikulin
9
- Maintainer-email: serge@safeai.ai
10
- Project-URL: Bug Tracker, https://gitlab.safeai.ai/production/spadix-cli
9
+ Maintainer-email: serge.nikulin@pronto.ai
10
+ Project-URL: Bug Tracker, https://github.com/Pronto-ai/spadix
11
11
  Keywords: spadix-cli
12
12
  Classifier: Programming Language :: Python :: 3
13
13
  Classifier: License :: OSI Approved :: MIT License
14
14
  Classifier: Operating System :: OS Independent
15
- Requires-Python: >=3.6
15
+ Requires-Python: >=3.8
16
16
  Description-Content-Type: text/markdown
17
17
  License-File: LICENSE
18
18
  Requires-Dist: setuptools
19
- Requires-Dist: lark
19
+ Dynamic: author
20
+ Dynamic: author-email
21
+ Dynamic: classifier
22
+ Dynamic: description
23
+ Dynamic: description-content-type
24
+ Dynamic: home-page
25
+ Dynamic: keywords
26
+ Dynamic: license-file
27
+ Dynamic: maintainer
28
+ Dynamic: maintainer-email
29
+ Dynamic: project-url
30
+ Dynamic: requires-dist
31
+ Dynamic: requires-python
32
+ Dynamic: summary
20
33
 
21
34
  # Spadix, a friendly wrapper for `colcon`
22
35
 
23
- Copyright (C) 2021 SafeAI
36
+ Copyright (C) 2021-2024 SafeAI
37
+
38
+ Copyright (C) 2025 Pronto.AI
24
39
 
25
40
  ## Why?
26
41
 
@@ -50,9 +65,11 @@ Usage:
50
65
  spadix [Global options] [command] [command options] ...
51
66
 
52
67
  [Global options]
53
- --no-merge : Don't use --merge-install option for colcon
54
- --no-console : Don't use the default console mode: `--event-handlers console_direct+`
55
- --no-root-check : Don't check that spadix being started from the root of a git project
68
+ --no-merge : Do not use --merge-install option for colcon
69
+ --no-console : Do not use the default console mode: `--event-handlers console_cohesion+`
70
+ --no-root-check : Do not check that spadix being started from the root of a git project
71
+ --ninja : Use Ninja for building when available
72
+ --non-ninja : Do not use Ninja for building, even if it is available
56
73
 
57
74
  Commands:
58
75
  clean :Clean all projects (essentially executes `rm -rf log install build`)
@@ -1,6 +1,8 @@
1
1
  # Spadix, a friendly wrapper for `colcon`
2
2
 
3
- Copyright (C) 2021 SafeAI
3
+ Copyright (C) 2021-2024 SafeAI
4
+
5
+ Copyright (C) 2025 Pronto.AI
4
6
 
5
7
  ## Why?
6
8
 
@@ -30,9 +32,11 @@ Usage:
30
32
  spadix [Global options] [command] [command options] ...
31
33
 
32
34
  [Global options]
33
- --no-merge : Don't use --merge-install option for colcon
34
- --no-console : Don't use the default console mode: `--event-handlers console_direct+`
35
- --no-root-check : Don't check that spadix being started from the root of a git project
35
+ --no-merge : Do not use --merge-install option for colcon
36
+ --no-console : Do not use the default console mode: `--event-handlers console_cohesion+`
37
+ --no-root-check : Do not check that spadix being started from the root of a git project
38
+ --ninja : Use Ninja for building when available
39
+ --non-ninja : Do not use Ninja for building, even if it is available
36
40
 
37
41
  Commands:
38
42
  clean :Clean all projects (essentially executes `rm -rf log install build`)
@@ -7,17 +7,17 @@ with open('README.md', 'r', encoding='utf-8') as fh:
7
7
 
8
8
  setuptools.setup(
9
9
  name='spadix-cli',
10
- version='0.7.4',
10
+ version='0.7.6',
11
11
  packages=setuptools.find_packages(exclude=['test']),
12
- install_requires=['setuptools', 'lark'],
12
+ install_requires=['setuptools'],
13
13
  package_data={'': []},
14
14
  author='Serge Nikulin',
15
- author_email='serge@safeai.ai',
15
+ author_email='serge.nikulin@pronto.ai',
16
16
  maintainer='Serge Nikulin',
17
- maintainer_email='serge@safeai.ai',
18
- url='https://safeai.ai',
17
+ maintainer_email='serge.nikulin@pronto.ai',
18
+ url='https://pronto.ai',
19
19
  project_urls={
20
- 'Bug Tracker': 'https://gitlab.safeai.ai/production/spadix-cli',
20
+ 'Bug Tracker': 'https://github.com/Pronto-ai/spadix',
21
21
  },
22
22
  keywords=['spadix-cli'],
23
23
  classifiers=[
@@ -25,10 +25,10 @@ setuptools.setup(
25
25
  'License :: OSI Approved :: MIT License',
26
26
  'Operating System :: OS Independent',
27
27
  ],
28
- description='SAF friendly wrapper for colcon',
28
+ description='A friendly wrapper for colcon',
29
29
  long_description=long_description,
30
30
  long_description_content_type='text/markdown',
31
- python_requires='>=3.6',
31
+ python_requires='>=3.8',
32
32
  tests_require=['pytest'],
33
33
  test_suite='test',
34
34
  entry_points={
@@ -1,5 +1,6 @@
1
1
  #!/usr/bin/env python3
2
2
  # Copyright 2019-2023 SafeAI, Inc.
3
+ # Copyright (C) 2025 Pronto.AI
3
4
  #
4
5
  # Licensed under the Apache License, Version 2.0 (the "License");
5
6
  # you may not use this file except in compliance with the License.
@@ -26,11 +27,12 @@ from sys import stderr
26
27
 
27
28
  from lark import Lark, Transformer, v_args
28
29
 
29
- __version__ = '0.7.4'
30
+ __version__ = '0.7.6'
30
31
 
31
32
  ###############################################################################
32
33
  USAGE = """
33
- Copyright (C) 2019--2023 SafeAI, by Serge Nikulin
34
+ Copyright (C) 2019-2024 SafeAI, Inc.
35
+ Copyright (C) 2025 Pronto.AI
34
36
  spadix version {version} is a friendly wrapper for colcon (collective construction build manager)
35
37
 
36
38
  Usage:
@@ -38,10 +40,11 @@ spadix [Global options] [command] [command options] ...
38
40
 
39
41
  [Global options]
40
42
  --version : Print spadix\' version and exit`
41
- --no-console : Don't use the default console mode: `--event-handlers console_direct+`
43
+ --no-console : Don't use the default console mode: `--event-handlers console_cohesion+`
42
44
  --no-root-check : Don't check that spadix being started from the root of a git project
43
45
  --dry-run : Don't run `colcon` command, instead print the command line and exit
44
46
  --ninja : Use Ninja during the build. Ignored if it's not a build
47
+ --non-ninja : Do not use Ninja (overrides default on non-Windows)
45
48
 
46
49
  Commands:
47
50
  clean :Clean all packages (`rm -rf log install build`)
@@ -246,7 +249,7 @@ class command_line_parser:
246
249
  self.dry_run = False
247
250
  self.is_test = False
248
251
  self.is_parallel_overridden = False
249
- self.use_ninja = False
252
+ self.use_ninja = not is_windows()
250
253
 
251
254
  ###########################################################################
252
255
  # Extract global options form the provided arguments
@@ -266,6 +269,8 @@ class command_line_parser:
266
269
  self.dry_run = True
267
270
  elif arg == '--ninja':
268
271
  self.use_ninja = True
272
+ elif arg == '--non-ninja':
273
+ self.use_ninja = False
269
274
  else:
270
275
  self.cmd_line.append(arg)
271
276
  else:
@@ -277,7 +282,7 @@ class command_line_parser:
277
282
  self.cmd_line.append('--merge-install')
278
283
  if not self.no_console:
279
284
  self.cmd_line.append('--event-handlers')
280
- self.cmd_line.append('console_direct+')
285
+ self.cmd_line.append('console_cohesion+')
281
286
 
282
287
  ###########################################################################
283
288
  def parse_package_list(self, list_string):
@@ -313,6 +318,7 @@ class command_line_parser:
313
318
  if self.use_ninja:
314
319
  cmake_args.append(" -GNinja")
315
320
 
321
+ user_set_cmake_build_type = False
316
322
  is_debug = False
317
323
  if is_windows():
318
324
  is_debug = True
@@ -331,6 +337,11 @@ class command_line_parser:
331
337
  elif arg == '--cmake-args':
332
338
  expect_cmake_args = True
333
339
  continue
340
+ elif arg.startswith('-D'):
341
+ cmake_args.append(' ' + arg)
342
+ if 'CMAKE_BUILD_TYPE' in arg:
343
+ user_set_cmake_build_type = True
344
+ continue
334
345
  elif arg == '--build-base':
335
346
  self.cmd_line.append(arg)
336
347
  expect_BUILD_BASE = True
@@ -528,10 +539,12 @@ class command_line_parser:
528
539
  self.cmd_line.append(arg)
529
540
 
530
541
  if self.is_build:
531
- if is_debug:
532
- cmake_args.append(' -DCMAKE_BUILD_TYPE=Debug')
533
- else:
534
- cmake_args.append(' -DCMAKE_BUILD_TYPE=Release')
542
+ if not user_set_cmake_build_type and not any(
543
+ 'CMAKE_BUILD_TYPE' in a for a in cmake_args):
544
+ if is_debug:
545
+ cmake_args.append(' -DCMAKE_BUILD_TYPE=Debug')
546
+ else:
547
+ cmake_args.append(' -DCMAKE_BUILD_TYPE=RelWithDebInfo')
535
548
 
536
549
  if len(cmake_args) > 1:
537
550
  self.cmd_line.extend(cmake_args)
@@ -1,5 +1,6 @@
1
1
  #!/usr/bin/env python3
2
2
  # Copyright 2019-2023 SafeAI, Inc.
3
+ # Copyright (C) 2025 Pronto.AI
3
4
  #
4
5
  # Licensed under the Apache License, Version 2.0 (the "License");
5
6
  # you may not use this file except in compliance with the License.
@@ -1,26 +1,41 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.4
2
2
  Name: spadix-cli
3
- Version: 0.7.4
4
- Summary: SAF friendly wrapper for colcon
5
- Home-page: https://safeai.ai
3
+ Version: 0.7.6
4
+ Summary: A friendly wrapper for colcon
5
+ Home-page: https://pronto.ai
6
6
  Author: Serge Nikulin
7
- Author-email: serge@safeai.ai
7
+ Author-email: serge.nikulin@pronto.ai
8
8
  Maintainer: Serge Nikulin
9
- Maintainer-email: serge@safeai.ai
10
- Project-URL: Bug Tracker, https://gitlab.safeai.ai/production/spadix-cli
9
+ Maintainer-email: serge.nikulin@pronto.ai
10
+ Project-URL: Bug Tracker, https://github.com/Pronto-ai/spadix
11
11
  Keywords: spadix-cli
12
12
  Classifier: Programming Language :: Python :: 3
13
13
  Classifier: License :: OSI Approved :: MIT License
14
14
  Classifier: Operating System :: OS Independent
15
- Requires-Python: >=3.6
15
+ Requires-Python: >=3.8
16
16
  Description-Content-Type: text/markdown
17
17
  License-File: LICENSE
18
18
  Requires-Dist: setuptools
19
- Requires-Dist: lark
19
+ Dynamic: author
20
+ Dynamic: author-email
21
+ Dynamic: classifier
22
+ Dynamic: description
23
+ Dynamic: description-content-type
24
+ Dynamic: home-page
25
+ Dynamic: keywords
26
+ Dynamic: license-file
27
+ Dynamic: maintainer
28
+ Dynamic: maintainer-email
29
+ Dynamic: project-url
30
+ Dynamic: requires-dist
31
+ Dynamic: requires-python
32
+ Dynamic: summary
20
33
 
21
34
  # Spadix, a friendly wrapper for `colcon`
22
35
 
23
- Copyright (C) 2021 SafeAI
36
+ Copyright (C) 2021-2024 SafeAI
37
+
38
+ Copyright (C) 2025 Pronto.AI
24
39
 
25
40
  ## Why?
26
41
 
@@ -50,9 +65,11 @@ Usage:
50
65
  spadix [Global options] [command] [command options] ...
51
66
 
52
67
  [Global options]
53
- --no-merge : Don't use --merge-install option for colcon
54
- --no-console : Don't use the default console mode: `--event-handlers console_direct+`
55
- --no-root-check : Don't check that spadix being started from the root of a git project
68
+ --no-merge : Do not use --merge-install option for colcon
69
+ --no-console : Do not use the default console mode: `--event-handlers console_cohesion+`
70
+ --no-root-check : Do not check that spadix being started from the root of a git project
71
+ --ninja : Use Ninja for building when available
72
+ --non-ninja : Do not use Ninja for building, even if it is available
56
73
 
57
74
  Commands:
58
75
  clean :Clean all projects (essentially executes `rm -rf log install build`)
@@ -1,5 +1,6 @@
1
1
  #!/usr/bin/env python3
2
2
  # Copyright 2019-2023 SafeAI, Inc.
3
+ # Copyright (C) 2025 Pronto.AI
3
4
  #
4
5
  # Licensed under the Apache License, Version 2.0 (the "License");
5
6
  # you may not use this file except in compliance with the License.
@@ -92,9 +93,18 @@ def test_get_global_options():
92
93
  clp = spadix_cli.command_line_parser()
93
94
  tst.expect_False(clp.no_console)
94
95
  tst.expect_False(clp.no_root_check)
96
+ tst.expect_eq(clp.use_ninja, not spadix_cli.is_windows())
95
97
  tst.expect_eq(clp.cmd_line, ['colcon'])
96
98
  tst.expect_eq(clp.arg_idx, 0)
97
99
 
100
+ clp = spadix_cli.command_line_parser()
101
+ clp.parse_global_options(['--ninja'])
102
+ tst.expect_True(clp.use_ninja)
103
+
104
+ clp = spadix_cli.command_line_parser()
105
+ clp.parse_global_options(['--non-ninja'])
106
+ tst.expect_False(clp.use_ninja)
107
+
98
108
  clp = spadix_cli.command_line_parser()
99
109
  clp.parse_global_options(None)
100
110
  tst.expect_False(clp.no_console)
@@ -245,13 +255,14 @@ def test_parse_command():
245
255
  release_specifier = ' -DCMAKE_BUILD_TYPE=RelWithDebInfo'
246
256
  if (platform.system() == 'Windows'):
247
257
  release_specifier = ' -DCMAKE_BUILD_TYPE=Debug'
258
+ ninja_cmake_arg = [' -GNinja'] if not spadix_cli.is_windows() else []
248
259
 
249
260
  clp = spadix_cli.command_line_parser()
250
261
  clp.parse_command(['build'])
251
262
  tst.expect_eq(clp.arg_idx, 1)
252
263
  tst.expect_eq(clp.retval, 0)
253
- test_cmd_line = ['colcon', 'build', '--event-handlers', 'console_direct+',
254
- '--cmake-args', release_specifier]
264
+ test_cmd_line = ['colcon', 'build', '--event-handlers', 'console_cohesion+',
265
+ '--cmake-args'] + ninja_cmake_arg + [release_specifier]
255
266
  if spadix_cli.is_merged_install('install', '.colcon_install_layout'):
256
267
  test_cmd_line.insert(2, '--merge-install')
257
268
  tst.expect_eq(clp.cmd_line, test_cmd_line)
@@ -266,9 +277,9 @@ def test_parse_command():
266
277
  clp.parse_command(['build:1'])
267
278
  tst.expect_eq(clp.arg_idx, 1)
268
279
  tst.expect_eq(clp.retval, 0)
269
- test_cmd_line = ['colcon', 'build', '--event-handlers', 'console_direct+',
280
+ test_cmd_line = ['colcon', 'build', '--event-handlers', 'console_cohesion+',
270
281
  '--packages-select', '1',
271
- '--cmake-args', release_specifier]
282
+ '--cmake-args'] + ninja_cmake_arg + [release_specifier]
272
283
  if spadix_cli.is_merged_install('install', '.colcon_install_layout'):
273
284
  test_cmd_line.insert(2, '--merge-install')
274
285
  tst.expect_eq(clp.cmd_line, test_cmd_line)
@@ -277,12 +288,12 @@ def test_parse_command():
277
288
  clp.parse_command(['build:1.ne.2.eq.3.lt.4.le.5.ge.6.gt.7'])
278
289
  tst.expect_eq(clp.arg_idx, 1)
279
290
  tst.expect_eq(clp.retval, 0)
280
- test_cmd_line = ['colcon', 'build', '--event-handlers', 'console_direct+',
291
+ test_cmd_line = ['colcon', 'build', '--event-handlers', 'console_cohesion+',
281
292
  '--packages-select', '1', '3',
282
293
  '--packages-skip', '2', '4', '7',
283
294
  '--packages-up-to', '4', '5',
284
295
  '--packages-above', '6', '7',
285
- '--cmake-args', release_specifier]
296
+ '--cmake-args'] + ninja_cmake_arg + [release_specifier]
286
297
  if spadix_cli.is_merged_install('install', '.colcon_install_layout'):
287
298
  test_cmd_line.insert(2, '--merge-install')
288
299
  tst.expect_eq(clp.cmd_line, test_cmd_line)
@@ -290,8 +301,8 @@ def test_parse_command():
290
301
  clp = spadix_cli.command_line_parser()
291
302
  clp.parse_command(['build', '--release'])
292
303
  tst.expect_eq(clp.retval, 0)
293
- test_cmd_line = ['colcon', 'build', '--event-handlers', 'console_direct+',
294
- '--cmake-args', ' -DCMAKE_BUILD_TYPE=RelWithDebInfo']
304
+ test_cmd_line = ['colcon', 'build', '--event-handlers', 'console_cohesion+',
305
+ '--cmake-args'] + ninja_cmake_arg + [' -DCMAKE_BUILD_TYPE=RelWithDebInfo']
295
306
  if spadix_cli.is_merged_install('install', '.colcon_install_layout'):
296
307
  test_cmd_line.insert(2, '--merge-install')
297
308
  tst.expect_eq(clp.cmd_line, test_cmd_line)
@@ -299,12 +310,19 @@ def test_parse_command():
299
310
  clp = spadix_cli.command_line_parser()
300
311
  clp.parse_command(['build', '--debug'])
301
312
  tst.expect_eq(clp.retval, 0)
302
- test_cmd_line = ['colcon', 'build', '--event-handlers', 'console_direct+',
303
- '--cmake-args', ' -DCMAKE_BUILD_TYPE=Debug']
313
+ test_cmd_line = ['colcon', 'build', '--event-handlers', 'console_cohesion+',
314
+ '--cmake-args'] + ninja_cmake_arg + [' -DCMAKE_BUILD_TYPE=Debug']
304
315
  if spadix_cli.is_merged_install('install', '.colcon_install_layout'):
305
316
  test_cmd_line.insert(2, '--merge-install')
306
317
  tst.expect_eq(clp.cmd_line, test_cmd_line)
307
318
 
319
+ # --non-ninja overrides default on non-Windows
320
+ clp = spadix_cli.command_line_parser()
321
+ clp.parse_global_options(['--non-ninja', 'build'])
322
+ clp.parse_command(['--non-ninja', 'build'])
323
+ tst.expect_eq(clp.retval, 0)
324
+ tst.expect_False(' -GNinja' in clp.cmd_line)
325
+
308
326
  tst.expect_False('SAFEAI_FIF_DISABLED' in os.environ)
309
327
  clp = spadix_cli.command_line_parser()
310
328
  clp.parse_command(['build', '--no-fif'])
@@ -321,7 +339,7 @@ def test_parse_command():
321
339
  test_cmd_line = ['colcon',
322
340
  'test',
323
341
  '--event-handlers',
324
- 'console_direct+',
342
+ 'console_cohesion+',
325
343
  '--parallel-workers',
326
344
  '1']
327
345
  if spadix_cli.is_merged_install('install', '.colcon_install_layout'):
@@ -335,7 +353,7 @@ def test_parse_command():
335
353
  test_cmd_line = ['colcon',
336
354
  'test',
337
355
  '--event-handlers',
338
- 'console_direct+',
356
+ 'console_cohesion+',
339
357
  '--executor',
340
358
  'parallel']
341
359
  if spadix_cli.is_merged_install('install', '.colcon_install_layout'):
@@ -349,7 +367,7 @@ def test_parse_command():
349
367
  test_cmd_line = ['colcon',
350
368
  'test',
351
369
  '--event-handlers',
352
- 'console_direct+',
370
+ 'console_cohesion+',
353
371
  '--parallel-workers',
354
372
  '5']
355
373
  if spadix_cli.is_merged_install('install', '.colcon_install_layout'):
@@ -369,7 +387,7 @@ def test_parse_command():
369
387
  test_cmd_line = ['colcon',
370
388
  'test',
371
389
  '--event-handlers',
372
- 'console_direct+',
390
+ 'console_cohesion+',
373
391
  '--packages-select',
374
392
  '1',
375
393
  '--parallel-workers',
@@ -382,7 +400,7 @@ def test_parse_command():
382
400
  clp.parse_command(['test:2,3,1'])
383
401
  tst.expect_eq(clp.arg_idx, 1)
384
402
  tst.expect_eq(clp.retval, 0)
385
- test_cmd_line = ['colcon', 'test', '--event-handlers', 'console_direct+',
403
+ test_cmd_line = ['colcon', 'test', '--event-handlers', 'console_cohesion+',
386
404
  '--packages-select', '2', '3', '1',
387
405
  '--parallel-workers', '1']
388
406
  if spadix_cli.is_merged_install('install', '.colcon_install_layout'):
@@ -393,7 +411,7 @@ def test_parse_command():
393
411
  clp.parse_command(['test::test'])
394
412
  tst.expect_eq(clp.arg_idx, 1)
395
413
  tst.expect_eq(clp.retval, 0)
396
- test_cmd_line = ['colcon', 'test', '--event-handlers', 'console_direct+',
414
+ test_cmd_line = ['colcon', 'test', '--event-handlers', 'console_cohesion+',
397
415
  '--ctest-args', '-R', 'test',
398
416
  '--parallel-workers', '1']
399
417
  if spadix_cli.is_merged_install('install', '.colcon_install_layout'):
@@ -404,7 +422,7 @@ def test_parse_command():
404
422
  clp.parse_command(['test:1:test'])
405
423
  tst.expect_eq(clp.arg_idx, 1)
406
424
  tst.expect_eq(clp.retval, 0)
407
- test_cmd_line = ['colcon', 'test', '--event-handlers', 'console_direct+',
425
+ test_cmd_line = ['colcon', 'test', '--event-handlers', 'console_cohesion+',
408
426
  '--packages-select', '1',
409
427
  '--ctest-args', '-R', 'test',
410
428
  '--parallel-workers', '1']
@@ -416,7 +434,7 @@ def test_parse_command():
416
434
  clp.parse_command(['test:1.ne.2.eq.3.lt.4.le.5.ge.6.gt.7:test'])
417
435
  tst.expect_eq(clp.arg_idx, 1)
418
436
  tst.expect_eq(clp.retval, 0)
419
- test_cmd_line = ['colcon', 'test', '--event-handlers', 'console_direct+',
437
+ test_cmd_line = ['colcon', 'test', '--event-handlers', 'console_cohesion+',
420
438
  '--packages-select', '1', '3',
421
439
  '--packages-skip', '2', '4', '7',
422
440
  '--packages-up-to', '4', '5',
File without changes
File without changes