@@ -388,7 +388,7 @@ def clone(self) -> bool:
388
388
return False # Already cloned
389
389
logging .info ("Cloning %s into %s" , self .remote , self .directory )
390
390
self .directory .mkdir (mode = 0o775 , parents = True , exist_ok = True )
391
- run ([ "git" , "clone" , self .remote , self .directory ] )
391
+ run (( "git" , "clone" , self .remote , self .directory ) )
392
392
return True
393
393
394
394
def update (self ) -> None :
@@ -481,15 +481,15 @@ def version_info() -> None:
481
481
"""Handler for --version."""
482
482
try :
483
483
platex_version = head (
484
- subprocess .check_output ([ "platex" , "--version" ] , text = True ),
484
+ subprocess .check_output (( "platex" , "--version" ) , text = True ),
485
485
lines = 3 ,
486
486
)
487
487
except FileNotFoundError :
488
488
platex_version = "Not installed."
489
489
490
490
try :
491
491
xelatex_version = head (
492
- subprocess .check_output ([ "xelatex" , "--version" ] , text = True ),
492
+ subprocess .check_output (( "xelatex" , "--version" ) , text = True ),
493
493
lines = 2 ,
494
494
)
495
495
except FileNotFoundError :
@@ -652,7 +652,7 @@ def build(self) -> None:
652
652
(self .checkout / "Doc" / "Makefile" ).write_text (text , encoding = "utf-8" )
653
653
654
654
self .setup_indexsidebar ()
655
- run_with_logging ([
655
+ run_with_logging ((
656
656
"make" ,
657
657
"-C" ,
658
658
self .checkout / "Doc" ,
@@ -663,7 +663,7 @@ def build(self) -> None:
663
663
f"SPHINXOPTS={ ' ' .join (sphinxopts )} " ,
664
664
"SPHINXERRORHANDLING=" ,
665
665
maketarget ,
666
- ] )
666
+ ) )
667
667
self .log_directory .mkdir (parents = True , exist_ok = True )
668
668
chgrp (self .log_directory , group = self .group , recursive = True )
669
669
if self .includes_html :
@@ -678,20 +678,27 @@ def build_venv(self) -> None:
678
678
So we can reuse them from builds to builds, while they contain
679
679
different Sphinx versions.
680
680
"""
681
- requirements = [ self .theme ] + self . version .requirements
681
+ requirements = list ( self .version .requirements )
682
682
if self .includes_html :
683
683
# opengraph previews
684
684
requirements .append ("matplotlib>=3" )
685
685
686
686
venv_path = self .build_root / f"venv-{ self .version .name } "
687
687
venv .create (venv_path , symlinks = os .name != "nt" , with_pip = True )
688
688
run (
689
- [venv_path / "bin" / "python" , "-m" , "pip" , "install" , "--upgrade" ]
690
- + ["--upgrade-strategy=eager" ]
691
- + requirements ,
689
+ (
690
+ venv_path / "bin" / "python" ,
691
+ "-m" ,
692
+ "pip" ,
693
+ "install" ,
694
+ "--upgrade" ,
695
+ "--upgrade-strategy=eager" ,
696
+ self .theme ,
697
+ * requirements ,
698
+ ),
692
699
cwd = self .checkout / "Doc" ,
693
700
)
694
- run ([ venv_path / "bin" / "python" , "-m" , "pip" , "freeze" , "--all" ] )
701
+ run (( venv_path / "bin" / "python" , "-m" , "pip" , "freeze" , "--all" ) )
695
702
self .venv = venv_path
696
703
697
704
def setup_indexsidebar (self ) -> None :
@@ -738,15 +745,15 @@ def copy_build_to_webroot(self, http: urllib3.PoolManager) -> None:
738
745
recursive = True ,
739
746
)
740
747
chmod_make_readable (self .checkout / "Doc" / "build" / "html" )
741
- run ([
748
+ run ((
742
749
"rsync" ,
743
750
"-a" ,
744
751
"--delete-delay" ,
745
752
"--filter" ,
746
753
"P archives/" ,
747
754
str (self .checkout / "Doc" / "build" / "html" ) + "/" ,
748
755
target ,
749
- ] )
756
+ ) )
750
757
751
758
dist_dir = self .checkout / "Doc" / "dist"
752
759
if dist_dir .is_dir ():
0 commit comments