+++ /dev/null
-#!/usr/bin/env python
-#-*- coding:utf-8 -*-
-
-# distribution codes
-# Code to use to replace the value returned by: lsb_release -si
-# If no code is found an error will be raised.
-DISTRIBUTIONS :
-{
- "bullxServer": "BS"
- "CentOS": "CO"
- "Debian": "DB"
- "Fedora": "FD"
- "LinuxMint": "MN"
- "Mageia": "MG"
- "MandrivaLinux": "MD"
- "RedHatEnterpriseServer": "RH"
- "Ubuntu": "UB"
- "openSUSE project":"OS"
-}
-
-# versions substitution
-# Code to use for release, to the replace value returned by: lsb_release -sr
-# If no code is found the value is used.
-VERSIONS :
-{
- "DB":
- {
- "unstable": "sid"
- "5.0": "05"
- "4.0": "04"
- "6.0.7" : "06"
- "6.0.10": "06"
- "7.1" : "07"
- "7.5" : "07"
- }
- "MD":
- {
- "2008.0": "08"
- "2010.0": "10"
- "2010.1": "10"
- "2010.2": "10"
- "2007.1": "07"
- "2006.0": "06"
- "4" : "06"
- }
- "MG":
- {
- "3": "03"
- "4": "04"
- "5": "05"
- "6": "06"
- }
- "CO":
- {
- "7.1.1503": "7.1"
- }
-}
configPath : ["/home/salome/SPN_PRIVATE/sat5dev_Applications"]
copy_prefix : "LOCAL_"
}
+ prepare :
+ {
+ default_git_server : "http://default.git"
+ default_git_server_dev : "http://default_dev.git"
+ archive_dir : "/home/salome/ETC"
+ cvs_dir : "/test"
+ default_cvs_server : "http://default.cvs"
+ }
}
--- /dev/null
+SOFTWARE :
+{
+ softA :
+ {
+ name : "softA"
+ has_gui : "no"
+ compile_method : "cmake" # ou autotools, ou script
+ get_method : "git" # "archive", embedded", "native" "fixed"
+ cvs_info:
+ {
+ server : $SITE.prepare.default_cvs_server
+ module_base : $SITE.prepare.cvs_dir + $name
+ source : 'softA_SRC'
+ tag : ''
+ }
+ git_info:
+ {
+ repo : $SITE.prepare.default_git_server + $VARS.sep + $name
+ repo_dev : $SITE.prepare.default_git_server_dev + $VARS.sep + $name
+ tag : $APPLICATION.default_version_to_download
+ }
+ archive_info:
+ {
+ archive_name : $SITE.prepare.archive_dir + $VARS.sep + $name + '.tar.gz'
+ }
+ environ :
+ {
+ "_LD_LIBRARY_PATH" : "${SOFT_ROOT_DIR}" + $VARS.sep + "lib"
+ "_PYTHONPATH" : ["${SOFT_ROOT_DIR}" + $VARS.sep + "lib"
+ "${SOFT_ROOT_DIR}" + $VARS.sep + "${PYTHON_LIBDIR0}"
+ "${SOFT_ROOT_DIR}" + $VARS.sep + "${PYTHON_LIBDIR1}"]
+ }
+ depend : []
+ opt_depend : []
+ }
+}
\ No newline at end of file
--- /dev/null
+SOFTWARE :
+{
+ softB :
+ {
+ name : "softB"
+ has_gui : "no"
+ compile_method : "cmake" # ou autotools, ou script
+ get_method : "git" # "archive", embedded", "native" "fixed"
+ cvs_info:
+ {
+ server : $SITE.prepare.default_cvs_server
+ module_base : $SITE.prepare.cvs_dir + $name
+ source : 'softB_SRC'
+ tag : ''
+ }
+ git_info:
+ {
+ repo : $SITE.prepare.default_git_server + $VARS.sep + $name
+ repo_dev : $SITE.prepare.default_git_server_dev + $VARS.sep + $name
+ tag : $APPLICATION.default_version_to_download
+ }
+ archive_info:
+ {
+ archive_name : $SITE.prepare.archive_dir + $VARS.sep + $name + '.tar.gz'
+ }
+ environ :
+ {
+ "_LD_LIBRARY_PATH" : "${SOFT_ROOT_DIR}" + $VARS.sep + "lib"
+ "_PYTHONPATH" : ["${SOFT_ROOT_DIR}" + $VARS.sep + "lib"
+ "${SOFT_ROOT_DIR}" + $VARS.sep + "${PYTHON_LIBDIR0}"
+ "${SOFT_ROOT_DIR}" + $VARS.sep + "${PYTHON_LIBDIR1}"]
+ }
+ depend : ['softA']
+ opt_depend : []
+ }
+}
\ No newline at end of file
--- /dev/null
+#!/usr/bin/env python
+#-*- coding:utf-8 -*-
+
+# distribution codes
+# Code to use to replace the value returned by: lsb_release -si
+# If no code is found an error will be raised.
+DISTRIBUTIONS :
+{
+ "bullxServer": "BS"
+ "CentOS": "CO"
+ "Debian": "DB"
+ "Fedora": "FD"
+ "LinuxMint": "MN"
+ "Mageia": "MG"
+ "MandrivaLinux": "MD"
+ "RedHatEnterpriseServer": "RH"
+ "Ubuntu": "UB"
+ "openSUSE project":"OS"
+}
+
+# versions substitution
+# Code to use for release, to the replace value returned by: lsb_release -sr
+# If no code is found the value is used.
+VERSIONS :
+{
+ "DB":
+ {
+ "unstable": "sid"
+ "5.0": "05"
+ "4.0": "04"
+ "6.0.7" : "06"
+ "6.0.10": "06"
+ "7.1" : "07"
+ "7.5" : "07"
+ }
+ "MD":
+ {
+ "2008.0": "08"
+ "2010.0": "10"
+ "2010.1": "10"
+ "2010.2": "10"
+ "2007.1": "07"
+ "2006.0": "06"
+ "4" : "06"
+ }
+ "MG":
+ {
+ "3": "03"
+ "4": "04"
+ "5": "05"
+ "6": "06"
+ }
+ "CO":
+ {
+ "7.1.1503": "7.1"
+ }
+}
var['personalDir'] = os.path.join(os.path.expanduser('~'), '.salomeTools')
# read linux distributions dictionary
- distrib_cfg = common.config_pyconf.Config(os.path.join(var['dataDir'], "distrib.pyconf"))
+ distrib_cfg = common.config_pyconf.Config(os.path.join(var['srcDir'], 'common', 'internal_config', 'distrib.pyconf'))
# set platform parameters
dist_name = common.architecture.get_distribution(codes=distrib_cfg.DISTRIBUTIONS)
for rule in self.get_command_line_overrides(options, ["SITE"]):
exec('cfg.' + rule) # this cannot be factorized because of the exec
+
# =======================================================================================
# Load APPLICATION config file
for rule in self.get_command_line_overrides(options, ["APPLICATION"]):
exec('cfg.' + rule) # this cannot be factorized because of the exec
+ # =======================================================================================
+ # Load softwares config files in SOFTWARE section
+
+ # The directory containing the softwares definition
+ softsDir = os.path.join(cfg.VARS.dataDir, 'software_pyconf')
+
+ # Loop on all files that are in softsDir directory and read its config
+ for fName in os.listdir(softsDir):
+ if fName.endswith(".pyconf"):
+ common.config_pyconf.streamOpener = ConfigOpener([softsDir])
+ try:
+ soft_cfg = common.config_pyconf.Config(open(os.path.join(softsDir, fName)))
+ except common.config_pyconf.ConfigError as e:
+ raise common.SatException(_("Error in configuration file: %(soft)s\n %(error)s") % \
+ {'soft' : fName, 'error': str(e) })
+ except IOError as error:
+ e = str(error)
+ raise common.SatException( e );
+
+ merger.merge(cfg, soft_cfg)
+
+ for rule in self.get_command_line_overrides(options, ["SOFTWARE"]):
+ exec('cfg.' + rule) # this cannot be factorized because of the exec
+
+
# =======================================================================================
# load USER config
self.setUserConfigFile(cfg)
sys.stdout.write("%s\n" % appliname)
sys.stdout.write("\n")
+
\ No newline at end of file