Skip to content

Commit

Permalink
Merge pull request #2143 from mandeep/sort-files-before-writing
Browse files Browse the repository at this point in the history
Sort files before they're written to the files file
  • Loading branch information
msarahan authored Jul 1, 2017
2 parents 68f9f7f + fc65abd commit 8004846
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
4 changes: 2 additions & 2 deletions conda_build/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ def write_info_files_file(m, files):
if m.get_value('build/noarch_python'):
fo.write('\n')
elif m.noarch == 'python':
for f in files:
for f in sorted(files):
if f.find("site-packages") >= 0:
fo.write(f[f.find("site-packages"):] + '\n')
elif f.startswith("bin") and (f not in entry_point_script_names):
Expand All @@ -340,7 +340,7 @@ def write_info_files_file(m, files):
else:
fo.write(f + '\n')
else:
for f in files:
for f in sorted(files):
fo.write(f + '\n')


Expand Down
7 changes: 6 additions & 1 deletion conda_build/convert.py
Original file line number Diff line number Diff line change
Expand Up @@ -500,16 +500,21 @@ def update_files_file(temp_dir, verbose):
files_file = os.path.join(temp_dir, 'info/files')

with open(files_file, 'w+') as files:
file_paths = []
for dirpath, dirnames, filenames in os.walk(temp_dir):
for filename in filenames:
package_file_path = os.path.join(
dirpath, filename).replace(temp_dir, '').lstrip(os.sep)
if not package_file_path.startswith('info'):
files.write(package_file_path + '\n')
# files.write(package_file_path + '\n')
file_paths.append(package_file_path)

if verbose:
print('Updating {}' .format(package_file_path))

for file_path in sorted(file_paths):
files.write(file_path + '\n')


def create_target_archive(file_path, temp_dir, platform, output_dir):
"""Create the converted package's tar file.
Expand Down

0 comments on commit 8004846

Please sign in to comment.