mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Use a prebuilt calibre binary to build POT
This commit is contained in:
parent
a6b4ceff58
commit
15e5f5987a
9
.github/workflows/translations.yml
vendored
9
.github/workflows/translations.yml
vendored
@ -19,16 +19,9 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
python-version: 3.8
|
python-version: 3.8
|
||||||
|
|
||||||
- name: Install calibre dependencies
|
|
||||||
run:
|
|
||||||
python setup/unix-ci.py install
|
|
||||||
|
|
||||||
- name: Install translations dependencies
|
- name: Install translations dependencies
|
||||||
run:
|
run:
|
||||||
python -m pip install -U transifex-client sphinx msgpack
|
python -m pip install -U transifex-client sphinx
|
||||||
|
|
||||||
- name: Bootstrap calibre
|
|
||||||
run: python setup/unix-ci.py bootstrap
|
|
||||||
|
|
||||||
- name: Update translations
|
- name: Update translations
|
||||||
env:
|
env:
|
||||||
|
@ -83,6 +83,14 @@ def download_and_decompress(url, dest, compression=None):
|
|||||||
raise SystemExit('Failed to download ' + url)
|
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):
|
def run_python(*args):
|
||||||
python = os.path.expandvars('$SW/bin/python')
|
python = os.path.expandvars('$SW/bin/python')
|
||||||
if len(args) == 1:
|
if len(args) == 1:
|
||||||
@ -115,7 +123,6 @@ def main():
|
|||||||
run_python('setup.py bootstrap --ephemeral')
|
run_python('setup.py bootstrap --ephemeral')
|
||||||
|
|
||||||
elif action == 'pot':
|
elif action == 'pot':
|
||||||
install_env()
|
|
||||||
transifexrc = '''\
|
transifexrc = '''\
|
||||||
[https://www.transifex.com]
|
[https://www.transifex.com]
|
||||||
api_hostname = https://api.transifex.com
|
api_hostname = https://api.transifex.com
|
||||||
@ -125,7 +132,8 @@ username = api
|
|||||||
'''.replace('PASSWORD', os.environ['tx'])
|
'''.replace('PASSWORD', os.environ['tx'])
|
||||||
with open(os.path.expanduser('~/.transifexrc'), 'w') as f:
|
with open(os.path.expanduser('~/.transifexrc'), 'w') as f:
|
||||||
f.write(transifexrc)
|
f.write(transifexrc)
|
||||||
run_python('setup.py pot')
|
interpreter = install_calibre_binary()
|
||||||
|
run(interpreter, 'setup.py', 'pot')
|
||||||
|
|
||||||
elif action == 'test':
|
elif action == 'test':
|
||||||
os.environ['CI'] = 'true'
|
os.environ['CI'] = 'true'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user