Skip to content

Commit

Permalink
Removing prints and commented out code.
Browse files Browse the repository at this point in the history
  • Loading branch information
tbenthompson committed Sep 18, 2017
1 parent 9daaa02 commit 570d10b
Showing 1 changed file with 0 additions and 26 deletions.
26 changes: 0 additions & 26 deletions cppimport/importer.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,20 +56,6 @@ def template_and_build(filepath, module_data):
build_module.build_module(module_data)
cppimport.checksum.checksum_save(module_data)

def reload_if_loaded(module_data):
if module_data['module'] is None:
return importlib.import_module(module_data['fullname'])
else:
try:
reload
except NameError:
from imp import reload
print("RELOADING")
print("RELOADING")
print("RELOADING")
print("RELOADING")
return reload(module_data['module'])

def imp_from_filepath(filepath, fullname = None):
if fullname is None:
fullname = os.path.splitext(os.path.basename(filepath))[0]
Expand All @@ -79,18 +65,6 @@ def imp_from_filepath(filepath, fullname = None):
load_module(module_data)
return module_data['module']

# return module_data['module']
# return reload_if_loaded(module_data)
# else:
# quiet_print("Matching checksum for " + filepath + " --> not compiling")
# try:
# return reload_if_loaded(module_data)
# except ImportError as e:
# quiet_print(
# "ImportError during import with matching checksum. Trying to rebuild.")
# template_and_build(filepath, module_data)
# return reload_if_loaded(module_data)

def imp(fullname):
# Search through sys.path to find a file that matches the module
filepath = cppimport.find.find_module_cpppath(fullname)
Expand Down

0 comments on commit 570d10b

Please sign in to comment.