Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

copy load_source function from easybuild.tools.py2vs3.py3 to easybuild.tools.filetools so it can be used in easybuild.tools.hooks #4306

Merged
merged 1 commit into from Aug 3, 2023

Conversation

boegel
Copy link
Member

@boegel boegel commented Aug 2, 2023

This fixes a problem that was introduced by syncing the 5.0.x with develop after #4280 got merged:

ERROR: test_get_easyblock_class_name (test.framework.filetools.FileToolsTest)
Test for get_easyblock_class_name function.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/tmp/runner/ec67a2f31722d0b0d37dc7b0811a2a5b4f48dc22/lib/python3.6/site-packages/test/framework/filetools.py", line 3020, in test_get_easyblock_class_name
    self.assertEqual(ft.get_easyblock_class_name(configuremake), 'ConfigureMake')
  File "/tmp/runner/ec67a2f31722d0b0d37dc7b0811a2a5b4f48dc22/lib/python3.6/site-packages/easybuild/tools/filetools.py", line 2782, in get_easyblock_class_name
    mod = load_source(fn, path)
NameError: name 'load_source' is not defined

We still need the load_source function since it allows avoiding to rely on the (deprecated) imp module from the Python stdlib, and since it's also used in easybuild.tools.filetools that's a good place to put it.

…d.tools.filetools so it can be used easybuild.tools.hooks
@ocaisa ocaisa merged commit ef03b03 into easybuilders:5.0.x Aug 3, 2023
32 checks passed
@boegel boegel deleted the filetools_load_source branch August 3, 2023 17:43
@boegel boegel added the EasyBuild-5.0 EasyBuild 5.0 label Aug 3, 2023
@boegel boegel changed the title copy load_source function from easybuild.tools.py2vs3.py3 to easybuild.tools.filetools so it can be used easybuild.tools.hooks copy load_source function from easybuild.tools.py2vs3.py3 to easybuild.tools.filetools so it can be used in easybuild.tools.hooks Aug 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

2 participants