names = sorted(d_content.keys())
DBG.write("add tar names", names)
+ # used to avoid duplications (for pip install in python, or single_install_dir cases)
+ already_added=set()
for name in names:
# display information
len_points = max_len - len(name) + 3
# of the directory or file to add
# Add it in the archive
try:
- tar.add(local_path, arcname=in_archive, exclude=f_exclude)
+ key=local_path+"->"+in_archive
+ if key not in already_added:
+ tar.add(local_path, arcname=in_archive, exclude=f_exclude)
+ already_added.add(key)
logger.write(src.printcolors.printcSuccess(_("OK")), 3)
except Exception as e:
logger.write(src.printcolors.printcError(_("KO ")), 3)
stat.S_IXGRP |
stat.S_IXOTH)
- print "CNC filepath = ", filepath
return filepath
def hack_for_distene_licence(filepath, licence_file):
# actual install directories and there install directory in archive
d_products = {}
for prod_name, install_dir in l_install_dir:
- path_in_archive = os.path.join(binaries_dir_name, prod_name)
+ path_in_archive = os.path.join(binaries_dir_name, os.path.basename(install_dir))
d_products[prod_name + " (bin)"] = (install_dir, path_in_archive)
for prod_name, source_dir in l_source_dir:
pip_wheels_dir=os.path.join(config.LOCAL.archive_dir,"wheels")
pip_wheel_pattern=os.path.join(pip_wheels_dir,
"%s-%s*" % (p_info.name, p_info.version))
- print "CNC pip_wheel_pattern = ",pip_wheel_pattern
pip_wheel_path=glob.glob(pip_wheel_pattern)
msg_pip_not_found="Error in get_archive, pip wheel for "\
"product %s-%s was not found in %s directory"