Skip to content

Commit e063a97

Browse files
committed
keep cpython repo up to date
1 parent ea28baf commit e063a97

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

build.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,14 @@ def shell(cmd, capture=False, chdir=None):
2626

2727

2828
def git_clone(repository, directory, branch=None):
29-
shell("git clone --depth 1 --no-single-branch {} {}".format(repository, directory))
29+
if not os.path.exists(directory):
30+
shell("git clone --depth 1 --no-single-branch {} {}".format(repository, directory))
3031
if branch:
3132
shell("git -C {} checkout {}".format(directory, branch))
32-
33+
shell("git -C {} pull".format(directory))
3334

3435
def prepare_env():
35-
if not os.path.exists('cpython'):
36-
git_clone('https://github.com/python/cpython.git', 'cpython', VERSION)
36+
git_clone('https://github.com/python/cpython.git', 'cpython', VERSION)
3737

3838
locale_dir = os.path.join('cpython', 'locale', 'ko', 'LC_MESSAGES')
3939
if not os.path.exists(locale_dir):

0 commit comments

Comments
 (0)