Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit9eb4e1a

Browse files
committed
Use different cpython clones to build different languages.Fixes#35
This tries to fixhttps://bugs.python.org/issue31584 and can't hurt,anyway the cron could have started (or would have ended up gettingstarted, after adding some languages) before the previous run wascomplete.
1 parentcfa977f commit9eb4e1a

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

‎build_docs.py‎

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,10 @@
3939

4040

4141
BRANCHES= [
42-
# version, isdev
43-
(3.6,False),
44-
(3.7,True),
45-
(2.7,False)
42+
# version,git branch,isdev
43+
(3.6,'3.6',False),
44+
(3.7,'master',True),
45+
(2.7,'2.7',False)
4646
]
4747

4848
LANGUAGES= [
@@ -151,12 +151,14 @@ def translation_branch(locale_repo, locale_clone_dir, needed_version):
151151
returnsorted(translated_branches,key=lambdax:abs(needed_version-x))[0]
152152

153153

154-
defbuild_one(version,isdev,quick,venv,build_root,www_root,
154+
defbuild_one(version,git_branch,isdev,quick,venv,build_root,www_root,
155155
skip_cache_invalidation=False,group='docs',
156156
log_directory='/var/log/docsbuild/',language=None):
157157
ifnotlanguage:
158158
language='en'
159-
checkout=build_root+"/python"+str(version).replace('.','')
159+
checkout=os.path.join(build_root,'python{version}{lang}'.format(
160+
version=str(version).replace('.',''),
161+
lang=languageiflanguage!='en'else''))
160162
logging.info("Build start for version: %s, language: %s",
161163
str(version),language)
162164
sphinxopts=''
@@ -187,11 +189,9 @@ def build_one(version, isdev, quick, venv, build_root, www_root,
187189
except (PermissionError,subprocess.CalledProcessError)aserr:
188190
logging.warning("Can't change mod or group of %s: %s",
189191
target,str(err))
192+
git_clone('https://github.com/python/cpython.git',
193+
checkout,git_branch)
190194
os.chdir(checkout)
191-
192-
logging.info("Updating checkout")
193-
shell_out("git reset --hard HEAD")
194-
shell_out("git pull --ff-only")
195195
maketarget="autobuild-"+ ("dev"ifisdevelse"stable")+ ("-html"ifquickelse"")
196196
logging.info("Running make %s",maketarget)
197197
logname="{}-{}.log".format(os.path.basename(checkout),language)
@@ -309,18 +309,18 @@ def main():
309309
logging.root.setLevel(logging.DEBUG)
310310
venv=os.path.join(args.build_root,"venv")
311311
ifargs.branch:
312-
branches_to_do= [(args.branch,args.devel)]
312+
branches_to_do= [(args.branch,args.branch,args.devel)]
313313
else:
314314
branches_to_do=BRANCHES
315315
ifnotargs.languages:
316316
# Allow "--languages" to build all languages (as if not given)
317317
# instead of none. "--languages en" builds *no* translation,
318318
# as "en" is the untranslated one.
319319
args.languages=LANGUAGES
320-
forversion,develinbranches_to_do:
320+
forversion,git_branch,develinbranches_to_do:
321321
forlanguageinargs.languages:
322322
try:
323-
build_one(version,devel,args.quick,venv,
323+
build_one(version,git_branch,devel,args.quick,venv,
324324
args.build_root,args.www_root,
325325
args.skip_cache_invalidation,args.group,
326326
args.log_directory,language)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp