File tree Expand file tree Collapse file tree 2 files changed +11
-4
lines changed Expand file tree Collapse file tree 2 files changed +11
-4
lines changed Original file line number Diff line number Diff line change 88import subprocess
99import sys
1010import tarfile
11+ import shutil
1112from urllib .request import urlopen
1213
1314is_bundle = os .environ .get ('KITTY_BUNDLE' ) == '1'
@@ -43,7 +44,7 @@ def install_deps():
4344
4445
4546def build_kitty ():
46- python = 'python3' if is_bundle else sys .executable
47+ python = shutil . which ( 'python3' ) if is_bundle else sys .executable
4748 cmd = '{} setup.py build --verbose' .format (python )
4849 if os .environ .get ('KITTY_SANITIZE' ) == '1' :
4950 cmd += ' --debug --sanitize'
@@ -85,8 +86,8 @@ def install_bundle():
8586 cwd = os .getcwd ()
8687 os .makedirs (SW )
8788 os .chdir (SW )
88- with urlopen ('https://download.calibre-ebook.com/travis /kitty/{}.tar.xz' .format (
89- 'osx ' if is_macos else 'linux-64 ' )) as f :
89+ with urlopen ('https://download.calibre-ebook.com/ci /kitty/{}-64 .tar.xz' .format (
90+ 'macos ' if is_macos else 'linux' )) as f :
9091 data = f .read ()
9192 with tarfile .open (fileobj = io .BytesIO (data ), mode = 'r:xz' ) as tf :
9293 tf .extractall ()
Original file line number Diff line number Diff line change @@ -1045,7 +1045,7 @@ def option_parser() -> argparse.ArgumentParser: # {{{
10451045 'action' ,
10461046 nargs = '?' ,
10471047 default = Options .action ,
1048- choices = 'build test linux-package kitty.app linux-freeze macos-freeze build-launcher clean' .split (),
1048+ choices = 'build test linux-package kitty.app linux-freeze macos-freeze build-launcher clean export-ci-bundles ' .split (),
10491049 help = 'Action to perform (default is build)'
10501050 )
10511051 p .add_argument (
@@ -1180,6 +1180,12 @@ def main() -> None:
11801180 build (args )
11811181 package (args , bundle_type = 'macos-package' )
11821182 print ('kitty.app successfully built!' )
1183+ elif args .action == 'export-ci-bundles' :
1184+ cmd = [sys .executable , '../bypy' , 'export' ]
1185+ dest = ['download.calibre-ebook.com:/srv/download/ci/kitty' ]
1186+ subprocess .check_call (cmd + ['linux' ] + dest )
1187+ subprocess .check_call (cmd + ['macos' ] + dest )
1188+ subprocess .check_call (cmd + ['linux' , '32' ] + dest )
11831189
11841190
11851191if __name__ == '__main__' :
You can’t perform that action at this time.
0 commit comments