mirror of
https://github.com/miurahr/aqtinstall.git
synced 2025-12-18 05:04:38 +03:00
- Call PyInstaller directly from builder script - Drop depenency to gravitybee - Change artifact path `dist/` on ci, test and upload scripts - Move standalone builder python script in `tools` - Also add pseudo launcher script in `tools` for PyInstaller - Actions: Update binary build and release scripts - Binary is built on venv that is removed after built - Support not only Windows but also linux/mac - Built on powershell on Windows, bash on others - Clean up duplicated configurations on setup.cfg - Leaves `entry_points` and `package_data` options Signed-off-by: Hiroshi Miura <miurahr@linux.com>
34 lines
893 B
Python
34 lines
893 B
Python
import argparse
|
|
import os
|
|
import PyInstaller.__main__
|
|
|
|
|
|
if __name__ == "__main__":
|
|
parser = argparse.ArgumentParser()
|
|
parser.add_argument("arch", nargs="?")
|
|
args = parser.parse_args()
|
|
|
|
# build PyInstaller arguments
|
|
tools_dir = os.path.dirname(__file__)
|
|
name = "aqt" if args.arch is None else "aqt_" + args.arch
|
|
args = [
|
|
'--noconfirm',
|
|
'--onefile',
|
|
'--name', name,
|
|
'--paths', ".",
|
|
'--hidden-import', "aqt",
|
|
]
|
|
|
|
# Add data files
|
|
if os.name == 'nt':
|
|
adddata_arg = "{src:s};aqt"
|
|
else:
|
|
adddata_arg = "{src:s}:aqt"
|
|
for data in ["aqt/logging.ini", "aqt/settings.ini", "aqt/combinations.json"]:
|
|
args.append('--add-data')
|
|
args.append(adddata_arg.format(src=data))
|
|
args.append(os.path.join(tools_dir, "launch_aqt.py"))
|
|
|
|
# launch PyInstaller
|
|
PyInstaller.__main__.run(args)
|