build_release: Add basic OS X build
This commit is contained in:
parent
bfb4f20510
commit
ae41a074e8
@ -50,17 +50,18 @@ def call_script(name, *args, python=sys.executable):
|
|||||||
subprocess.check_call([python, path] + list(args))
|
subprocess.check_call([python, path] + list(args))
|
||||||
|
|
||||||
|
|
||||||
def call_freeze(*args, python=sys.executable):
|
def call_tox(toxenv, *args, python=sys.executable):
|
||||||
"""Call freeze.py via tox.
|
"""Call tox.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
|
toxenv: Which tox environment to use
|
||||||
*args: The arguments to pass.
|
*args: The arguments to pass.
|
||||||
python: The python interpreter to use.
|
python: The python interpreter to use.
|
||||||
"""
|
"""
|
||||||
env = os.environ.copy()
|
env = os.environ.copy()
|
||||||
env['PYTHON'] = python
|
env['PYTHON'] = python
|
||||||
subprocess.check_call(
|
subprocess.check_call(
|
||||||
[sys.executable, '-m', 'tox', '-e', 'cxfreeze-windows'] + list(args),
|
[sys.executable, '-m', 'tox', '-e', toxenv] + list(args),
|
||||||
env=env)
|
env=env)
|
||||||
|
|
||||||
|
|
||||||
@ -88,6 +89,12 @@ def smoke_test(executable):
|
|||||||
'--temp-basedir', 'about:blank', ':later 500 quit'])
|
'--temp-basedir', 'about:blank', ':later 500 quit'])
|
||||||
|
|
||||||
|
|
||||||
|
def build_osx():
|
||||||
|
"""Build OS X .dmg/.app."""
|
||||||
|
utils.print_title("Building .app via pyinstaller")
|
||||||
|
call_tox('pyinstaller')
|
||||||
|
|
||||||
|
|
||||||
def build_windows():
|
def build_windows():
|
||||||
"""Build windows executables/setups."""
|
"""Build windows executables/setups."""
|
||||||
utils.print_title("Updating 3rdparty content")
|
utils.print_title("Updating 3rdparty content")
|
||||||
@ -101,13 +108,13 @@ def build_windows():
|
|||||||
python_x64 = r'C:\Python{}'.format(ver)
|
python_x64 = r'C:\Python{}'.format(ver)
|
||||||
|
|
||||||
utils.print_title("Running 32bit freeze.py build_exe")
|
utils.print_title("Running 32bit freeze.py build_exe")
|
||||||
call_freeze('build_exe', python=python_x86)
|
call_tox('cxfreeze-windows', 'build_exe', python=python_x86)
|
||||||
utils.print_title("Running 32bit freeze.py bdist_msi")
|
utils.print_title("Running 32bit freeze.py bdist_msi")
|
||||||
call_freeze('bdist_msi', python=python_x86)
|
call_tox('cxfreeze-windows', 'bdist_msi', python=python_x86)
|
||||||
utils.print_title("Running 64bit freeze.py build_exe")
|
utils.print_title("Running 64bit freeze.py build_exe")
|
||||||
call_freeze('build_exe', python=python_x64)
|
call_tox('cxfreeze-windows', 'build_exe', python=python_x64)
|
||||||
utils.print_title("Running 64bit freeze.py bdist_msi")
|
utils.print_title("Running 64bit freeze.py bdist_msi")
|
||||||
call_freeze('bdist_msi', python=python_x64)
|
call_tox('cxfreeze-windows', 'bdist_msi', python=python_x64)
|
||||||
|
|
||||||
utils.print_title("Running 32bit smoke test")
|
utils.print_title("Running 32bit smoke test")
|
||||||
smoke_test('build/exe.win32-{}/qutebrowser.exe'.format(dotver))
|
smoke_test('build/exe.win32-{}/qutebrowser.exe'.format(dotver))
|
||||||
@ -201,6 +208,8 @@ def main():
|
|||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
run_asciidoc2html(args)
|
run_asciidoc2html(args)
|
||||||
build_windows()
|
build_windows()
|
||||||
|
elif sys.platform == 'darwin':
|
||||||
|
build_osx()
|
||||||
else:
|
else:
|
||||||
build_sdist()
|
build_sdist()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user