spl-core 7.8.0rc1__py3-none-any.whl → 7.10.0__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.
spl_core/__init__.py CHANGED
@@ -1 +1 @@
1
- __version__ = "7.8.0-rc.1"
1
+ __version__ = "7.10.0"
spl_core/common.cmake CHANGED
@@ -10,31 +10,81 @@ macro(_spl_get_absolute_path out in)
10
10
  endif()
11
11
  endmacro()
12
12
 
13
+ # SPL_ADD_COMPONENT
14
+ #
15
+ # Arguments:
16
+ #
17
+ # component_path - the path to the component's directory
18
+ # [target_executable] - (optional) name of the target executable. This is the second argument of the macro.
19
+ #
20
+ # Needs to know:
21
+ #
22
+ # component_path - because it must call add_subdirectory to the component's directory
23
+ # target_executable
24
+ # - required to determine the build directory for the component (one can not call add_subdirectory
25
+ # for the same component multiple times with the same build directory)
26
+ # - must be set to the "global" scope because it is required in spl_create_component to append it to the component name.
27
+ # spl_create_component gets to decide the component name and will make it "global" for this macro to read it back.
28
+ #
13
29
  macro(spl_add_component component_path)
14
- message(DEBUG "spl_add_component: component_path=${component_path}")
15
- _spl_slash_to_underscore(component_name ${component_path})
16
- add_subdirectory(${CMAKE_SOURCE_DIR}/${component_path})
30
+ set(target_executable "${ARGV1}")
31
+ message(DEBUG "spl_add_component: component_path=${component_path}, target_executable=${target_executable}")
17
32
 
18
- if(TARGET ${component_name})
33
+ # Set global variables for spl_create_component
34
+ unset(GLOBAL__SPL_ADD_COMPONENT__TARGET_EXECUTABLE)
35
+ if("${target_executable}" STREQUAL "")
36
+ set(target_executable ${LINK_TARGET_NAME})
37
+ add_subdirectory(${CMAKE_SOURCE_DIR}/${component_path})
38
+ else()
39
+ set(GLOBAL__SPL_ADD_COMPONENT__TARGET_EXECUTABLE "${target_executable}")
40
+ add_subdirectory(${CMAKE_SOURCE_DIR}/${component_path} "${CMAKE_BINARY_DIR}/${target_executable}/${component_path}")
41
+ endif()
42
+ # Add the newly created component to the linked libraries
43
+ if(TARGET ${GLOBAL__SPL_CREATE_COMPONENT__NEW_COMPONENT_NAME})
19
44
  if(BUILD_KIT STREQUAL prod)
20
- target_link_libraries(${LINK_TARGET_NAME} ${component_name})
45
+ target_link_libraries(${target_executable} ${GLOBAL__SPL_CREATE_COMPONENT__NEW_COMPONENT_NAME})
21
46
  endif()
22
47
  endif()
23
48
  endmacro()
24
49
 
50
+ # SPL_ADD_NAMED_COMPONENT
51
+ #
52
+ # Arguments:
53
+ #
54
+ # component_name - the name of the component. (!) This macro expects that a CMake variable with this name holds the component path.
55
+ # This means that ${${component_name}} is the component path.
56
+ # [target_executable] - (optional) name of the target executable.
57
+ #
58
+ # Needs to know:
59
+ #
60
+ # component_path - because it must call add_subdirectory to the component's directory
61
+ # target_executable
62
+ # - required to determine the build directory for the component (one can not call add_subdirectory
63
+ # for the same component multiple times without specifying the build directory)
64
+ # - must be set to the "global" scope because it is required in spl_create_component to append it to the component name
65
+ #
25
66
  macro(spl_add_named_component component_name)
26
- message(DEBUG "spl_add_named_component: component_name=${component_name}")
67
+ set(target_executable "${ARGV1}")
27
68
  set(component_path ${${component_name}})
69
+ if(NOT IS_ABSOLUTE ${component_path})
70
+ set(component_path ${CMAKE_SOURCE_DIR}/${component_path})
71
+ endif()
72
+ message(DEBUG "spl_add_named_component: component_name=${component_name}, component_path=${component_path}, target_executable=${target_executable}")
28
73
 
29
- if(IS_ABSOLUTE ${component_path})
74
+ # Set global variables for spl_create_component
75
+ unset(GLOBAL__SPL_ADD_COMPONENT__TARGET_EXECUTABLE)
76
+ if("${target_executable}" STREQUAL "")
77
+ set(target_executable ${LINK_TARGET_NAME})
30
78
  add_subdirectory(${component_path})
31
79
  else()
32
- add_subdirectory(${CMAKE_SOURCE_DIR}/${component_path})
80
+ set(GLOBAL__SPL_ADD_COMPONENT__TARGET_EXECUTABLE "${target_executable}")
81
+ add_subdirectory(${component_path} "${CMAKE_BINARY_DIR}/${target_executable}/${component_name}")
33
82
  endif()
34
83
 
35
- if(TARGET ${component_name})
84
+ # Add the newly created component to the linked libraries
85
+ if(TARGET ${GLOBAL__SPL_CREATE_COMPONENT__NEW_COMPONENT_NAME})
36
86
  if(BUILD_KIT STREQUAL prod)
37
- target_link_libraries(${LINK_TARGET_NAME} ${component_name})
87
+ target_link_libraries(${target_executable} ${GLOBAL__SPL_CREATE_COMPONENT__NEW_COMPONENT_NAME})
38
88
  endif()
39
89
  endif()
40
90
  endmacro()
@@ -121,6 +171,20 @@ macro(_spl_get_google_test)
121
171
  enable_testing()
122
172
  endmacro(_spl_get_google_test)
123
173
 
174
+ # SPL_CREATE_COMPONENT
175
+ #
176
+ # Arguments (they are all optional):
177
+ #
178
+ # NAME - Use this as component name instead of define it from the component path.
179
+ # LONG_NAME - A longer name of the component to be used in reports.
180
+ # LIBRARY_TYPE - The type of library to create (e.g., STATIC, SHARED, OBJECT)
181
+ #
182
+ # Needs to know:
183
+ # - target_executable - global variable set by the spl_add_component macros to make sure different component
184
+ # names are used for different executables
185
+ #
186
+ # The component name will be made "global" such that the spl_add_compoent macro can add it to the executable
187
+ #
124
188
  macro(spl_create_component)
125
189
  cmake_parse_arguments(CREATE_COMPONENT "" "NAME;LONG_NAME;LIBRARY_TYPE" "" ${ARGN})
126
190
 
@@ -132,11 +196,22 @@ macro(spl_create_component)
132
196
  # Determine the unique component name based on the relative path of the component
133
197
  file(RELATIVE_PATH component_path ${CMAKE_SOURCE_DIR} ${CMAKE_CURRENT_LIST_DIR})
134
198
 
199
+ unset(GLOBAL__SPL_CREATE_COMPONENT__NEW_COMPONENT_NAME)
135
200
  if(NOT CREATE_COMPONENT_NAME)
201
+ # The component relative path to the project root dictates the component name
136
202
  _spl_slash_to_underscore(component_name ${component_path})
137
203
  else()
204
+ # Explicit name provided - use it as-is
138
205
  set(component_name ${CREATE_COMPONENT_NAME})
139
206
  endif()
207
+ # If there is a custom target executable, prefix the component name
208
+ if(GLOBAL__SPL_ADD_COMPONENT__TARGET_EXECUTABLE)
209
+ set(component_name ${GLOBAL__SPL_ADD_COMPONENT__TARGET_EXECUTABLE}_${component_name})
210
+ endif()
211
+ # Make the component name public
212
+ set(GLOBAL__SPL_CREATE_COMPONENT__NEW_COMPONENT_NAME ${component_name} PARENT_SCOPE)
213
+
214
+ message(DEBUG "spl_create_component: component_name=${component_name}")
140
215
 
141
216
  # Collect all productive sources for later usage (e.g., in an extension)
142
217
  list(APPEND PROD_SOURCES ${SOURCES})
@@ -193,8 +268,9 @@ macro(spl_create_component)
193
268
  \"reports_output_dir\": \"\"
194
269
  }")
195
270
  set(_component_is_header_only FALSE)
271
+
196
272
  # If prod and sources or test and test_sources define library. Else make it an interface and set the flag
197
- if ((BUILD_KIT STREQUAL prod AND SOURCES) OR
273
+ if((BUILD_KIT STREQUAL prod AND SOURCES) OR
198
274
  (BUILD_KIT STREQUAL test AND TEST_SOURCES))
199
275
  add_library(${component_name} ${CREATE_COMPONENT_LIBRARY_TYPE} ${SOURCES})
200
276
  else()
@@ -367,6 +443,7 @@ Code Coverage
367
443
  # Implicitly add default include directories to provided interfaces
368
444
  list(APPEND PROVIDED_INTERFACES ${CMAKE_CURRENT_LIST_DIR}/src)
369
445
  list(APPEND PROVIDED_INTERFACES ${CMAKE_CURRENT_BINARY_DIR})
446
+
370
447
  # Get rid of duplicates, in case the default directories where explicitly defined
371
448
  list(REMOVE_DUPLICATES PROVIDED_INTERFACES)
372
449
 
@@ -382,12 +459,13 @@ Code Coverage
382
459
  # Define the target public interfaces to be used instead of the global include directories.
383
460
  if(TARGET ${component_name})
384
461
  foreach(interfaceDir IN LISTS PROVIDED_INTERFACES)
385
- if (_component_is_header_only)
462
+ if(_component_is_header_only)
386
463
  target_include_directories(${component_name} INTERFACE ${interfaceDir})
387
464
  else()
388
465
  target_include_directories(${component_name} PUBLIC ${interfaceDir})
389
466
  endif()
390
467
  endforeach()
468
+
391
469
  foreach(component IN LISTS REQUIRED_INTERFACES)
392
470
  if(_component_is_header_only)
393
471
  target_link_libraries(${component_name} INTERFACE ${component})
@@ -620,7 +698,7 @@ macro(_spl_add_test_suite COMPONENT_NAME PROD_SRC TEST_SOURCES)
620
698
  OUTPUT ${MOCK_SRC}
621
699
  BYPRODUCTS mockup_${component_name}.h
622
700
  WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}
623
- COMMAND python -m hammocking --suffix _${COMPONENT_NAME} --sources ${PROD_SRC} --plink ${CMAKE_CURRENT_BINARY_DIR}/${PROD_PARTIAL_LINK} --outdir ${CMAKE_CURRENT_BINARY_DIR} "$<$<BOOL:${component_inc_dirs}>:-I$<JOIN:${component_inc_dirs},;-I>>" "$<$<BOOL:${component_comp_defs}>:-D$<JOIN:${component_comp_defs},;-D>>" -x c
701
+ COMMAND python -m hammocking --suffix _${COMPONENT_NAME} --sources ${PROD_SRC} --plink ${CMAKE_CURRENT_BINARY_DIR}/${PROD_PARTIAL_LINK} --outdir ${CMAKE_CURRENT_BINARY_DIR} "$<$<BOOL:${component_inc_dirs}>:-I$<JOIN:${component_inc_dirs},;-I>>" "$<$<BOOL:${component_comp_defs}>:-D$<JOIN:${component_comp_defs},;-D>>" ${COMPILER_SPECIFIC_INCLUDES} -x c
624
702
  COMMAND_EXPAND_LISTS
625
703
  VERBATIM
626
704
  DEPENDS
@@ -740,7 +818,7 @@ macro(spl_run_conan)
740
818
  endmacro(spl_run_conan)
741
819
 
742
820
  macro(_spl_set_ninja_wrapper_as_cmake_make)
743
- set (NINJA_WRAPPER ${CMAKE_CURRENT_BINARY_DIR}/ninja_wrapper.bat)
821
+ set(NINJA_WRAPPER ${CMAKE_CURRENT_BINARY_DIR}/ninja_wrapper.bat)
744
822
  file(WRITE ${NINJA_WRAPPER}
745
823
  "@echo off
746
824
  @call %~dp0%/activate_run.bat
@@ -1,3 +1,11 @@
1
1
  set(CMAKE_C_COMPILER clang CACHE STRING "C Compiler")
2
2
  set(CMAKE_CXX_COMPILER clang++ CACHE STRING "CXX Compiler")
3
3
  set(CMAKE_ASM_COMPILER ${CMAKE_C_COMPILER} CACHE STRING "ASM Compiler")
4
+
5
+ unset(CMAKE_C_COMPILER_FOUND_PATH)
6
+ find_program(CMAKE_C_COMPILER_FOUND_PATH ${CMAKE_C_COMPILER})
7
+ get_filename_component(CMAKE_C_COMPILER_FOUND_PATH ${CMAKE_C_COMPILER_FOUND_PATH} DIRECTORY)
8
+ # CMAKE_C_COMPILER_FOUND_PATH is the path to the 'bin' directory
9
+ set(COMPILER_SPECIFIC_INCLUDES
10
+ -I${CMAKE_C_COMPILER_FOUND_PATH}/../x86_64-w64-mingw32/include
11
+ )
@@ -1,3 +1,11 @@
1
1
  set(CMAKE_C_COMPILER gcc CACHE STRING "C Compiler")
2
2
  set(CMAKE_CXX_COMPILER g++ CACHE STRING "CXX Compiler")
3
3
  set(CMAKE_ASM_COMPILER ${CMAKE_C_COMPILER} CACHE STRING "ASM Compiler")
4
+
5
+ unset(CMAKE_C_COMPILER_FOUND_PATH)
6
+ find_program(CMAKE_C_COMPILER_FOUND_PATH ${CMAKE_C_COMPILER})
7
+ get_filename_component(CMAKE_C_COMPILER_FOUND_PATH ${CMAKE_C_COMPILER_FOUND_PATH} DIRECTORY)
8
+ # CMAKE_C_COMPILER_FOUND_PATH is the path to the 'bin' directory
9
+ set(COMPILER_SPECIFIC_INCLUDES
10
+ -I${CMAKE_C_COMPILER_FOUND_PATH}/../x86_64-w64-mingw32/include
11
+ )
@@ -1,3 +1,4 @@
1
+ import json
1
2
  from dataclasses import dataclass
2
3
  from pathlib import Path
3
4
  from typing import List, Optional
@@ -34,14 +35,12 @@ class CollectPRChanges(PipelineStep):
34
35
  changed_files = self._get_changed_files(ci_context.target_branch, ci_context.current_branch)
35
36
  output_file = self.get_outputs()[0]
36
37
  output_file.parent.mkdir(parents=True, exist_ok=True)
37
- output_file.write_text(
38
- str(
39
- PR_Changes(
40
- ci_system=ci_context.ci_system.name, target_branch=ci_context.target_branch, current_branch=ci_context.current_branch, commit_id=self._get_commit_id(ci_context), changed_files=changed_files
41
- ).to_json()
42
- ),
43
- encoding="utf-8",
44
- )
38
+ output_file.write_text(json.dumps(
39
+ PR_Changes(
40
+ ci_system=ci_context.ci_system.name, target_branch=ci_context.target_branch, current_branch=ci_context.current_branch, commit_id=self._get_commit_id(ci_context), changed_files=changed_files
41
+ ).to_dict(),
42
+ indent=2
43
+ ))
45
44
  logger.info(f"PR changes saved to {output_file}")
46
45
 
47
46
  def _get_changed_files(self, target_branch: str, current_branch: str) -> List[str]:
@@ -89,7 +88,6 @@ class CollectPRChanges(PipelineStep):
89
88
  logger.info("No CI context found.")
90
89
  return ""
91
90
  ci_context = ci_contexts[0]
92
- logger.info(f"CI context: {ci_context}")
93
91
  if isinstance(ci_context, CIContext) and ci_context.is_pull_request:
94
92
  result = SubprocessExecutor(["git", "rev-parse", f"origin/{ci_context.current_branch}"]).execute(handle_errors=False)
95
93
  if result and result.returncode == 0:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: spl-core
3
- Version: 7.8.0rc1
3
+ Version: 7.10.0
4
4
  Summary: Software Product Line Support for CMake
5
5
  License: MIT
6
6
  Author: Avengineers
@@ -23,7 +23,8 @@ Requires-Dist: kconfiglib (>=14.1,<15.0)
23
23
  Requires-Dist: mlx-traceability (>=10.0,<11.0)
24
24
  Requires-Dist: myst-parser (>=0.16)
25
25
  Requires-Dist: py-app-dev (>=2.1,<3.0)
26
- Requires-Dist: pypeline-semantic-release (>=0.4.1,<0.5.0)
26
+ Requires-Dist: pypeline-runner (>=1,<=2)
27
+ Requires-Dist: pypeline-semantic-release (>=0.4.1,<=0.5.0)
27
28
  Requires-Dist: sphinx (>=7.3,<8.0)
28
29
  Requires-Dist: sphinx-book-theme (>=1.1,<2.0)
29
30
  Requires-Dist: sphinx-copybutton (>=0.5,<0.6)
@@ -1,8 +1,8 @@
1
- spl_core/__init__.py,sha256=GRRA8g5ffdV82Y5XdlAFf1TTG9dlmQbKuqrPmT3tho0,27
1
+ spl_core/__init__.py,sha256=GHzDQ26ZrFjhBusV3W0P0PcmVjJ349q32G_UDe84Q6E,23
2
2
  spl_core/__run.py,sha256=DphnN7_Bjiw_mOOztsHxTDHS8snz1g2MMWAaJpZxPKM,361
3
3
  spl_core/common/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
4
4
  spl_core/common/path.py,sha256=sDujd3n4XP1XGjHc7ImXEdjihO6A8BOIDbKCf7HgQ0Y,462
5
- spl_core/common.cmake,sha256=sRWqQeK04iUpeM3beQZXIi5mpEQNyO751O-yBoFCrqk,35160
5
+ spl_core/common.cmake,sha256=-0TFObmNaBx7_mXb4bUraOo4EX-lFJ2rmGKn79y9eVM,39160
6
6
  spl_core/conan.cmake,sha256=i1AuyN-e8cczX7TI1nl6e3Y8N-EP-QXPVY7LG6NUyJY,41958
7
7
  spl_core/config/KConfig,sha256=atlUwl0kPIdoGjbOI2PoaCQ2wgao7-mblZKn3dXUCxI,1755
8
8
  spl_core/gcov_maid/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -55,16 +55,16 @@ spl_core/kickstart/templates/project/pypeline.yaml,sha256=9Kz3D0-I5mVJ6UdG92BuQS
55
55
  spl_core/kickstart/templates/project/pyproject.toml,sha256=FicwBOwVlGi_0pwTC0_LTaKMgWoaXfMayjYTp4Qb48I,310
56
56
  spl_core/kickstart/templates/project/pytest.ini,sha256=Zh3jeEjZV_BqQoX7LB0cv6EtqDDogRCHsQdKHRQnq18,366
57
57
  spl_core/kickstart/templates/project/scoopfile.json,sha256=7qDThZwB1jBtiQl1uOZQ21-zKITBpQzt1S-uUfW1JFE,500
58
- spl_core/kickstart/templates/project/tools/toolchains/clang/toolchain.cmake,sha256=824enlZDMkJOZf77iHtbFIpUMi-AelLnTYLQWok5XtI,189
59
- spl_core/kickstart/templates/project/tools/toolchains/gcc/toolchain.cmake,sha256=AmLzPyhTgfc_Dsre4AlsvSOkVGW6VswWvrEnUL8JLhA,183
58
+ spl_core/kickstart/templates/project/tools/toolchains/clang/toolchain.cmake,sha256=pqAUH3vlzT3qrSkm8Z5cTkk0YKuC44_ySxEvKPRQWjA,553
59
+ spl_core/kickstart/templates/project/tools/toolchains/gcc/toolchain.cmake,sha256=3xKeNw1zjo5dSzu2v9WmFHJajOn64v7UukKNp6U5Dk8,547
60
60
  spl_core/main.py,sha256=_hL4j155WZMXog_755bgAH1PeUwvTdJZvVdVw9EWhvo,1225
61
61
  spl_core/spl.cmake,sha256=W8h-Zj-N302qxMrRG8MhoEkJ0io92bWGp4Y5r8LBQnc,4535
62
- spl_core/steps/collect_pr_changes.py,sha256=2izqHH9kG6ozBnh1HN2dX0C4o9dU2vvq9xCB8yYSYLY,4281
62
+ spl_core/steps/collect_pr_changes.py,sha256=0zqjF55K3P8V3ZfCNQc33pYrCxhJJhBmAG4cVxVuy1U,4182
63
63
  spl_core/test_utils/archive_artifacts_collection.py,sha256=x7LH5dGIvssyhXsTFzB6rjgb5D2efKvHVpnjId3MNDk,5126
64
64
  spl_core/test_utils/base_variant_test_runner.py,sha256=Oq27lkJlpB_y-p2_8S23F5zjn1438HW148q-hQNz3EY,3795
65
65
  spl_core/test_utils/spl_build.py,sha256=bSM6hwhTH9aRryvUvtSPDfk_zoZuKEO5g3QXK4SIrco,8442
66
- spl_core-7.8.0rc1.dist-info/LICENSE,sha256=UjjA0o8f5tT3wVm7qodTLAhPWLl6kgVyn9FPAd1VeYY,1099
67
- spl_core-7.8.0rc1.dist-info/METADATA,sha256=Zrld_N3uhLTstu9K15tNlz4Hl9MeBF0OosW-DjPj3Ig,5218
68
- spl_core-7.8.0rc1.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
69
- spl_core-7.8.0rc1.dist-info/entry_points.txt,sha256=18_sdVY93N1GVBiAHxQ_F9ZM-bBvOmVMOMn7PNe2EqU,45
70
- spl_core-7.8.0rc1.dist-info/RECORD,,
66
+ spl_core-7.10.0.dist-info/LICENSE,sha256=UjjA0o8f5tT3wVm7qodTLAhPWLl6kgVyn9FPAd1VeYY,1099
67
+ spl_core-7.10.0.dist-info/METADATA,sha256=fxTSSCZ-7zsqJ2NjPPAnRHzZO5lSoucxEixSCsBVbQM,5258
68
+ spl_core-7.10.0.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
69
+ spl_core-7.10.0.dist-info/entry_points.txt,sha256=18_sdVY93N1GVBiAHxQ_F9ZM-bBvOmVMOMn7PNe2EqU,45
70
+ spl_core-7.10.0.dist-info/RECORD,,