mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Use a checkout hook for qt6 transitions
This commit is contained in:
parent
235b7e38c1
commit
98d18b1f1d
@ -13,7 +13,7 @@ __all__ = [
|
||||
'git_version',
|
||||
'develop', 'install',
|
||||
'kakasi', 'rapydscript', 'cacerts', 'recent_uas', 'resources',
|
||||
'check', 'to6', 'test', 'test_rs',
|
||||
'check', 'test', 'test_rs',
|
||||
'sdist', 'bootstrap', 'extdev',
|
||||
'manual', 'tag_release',
|
||||
'upload_to_server',
|
||||
@ -68,8 +68,6 @@ gui = GUI()
|
||||
|
||||
from setup.check import Check
|
||||
check = Check()
|
||||
from setup.port import To6
|
||||
to6 = To6()
|
||||
|
||||
from setup.test import Test, TestRS
|
||||
test = Test()
|
||||
|
@ -18,6 +18,15 @@ os.chdir(base)
|
||||
|
||||
if flags == '1': # A branch checkout
|
||||
prev_branch, cur_branch = list(map(get_branch_name, (prev_rev, current_rev)))
|
||||
os.chdir(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
|
||||
|
||||
if 'qt6' in (prev_branch, cur_branch):
|
||||
os.rename('bypy/b/other-b', 'bypy/c')
|
||||
os.rename('bypy/b', 'bypy/c/other-b')
|
||||
os.rename('bypy/c', 'bypy/b')
|
||||
subprocess.check_call('./setup.py build --clean'.split())
|
||||
subprocess.check_call('./setup.py gui --clean'.split())
|
||||
subprocess.check_call('./setup.py build'.split())
|
||||
|
||||
subprocess.check_call(['./setup.py', 'gui', '--summary'])
|
||||
|
||||
|
@ -1,29 +0,0 @@
|
||||
#!/usr/bin/env python
|
||||
# vim:fileencoding=utf-8
|
||||
# License: GPL v3 Copyright: 2019, Kovid Goyal <kovid at kovidgoyal.net>
|
||||
|
||||
|
||||
import os
|
||||
import subprocess
|
||||
import sys
|
||||
|
||||
from setup import Command
|
||||
|
||||
|
||||
class To6(Command):
|
||||
|
||||
description = 'Toggle between the Qt6 and master branches building everything needed'
|
||||
|
||||
def ccall(self, *a):
|
||||
self.info(*a)
|
||||
subprocess.check_call(a)
|
||||
|
||||
def run(self, opts):
|
||||
self.ccall('git', 'switch', '-')
|
||||
os.rename('bypy/b/other-b', 'bypy/c')
|
||||
os.rename('bypy/b', 'bypy/c/other-b')
|
||||
os.rename('bypy/c', 'bypy/b')
|
||||
self.ccall(sys.executable, 'setup.py', 'build', '--clean')
|
||||
self.ccall(sys.executable, 'setup.py', 'build')
|
||||
self.ccall(sys.executable, 'setup.py', 'gui', '--clean')
|
||||
self.ccall(sys.executable, 'setup.py', 'gui', '--summary')
|
Loading…
x
Reference in New Issue
Block a user