Skip to content

Commit

Permalink
Merge pull request #1913 from msarahan/fix_conda_inclusion
Browse files Browse the repository at this point in the history
fix bin/conda getting included in conda-build packages
  • Loading branch information
msarahan authored Apr 8, 2017
2 parents dd35b59 + deb1cb1 commit a8bc030
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
7 changes: 6 additions & 1 deletion conda_build/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -674,10 +674,15 @@ def bundle_conda(output, metadata, env, **kw):
keep_files = set(utils.expand_globs(files, metadata.config.build_prefix))
pfx_files = set(utils.prefix_files(metadata.config.build_prefix))
initial_files = set(item for item in (pfx_files - keep_files)
if not any(keep_file.startswith(item) for keep_file in keep_files))
if not any(keep_file == item for keep_file in keep_files))

files = post_process_files(metadata, initial_files)

if output.get('name') and output.get('name') != 'conda':
assert 'bin/conda' not in files and 'Scripts/conda.exe' not in files, ("Bug in conda-build "
"has included conda binary in package. Please report this on the conda-build issue "
"tracker.")

output_filename = ('-'.join([output['name'], metadata.version(),
metadata.build_id()]) + '.tar.bz2')
# first filter is so that info_files does not pick up ignored files
Expand Down
1 change: 0 additions & 1 deletion conda_build/metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -1305,7 +1305,6 @@ def get_output_metadata_set(self, permit_undefined_jinja=False,

# this is the old, default behavior: conda package, with difference between start
# set of files and end set of files

prefix_file_list = join(om.config.build_folder, 'prefix_files.txt')
if os.path.isfile(prefix_file_list):
with open(prefix_file_list) as f:
Expand Down

0 comments on commit a8bc030

Please sign in to comment.