From ec0902b649c5cb9057cd8be885f1d9ec6eafd242 Mon Sep 17 00:00:00 2001 From: Kodi Arfer Date: Sat, 15 Apr 2017 15:50:26 -0700 Subject: [PATCH] Set __file__ of bytecode imports --- hy/importer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hy/importer.py b/hy/importer.py index 1db67e3..fc9a273 100644 --- a/hy/importer.py +++ b/hy/importer.py @@ -136,9 +136,9 @@ def import_file_to_module(module_name, fpath, loader=None): sys.modules.pop(module_name, None) raise sys.modules[module_name] = module - module.__file__ = fpath module.__name__ = module_name + module.__file__ = fpath if loader: module.__loader__ = loader if is_package(module_name):