diff --git a/.github/workflows/translations.yml b/.github/workflows/translations.yml index d075a75b18..1df3e1bf01 100644 --- a/.github/workflows/translations.yml +++ b/.github/workflows/translations.yml @@ -19,16 +19,9 @@ jobs: with: python-version: 3.8 - - name: Install calibre dependencies - run: - python setup/unix-ci.py install - - name: Install translations dependencies run: - python -m pip install -U transifex-client sphinx msgpack - - - name: Bootstrap calibre - run: python setup/unix-ci.py bootstrap + python -m pip install -U transifex-client sphinx - name: Update translations env: diff --git a/setup/unix-ci.py b/setup/unix-ci.py index a6063fc30b..3c929b18e0 100644 --- a/setup/unix-ci.py +++ b/setup/unix-ci.py @@ -83,6 +83,14 @@ def download_and_decompress(url, dest, compression=None): raise SystemExit('Failed to download ' + url) +def install_calibre_binary(): + dest = os.path.expanduser('~/calibre-bin') + os.mkdir(dest) + # change this to the canonical download url once 5.0 is released + download_and_decompress('https://download.calibre-ebook.com/calibre-4.99.12-x86_64.txz', dest, 'J') + return os.path.join(dest, 'calibre-debug') + + def run_python(*args): python = os.path.expandvars('$SW/bin/python') if len(args) == 1: @@ -115,7 +123,6 @@ def main(): run_python('setup.py bootstrap --ephemeral') elif action == 'pot': - install_env() transifexrc = '''\ [https://www.transifex.com] api_hostname = https://api.transifex.com @@ -125,7 +132,8 @@ username = api '''.replace('PASSWORD', os.environ['tx']) with open(os.path.expanduser('~/.transifexrc'), 'w') as f: f.write(transifexrc) - run_python('setup.py pot') + interpreter = install_calibre_binary() + run(interpreter, 'setup.py', 'pot') elif action == 'test': os.environ['CI'] = 'true'