Make the allinea easyblock search for the templates in the easyconfig paths#1025
Merged
boegel merged 5 commits intoeasybuilders:developfrom Dec 8, 2016
Conversation
… paths. Also add support for specifying a system.config to install.
boegel
requested changes
Nov 15, 2016
| else: | ||
| raise EasyBuildError('No system.config file named %s found', sysconfig) | ||
| try: | ||
| shutil.copy(path, sysconf_path) |
Member
There was a problem hiding this comment.
@akesandgren please use copy_file (from filetools module) instead
| except OSError, err: | ||
| raise EasyBuildError("Failed to copy %s to %s: %s", path, sysconf_path, err) | ||
| try: | ||
| os.chmod(sysconf_path, 0444) |
Member
There was a problem hiding this comment.
@akesandgren please use adjust_permissions function for this?
|
|
||
| try: | ||
| shutil.copy2(templ, templ_path) | ||
| shutil.copy(path, templ_path) |
Contributor
Author
There was a problem hiding this comment.
If you mean the change from copy2 to copy, the installed file should have the same permissions as the rest of the installation, not whatever the template file had before the copy.
Contributor
Author
|
Anything else? |
boegel
reviewed
Dec 8, 2016
| raise EasyBuildError("Failed to copy template %s to %s: %s", templ, templ_path, err) | ||
|
|
||
| # copy system.config if requested | ||
| sysconf_path = os.path.join(self.installdir, 'system.config') |
…dling get rid of tabs, clarify use of shutil.copy + minor style fixes
boegel
approved these changes
Dec 8, 2016
Member
|
tested with existing Allinea easyconfigs, thanks @akesandgren! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Also add support for specifying a system.config to install.
This makes it possible to keep the templates in the sites easyconfig repos and also handles installing a system.config file if requested.