Skip to content

Commit

Permalink
Merge pull request #2141 from msarahan/drop_unserializable_setup_py_data
Browse files Browse the repository at this point in the history
drop setup.py data that is unserializable
  • Loading branch information
msarahan authored Jun 30, 2017
2 parents 994e708 + 573d915 commit b779a52
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions conda_build/_load_setup_py_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,6 @@ def setup(**kw):
# we get back a dict of the setup data
data = load_setup_py_data(**args.__dict__)
with open(os.path.join(args.work_dir, 'conda_build_loaded_setup_py.json'), 'w') as f:
# need to remove the cmdclass as it is not json serializable
if 'cmdclass' in data:
del data['cmdclass']
json.dump(data, f)
# this is lossy. Anything that can't be serialized is either forced to None or
# removed completely.
json.dump(data, f, skipkeys=True, default=lambda x: None)

0 comments on commit b779a52

Please sign in to comment.