Salome HOME
Mise à jour du template PythonComponent:
[tools/sat.git] / data / templates / PythonComponent / template.info
1 #!/usr/bin/env python
2 #-*- coding:utf-8 -*-
3
4 # description of the template to be displayed with option --info
5 info = """
6 Author: CEA
7 Version: 1.1
8 Date: 29/03/2018
9 Description: This template can be used to create a python module for SALOME.
10 """
11
12 # code to substitute with component name
13 file_subst = "PYCMP"
14
15 # delimiter used in the template (default is ':sat:')
16 #delimiter = ":sat:"
17
18 # filter of files to ignore for substitution
19 # if not defined all files will be parsed
20 ignore_filters = '*.png'
21
22 # list of parameters
23 # a string = parameter name
24 # a tuple = (parameter name, default value, prompt, validation method)
25
26 #there is a problem for loading modules if user choose something else than standard "resources directory (lowercase)"
27 #so we need force standard choice...
28 #    ('PYCMP_minus', "%(name)s", "resources directory (lowercase)", lambda l: l.islower() and l.replace("_","").isalnum()),
29
30 parameters = [
31     (file_subst, "%(NAME)s"),
32     ('PYCMPCompoName', "%(Name)s", "Name of the module (hit return!)"),
33     ('PYCMP_minus', "%(name)s", "resources directory (lowercase) (hit return!)", lambda l: l.islower() and l.replace("_","").isalnum()),
34     ("get_method", "archive", "get method for prepare", lambda l: l in ['cvs', 'git', 'archive'])
35     ]
36
37 # configuration to use this component with sat
38 pyconf = """
39     'default':
40     {
41         name : "%(NAME)s"
42
43         get_source   : '%(get_method)s'
44         build_source : 'cmake'
45         git_info:
46         {
47             repo : 'to be filled'
48             tag : 'to be filled'
49         }
50
51         environ : { }
52         depend : [ 'Python', 'KERNEL', 'GUI' ]
53         opt_depend : []
54
55         type : "salome"
56
57         source_dir : $APPLICATION.workdir + $VARS.sep + 'SOURCES' + $VARS.sep + $name
58         build_dir  : $APPLICATION.workdir + $VARS.sep + 'BUILD'   + $VARS.sep + $name
59
60         properties :
61         {
62             has_salome_gui   : 'yes'
63             is_SALOME_module : 'yes'
64             has_unit_tests   : True
65         }
66
67         archive_info:
68         {
69             archive_name : '%(NAME)s.tgz'
70         }
71     }
72 """