Skip to content

Commit

Permalink
Merge pull request #771 from ros/predefined_attributes
Browse files Browse the repository at this point in the history
set commonly predefines attributes when interrogating setup.py files
  • Loading branch information
dirk-thomas committed Dec 25, 2015
2 parents e1dc70a + 39a273d commit eaba48d
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion cmake/interrogate_setup_dot_py.py
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,13 @@ def main():
pass

with open(args.setupfile_path, 'r') as fh:
exec(fh.read(), {})
local_vars = {
'__doc__': None,
'__file__': os.path.abspath(args.setupfile_path),
'__name__': '__main__',
'__package__': None,
}
exec(fh.read(), {}, local_vars)
finally:
distutils.core.setup = distutils_backup
try:
Expand Down

0 comments on commit eaba48d

Please sign in to comment.