-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
adding more build options #757
base: develop
Are you sure you want to change the base?
Conversation
copystat=utils.make_umask_filtered_copystat(umask), | ||
symlinks=True) | ||
source_copy = self._config.get('source_copy') | ||
if source_copy.lower() == 'true': |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can use the utils.py str_bool
here.
lib/pavilion/utils.py
Outdated
def symlinktree(source_directory, destination_directory): | ||
for root, dirs, files in os.walk(source_directory): | ||
for file in files: | ||
src_path = os.path.join(root, file) | ||
rel_path = os.path.relpath(src_path, source_directory) | ||
dst_path = os.path.join(destination_directory, rel_path) | ||
|
||
# Create | ||
os.makedirs(os.path.dirname(dst_path), exist_ok=True) | ||
os.symlink(src_path, dst_path) | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I started write that you should mimic how this is done in builder.py
with maybe_symlink_copy
, but with some of the options you need to add this way is better.
Code review checklist:
Closes #745