|
|
| IS_WINDOWS = sys.platform.startswith("win32") |
| |
|
| OPALS_ROOT = os.path.abspath(os.path.join(os.path.basename(__file__), "..", "..", "..")) |
| |
|
| OPALS_SETUP_DIR = os.path.join(OPALS_ROOT, "setup") |
| |
|
| SETUP_BUILD_DIR = os.path.join(OPALS_ROOT, "setup", "build") |
| |
|
bool | CLEAN_BUILD = False |
| |
|
string | ENGINE_SETUP_NAME = "opals_engine_win64-setup.zip" |
| |
|
string | ENGINE_STAMP_NAME = "opals_engine_win64-setup.version" |
| |
|
| ENGINE_SETUP = os.path.join(OPALS_SETUP_DIR, ENGINE_SETUP_NAME) |
| |
|
| ENGINE_STAMP = os.path.join(OPALS_SETUP_DIR, ENGINE_STAMP_NAME) |
| |
| dictionary | source_dirs |
| |
|
string | comment_str = "OPALS_COMMENT=" |
| |
|
string | version_str = "OPALS_VERSION=" |
| |
|
| current_version_path = os.path.join(OPALS_ROOT, "..", "..", "CurrentReleaseVersion.txt") |
| |
|
string | current_version = "0.0.0.0" |
| |
|
string | digits = current_version.count(".") |
| |
|
| ignore_errors |
| |
|
| exist_ok |
| |
|
int | output_level = 2 |
| |
|
bool | exclude_cvs = True |
| |
|
list | cvs_exclude_pattern = ["CVS", ".#*"] |
| |
|
| source = os.path.join(OPALS_ROOT,d) |
| |
|
| target = os.path.join(SETUP_BUILD_DIR,d) |
| |
|
| include = None |
| |
|
| exclude = None |
| |
|
bool | recursive = True |
| |
|
int | start_level = "." else d.count("/")+1 |
| |
|
list | root_dirs = [(source, start_level)] |
| |
|
int | files_copied = 0 |
| |
|
| path |
| |
|
| level |
| |
|
| relpath = os.path.relpath(path,OPALS_ROOT) |
| |
|
| relpath_copy = os.path.relpath(path, source) |
| |
|
| target_path = os.path.abspath(os.path.join(target,relpath_copy)) |
| |
|
| full_path = os.path.join(path, entry) |
| |
|
| src_file = full_path |
| |
|
| tgt_file = os.path.join(target_path,entry) |
| |
|
| result = distutils.file_util.copy_file(src_file, tgt_file, update=1) |
| |
|
| version_path = os.path.join(SETUP_BUILD_DIR, "version.txt") |
| |
|
string | engine_str = "(engine installation)" |
| |
| list | lines |
| |
|
bool | file_changed = False |
| |
|
| comment = l.split("=")[1].strip() |
| |
|
| setup_file = os.path |
| |
|
| backup_path = os.getcwd() |
| |
|
| root_dir |
| |
|
| st = os.stat(ENGINE_SETUP) |
| |
Script for building an opals engine setup, that can be distributed to ipp engine computers