Salome HOME
bos #30109 bos #29947 and PERSALYS documentation switched on
[tools/sat_salome.git] / products / compil_scripts / YACSGEN.py
1 #!/usr/bin/env python
2 #-*- coding:utf-8 -*-
3 import subprocess
4
5 def compil(config, builder, logger):
6     builder.prepare()
7     if not builder.install_dir.exists():
8         builder.install_dir.make()
9     
10     command = "python setup.py install --prefix=" + str(builder.install_dir)
11     res = subprocess.call(command,
12                           shell=True,
13                           #cwd=str(helper.build_dir),
14                           cwd=str(builder.source_dir),
15                           env=builder.build_environ.environ.environ,
16                           stdout=logger.logTxtFile,
17                           stderr=subprocess.STDOUT)
18     if res != 0:
19         res = 1
20     return res