gen_avr8.pro.module_type module¶
- Module
- module_type.py
- Copyright
- Copyright (C) 2018 Vladimir Roncevic <elektron.ronca@gmail.com> gen_avr8 is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. gen_avr8 is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
- Info
- Defined class ModuleType with attribute(s) and method(s). Check module type (it can be source module | build module).
-
class
gen_avr8.pro.module_type.
ModuleType
[source]¶ Bases:
object
Defined class ModuleType with attribute(s) and method(s). Check module type (it can be source module | build module). It defines:
attributes: GEN_VERBOSE - console text indicator for process-phase.SOURCE - list of expected source extensions.BUILD - list of expected build extensions/files.methods: pre_process_module - process module name.is_source_module - check is source module.is_build_module - check is build module.__str__ - dunder method for ModuleType.-
BUILD
= ['.mk', 'Makefile']¶
-
GEN_VERBOSE
= 'GEN_AVR8::PRO::MODULE_TYPE'¶
-
SOURCE
= ['.c', '.h']¶
-
classmethod
is_build_module
(module)[source]¶ Check is build module.
Parameters: module (<str>) – module name. Returns: boolean status, True | False. Return type: <bool> Exceptions: None
-
classmethod
is_source_module
(module)[source]¶ Check is source module.
Parameters: module (<str>) – module name. Returns: boolean status, True | False. Return type: <bool> Exceptions: None
-
classmethod
pre_process_module
(pro_type, pro_name, module, verbose=False)[source]¶ Process module name.
Parameters: - pro_type (<str>) – project type.
- pro_name (<str>) – project name.
- module (<str>) – module name.
- verbose (<bool>) – enable/disable verbose option.
Returns: processed module name.
Return type: <str>
Exceptions: None
-