We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents af1ecba + 91fb22b commit c6bc90bCopy full SHA for c6bc90b
cue.py
@@ -611,15 +611,21 @@ def add_dependency(dep):
611
if dep + '_HOOK' in setup:
612
hook = setup[dep + '_HOOK']
613
hook_file = os.path.join(curdir, hook)
614
+ hook_ext = os.path.splitext(hook_file)[1]
615
if os.path.exists(hook_file):
- if re.match(r'.+\.patch$', hook):
616
+ if hook_ext == '.patch':
617
apply_patch(hook_file, cwd=place)
- elif re.match(r'.+\.(zip|7z)$', hook):
618
+ elif hook_ext in ('.zip', '.7z'):
619
extract_archive(hook_file, cwd=place)
620
+ elif hook_ext == '.py':
621
+ print('Running py hook {0} in {1}'.format(hook, place))
622
+ sp.check_call([sys.executable, hook_file], cwd=place)
623
else:
624
print('Running hook {0} in {1}'.format(hook, place))
625
sys.stdout.flush()
626
sp.check_call(hook_file, shell=True, cwd=place)
627
+ else:
628
+ print('Skipping invalid hook {0} in {1}'.format(hook, place))
629
630
# write checked out commit hash to marker file
631
head = get_git_hash(place)
0 commit comments