pyalamake 2.2.0__tar.gz → 2.2.2__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.
Files changed (38) hide show
  1. {pyalamake-2.2.0/src/pyalamake.egg-info → pyalamake-2.2.2}/PKG-INFO +1 -1
  2. {pyalamake-2.2.0 → pyalamake-2.2.2}/pyproject.toml +1 -1
  3. {pyalamake-2.2.0 → pyalamake-2.2.2}/src/pyalamake/compile_cmd_json.py +21 -2
  4. {pyalamake-2.2.0 → pyalamake-2.2.2}/src/pyalamake/constants_version.py +1 -1
  5. {pyalamake-2.2.0 → pyalamake-2.2.2}/src/pyalamake/target_arduino.py +8 -3
  6. {pyalamake-2.2.0 → pyalamake-2.2.2/src/pyalamake.egg-info}/PKG-INFO +1 -1
  7. {pyalamake-2.2.0 → pyalamake-2.2.2}/LICENSE.txt +0 -0
  8. {pyalamake-2.2.0 → pyalamake-2.2.2}/MANIFEST.in +0 -0
  9. {pyalamake-2.2.0 → pyalamake-2.2.2}/README.md +0 -0
  10. {pyalamake-2.2.0 → pyalamake-2.2.2}/setup.cfg +0 -0
  11. {pyalamake-2.2.0 → pyalamake-2.2.2}/src/pyalamake/__init__.py +0 -0
  12. {pyalamake-2.2.0 → pyalamake-2.2.2}/src/pyalamake/arduino_shared.py +0 -0
  13. {pyalamake-2.2.0 → pyalamake-2.2.2}/src/pyalamake/boards.json +0 -0
  14. {pyalamake-2.2.0 → pyalamake-2.2.2}/src/pyalamake/gbl.py +0 -0
  15. {pyalamake-2.2.0 → pyalamake-2.2.2}/src/pyalamake/list_param.py +0 -0
  16. {pyalamake-2.2.0 → pyalamake-2.2.2}/src/pyalamake/makefile_variables.py +0 -0
  17. {pyalamake-2.2.0 → pyalamake-2.2.2}/src/pyalamake/osal.py +0 -0
  18. {pyalamake-2.2.0 → pyalamake-2.2.2}/src/pyalamake/package_cpip.py +0 -0
  19. {pyalamake-2.2.0 → pyalamake-2.2.2}/src/pyalamake/package_opengl.py +0 -0
  20. {pyalamake-2.2.0 → pyalamake-2.2.2}/src/pyalamake/path_handle.py +0 -0
  21. {pyalamake-2.2.0 → pyalamake-2.2.2}/src/pyalamake/pyalamake.py +0 -0
  22. {pyalamake-2.2.0 → pyalamake-2.2.2}/src/pyalamake/svc.py +0 -0
  23. {pyalamake-2.2.0 → pyalamake-2.2.2}/src/pyalamake/target_arduino_core.py +0 -0
  24. {pyalamake-2.2.0 → pyalamake-2.2.2}/src/pyalamake/target_base.py +0 -0
  25. {pyalamake-2.2.0 → pyalamake-2.2.2}/src/pyalamake/target_base_min.py +0 -0
  26. {pyalamake-2.2.0 → pyalamake-2.2.2}/src/pyalamake/target_c.py +0 -0
  27. {pyalamake-2.2.0 → pyalamake-2.2.2}/src/pyalamake/target_c_cpp_base.py +0 -0
  28. {pyalamake-2.2.0 → pyalamake-2.2.2}/src/pyalamake/target_c_cpp_lib_base.py +0 -0
  29. {pyalamake-2.2.0 → pyalamake-2.2.2}/src/pyalamake/target_c_lib.py +0 -0
  30. {pyalamake-2.2.0 → pyalamake-2.2.2}/src/pyalamake/target_cpp.py +0 -0
  31. {pyalamake-2.2.0 → pyalamake-2.2.2}/src/pyalamake/target_cpp_lib.py +0 -0
  32. {pyalamake-2.2.0 → pyalamake-2.2.2}/src/pyalamake/target_gtest.py +0 -0
  33. {pyalamake-2.2.0 → pyalamake-2.2.2}/src/pyalamake/target_manual.py +0 -0
  34. {pyalamake-2.2.0 → pyalamake-2.2.2}/src/pyalamake/target_swig.py +0 -0
  35. {pyalamake-2.2.0 → pyalamake-2.2.2}/src/pyalamake.egg-info/SOURCES.txt +0 -0
  36. {pyalamake-2.2.0 → pyalamake-2.2.2}/src/pyalamake.egg-info/dependency_links.txt +0 -0
  37. {pyalamake-2.2.0 → pyalamake-2.2.2}/src/pyalamake.egg-info/requires.txt +0 -0
  38. {pyalamake-2.2.0 → pyalamake-2.2.2}/src/pyalamake.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pyalamake
3
- Version: 2.2.0
3
+ Version: 2.2.2
4
4
  Summary: python module to generate Makefiles for arduino, GTest, C/C++, etc.
5
5
  Author-email: "J. Arrizza" <cppgent0@gmail.com>
6
6
  Maintainer-email: "J. Arrizza" <cppgent0@gmail.com>
@@ -19,7 +19,7 @@ dependencies = [
19
19
 
20
20
  # common values
21
21
  name = 'pyalamake'
22
- version = '2.2.0'
22
+ version = '2.2.2'
23
23
  requires-python = '>=3.9'
24
24
  authors = [{ name = 'J. Arrizza', email = 'cppgent0@gmail.com' }]
25
25
  maintainers = [
@@ -155,6 +155,20 @@ class _CompileCmdJson(CompileCmdJsonBase):
155
155
  # first token is the command
156
156
  token = self._get_full_path(token)
157
157
 
158
+ # print(f'@@@ line2: "{token}"')
159
+ if token.find('$(') != -1:
160
+ # print(f'@@@ line2 before: "{token}"')
161
+ m = re.search(r'\$\((.*?)\)', token)
162
+ val = svc.gbl.mf_variables.get_value(m.group(1))
163
+ # print(f'@@@ line2 val : "{val}"')
164
+ token = token.replace(f'$({m.group(1)})', val)
165
+ # print(f'@@@ line2 after: {token}')
166
+
167
+ if token.startswith('-I/'):
168
+ # TODO how to check if the value is a system directory or not??
169
+ # currently assumes if the path starts with '/' then it is a system include
170
+ token = token.replace('-I', '-isystem')
171
+
158
172
  tokens.append(token)
159
173
  self._curr_cmd['arguments'] = tokens
160
174
 
@@ -164,9 +178,13 @@ class _CompileCmdJson(CompileCmdJsonBase):
164
178
  # @param cmd the command to get info about
165
179
  # @return None
166
180
  def _get_full_path(self, cmd):
167
- if cmd.startswith('$'):
168
- m = re.match(r'\$\((.*)\)', cmd)
181
+ # print(f'@@@ get_full_path: {cmd}')
182
+
183
+ if cmd.find('$(') != -1:
184
+ # print(f'@@@ get_full_path before: {cmd}')
185
+ m = re.match(r'\$\((.*?)\)', cmd)
169
186
  cmd = svc.gbl.mf_variables.get_value(m.group(1))
187
+ # print(f'@@@ get_full_path after : {cmd}')
170
188
 
171
189
  result = subprocess.run(
172
190
  f'which {cmd}',
@@ -175,4 +193,5 @@ class _CompileCmdJson(CompileCmdJsonBase):
175
193
  text=True, # Decode output as string
176
194
  check=True,
177
195
  ) # Raise error for non-zero exit codes
196
+ # print(f'@@@ get_full_path stdout: {result.stdout.strip()}')
178
197
  return result.stdout.strip()
@@ -6,4 +6,4 @@ from dataclasses import dataclass
6
6
  @dataclass
7
7
  class ConstantsVersion:
8
8
  ## current App version
9
- version = '2.2.0'
9
+ version = '2.2.2'
@@ -179,9 +179,14 @@ class TargetArduino(TargetBase):
179
179
 
180
180
  self._writeln(f'-include {PathHandle(mmd_inc).fixed}')
181
181
  self._writeln(f'{obj_ph.fixed}: {file_ph.fixed}')
182
- self._writeln(
183
- f'\t{self._shared.cpp} {self._shared.cpp_opts} {self._compile_opts} {self._inc_dirs} {file_ph.fixed} -o {obj_ph.fixed}'
184
- )
182
+ if file.endswith('.c'):
183
+ compiler = self._shared.cc
184
+ compiler_opts = self._shared.cc_opts
185
+ else:
186
+ compiler = self._shared.cpp
187
+ compiler_opts = self._shared.cpp_opts
188
+
189
+ self._writeln(f'\t{compiler} {compiler_opts} {self._compile_opts} {self._inc_dirs} {file_ph.fixed} -o {obj_ph.fixed}')
185
190
  self._app_deps += f'{obj_ph.fixed} '
186
191
  build_deps += f'{file_ph.fixed} '
187
192
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pyalamake
3
- Version: 2.2.0
3
+ Version: 2.2.2
4
4
  Summary: python module to generate Makefiles for arduino, GTest, C/C++, etc.
5
5
  Author-email: "J. Arrizza" <cppgent0@gmail.com>
6
6
  Maintainer-email: "J. Arrizza" <cppgent0@gmail.com>
File without changes
File without changes
File without changes
File without changes