make sure lib/python*/lib-dynload exists in Python installation#1966
make sure lib/python*/lib-dynload exists in Python installation#1966akesandgren merged 3 commits intoeasybuilders:developfrom
Conversation
|
@akesandgren This is good to go imho, the remaining problem in #1957 is something else entirely it seems... |
| mkdir(lib_dynload_parent, parents=True) | ||
| cwd = change_dir(lib_dynload_parent) | ||
| # use relative path as target, to avoid hardcoding path to install directory | ||
| target_lib_dynload = os.path.join('..', '..', 'lib64', 'python%s' % self.pyshortver, lib_dynload) |
There was a problem hiding this comment.
In line with your usual comments for code that repeats itself...
put os.path.join('lib64', 'python%s' % self.pyshortver, lib_dynload))
into some variable and reuse in both places
or even the ('python%s' % self.pyshortver, lib_dynload) part...
| cwd = change_dir(lib_dynload_parent) | ||
| # use relative path as target, to avoid hardcoding path to install directory | ||
| target_lib_dynload = os.path.join('..', '..', 'lib64', 'python%s' % self.pyshortver, lib_dynload) | ||
| symlink(target_lib_dynload, lib_dynload) |
There was a problem hiding this comment.
Doesn't this need to be symlink(target_lib_dynload, lib_dynload, use_abspath_source=False) to make sure it doesn't get fiddled with...
There was a problem hiding this comment.
No, we want to avoid hardcoding the path to the installation directory in the symlink (we had a good reason to use ../.. rather than using the full path even)
…nce in lib-dynload check in Python easyblock
|
Going in, thanks @boegel! |
see #1957
@kserradell Are you up for testing this fix on OpenSUSE?