This repository has been archived by the owner on May 2, 2024. It is now read-only.
forked from HaikuTeam/animator
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
HaikuTeam#1077: Added support of Python3 on top of Python 2.7
- Loading branch information
Showing
3 changed files
with
26 additions
and
24 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,26 @@ | ||
#!/usr/bin/env python2.7 | ||
#!/usr/bin/env python | ||
import os | ||
import sys | ||
from os import environ | ||
from os import path | ||
import json | ||
import subprocess | ||
|
||
is_branch_checkout = sys.argv[3] | ||
if is_branch_checkout == '0' or environ.get('SKIP_HAIKU_HOOKS', '0') == '1': | ||
# This is a file checkout or we have been expliticly asked to do nothing. | ||
sys.exit(0) | ||
if is_branch_checkout == '0' or os.environ.get('SKIP_HAIKU_HOOKS', '0') == '1': | ||
# This is a file checkout or we have been expliticly asked to do nothing. | ||
sys.exit(0) | ||
|
||
current_branch = subprocess.check_output(['git', 'rev-parse', '--abbrev-ref', 'HEAD']).strip() | ||
with open(path.join('packages', 'haiku-common', 'config', 'experiments.json')) as experiments_file: | ||
experiments = json.load(experiments_file) | ||
current_branch = subprocess.check_output( | ||
['git', 'rev-parse', '--abbrev-ref', 'HEAD']).strip() | ||
with open(os.path.join('packages', 'haiku-common', 'config', 'experiments.json')) as experiments_file: | ||
experiments = json.load(experiments_file) | ||
|
||
if sys.argv[1] != sys.argv[2]: | ||
print 'Syncing dependencies....' | ||
subprocess.call(['yarn', 'install']) | ||
print('Syncing dependencies....') | ||
subprocess.call(['yarn', 'install']) | ||
|
||
print 'The following experiments are enabled:' | ||
print '\n'.join([ | ||
' - {}'.format(experiment) for experiment in experiments if experiments.get(experiment, False) | ||
]) | ||
print('The following experiments are enabled:') | ||
print( | ||
'\n'.join([ | ||
' - {}'.format(experiment) for experiment in experiments if experiments.get(experiment, False) | ||
]) | ||
) |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
#!/usr/bin/env python2.7 | ||
from os import environ | ||
#!/usr/bin/env python | ||
import os | ||
import subprocess | ||
import sys | ||
|
||
if environ.get('SKIP_HAIKU_HOOKS', '0') == '1': | ||
# We have been expliticly asked to do nothing. | ||
sys.exit(0) | ||
if os.environ.get('SKIP_HAIKU_HOOKS', '0') == '1': | ||
# We have been expliticly asked to do nothing. | ||
sys.exit(0) | ||
|
||
print 'Syncing dependencies....' | ||
print('Syncing dependencies....') | ||
subprocess.call(['yarn', 'install']) |