Skip to content

Commit

Permalink
Fix bug in tools.py with module_name not defined
Browse files Browse the repository at this point in the history
  • Loading branch information
rpep committed May 9, 2019
1 parent ef1a64d commit ca06d0f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
4 changes: 1 addition & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,9 +180,7 @@
]

for folder in glob.glob(os.path.join(USER_DIR, '*/')):
module_name = folder.split('/')[-2]
user_sources = get_user_module_sources(folder)

module_name, user_sources = get_user_module_sources(folder)
ext_modules.append(
Extension("fidimag.extensions.user.{}".format(module_name),
sources=user_sources,
Expand Down
3 changes: 2 additions & 1 deletion tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ class BuildError(Exception):


def get_user_module_sources(folder):
module_name = folder.split('/')[-2]
print('Found User Module: {}'.format(folder))
user_sources = glob.glob(folder + '/*.pyx')
print('\tFound Cython sources: {}'.format(user_sources))
Expand All @@ -31,4 +32,4 @@ def get_user_module_sources(folder):
print(cfilename)
user_sources += glob_files(folder, excludes=[cfilename])

return user_sources
return module_name, user_sources

0 comments on commit ca06d0f

Please sign in to comment.