target = os.path.join(*target_list) file_list.append((target, [ os.path.join(dirname, f) for f in filenames if not os.path.isdir(os.path.join(dirname, f)) ])) def extend_output_files(file_list, dirname, filenames): l = dirname.split(os.path.sep) target_list = l[l.index('sample-output'):] target = os.path.join(*target_list) file_list.append((target, [ os.path.join(dirname, f) for f in filenames if not os.path.isdir(os.path.join(dirname, f)) ])) bin_win_src = pasta.pasta_tools_dev_dir() bin_win_dest = pasta.pasta_tools_deploy_subpath() pasta_src_root = pasta.pasta_home_dir() data_dir = os.path.join(pasta_src_root, 'data') sample_output_dir = os.path.join(pasta_src_root, 'sample-output') my_files = [] my_files.extend(find_data_files(bin_win_src, bin_win_dest, ['*'])) my_files.extend( find_data_files(os.path.join(bin_win_src, 'real_bin'), os.path.join(bin_win_dest, 'real_bin'), ['*'])) my_files.extend( find_data_files(os.path.join(pasta_src_root, 'doc'), 'doc', ['*'])) os.path.walk(data_dir, extend_data_files, my_files) os.path.walk(sample_output_dir, extend_output_files, my_files) PY2EXE_OPTIONS = {
target = os.path.join(*target_list) file_list.append((target, [os.path.join(dirname, f) for f in filenames if not os.path.isdir( os.path.join(dirname, f))])) def extend_output_files(file_list, dirname, filenames): l = dirname.split(os.path.sep) target_list = l[l.index('sample-output'):] target = os.path.join(*target_list) file_list.append((target, [os.path.join(dirname, f) for f in filenames if not os.path.isdir( os.path.join(dirname, f))])) bin_win_src = pasta.pasta_tools_dev_dir() bin_win_dest = pasta.pasta_tools_deploy_subpath() pasta_src_root = pasta.pasta_home_dir() data_dir = os.path.join(pasta_src_root, 'data') sample_output_dir = os.path.join(pasta_src_root, 'sample-output') my_files = [] my_files.extend( find_data_files( bin_win_src, bin_win_dest, ['*'] ) ) my_files.extend( find_data_files( os.path.join(bin_win_src, 'real_bin'), os.path.join(bin_win_dest, 'real_bin'), ['*'] ) ) my_files.extend( find_data_files( os.path.join(pasta_src_root, 'doc'),