From 7253b7da10a2aab72b451d4239c38de6ba0901c8 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Fri, 17 Dec 2021 08:07:14 +0530 Subject: [PATCH] Command to build linux ARM intaller --- setup/commands.py | 6 +++--- setup/installers.py | 17 ++++++++++++----- 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/setup/commands.py b/setup/commands.py index b095e31024..84c8eb634b 100644 --- a/setup/commands.py +++ b/setup/commands.py @@ -19,12 +19,12 @@ __all__ = [ 'upload_installers', 'upload_user_manual', 'upload_demo', 'reupload', 'stage1', 'stage2', 'stage3', 'stage4', 'stage5', 'publish', 'publish_betas', - 'linux', 'linux32', 'linux64', 'win', 'win32', 'win64', 'osx', 'build_dep', + 'linux', 'linux32', 'linux64', 'linuxarm64', 'win', 'win32', 'win64', 'osx', 'build_dep', 'export_packages', 'hyphenation', 'liberation_fonts', 'csslint' ] -from setup.installers import Linux, Win, OSX, Linux32, Linux64, Win32, Win64, ExtDev, BuildDep, ExportPackages -linux, linux32, linux64 = Linux(), Linux32(), Linux64() +from setup.installers import Linux, Win, OSX, Linux32, Linux64, LinuxArm64, Win32, Win64, ExtDev, BuildDep, ExportPackages +linux, linux32, linux64, linuxarm64 = Linux(), Linux32(), Linux64(), LinuxArm64() win, win32, win64 = Win(), Win32(), Win64() osx = OSX() extdev = ExtDev() diff --git a/setup/installers.py b/setup/installers.py index 6b6ab9b9f3..28058a73f6 100644 --- a/setup/installers.py +++ b/setup/installers.py @@ -140,24 +140,30 @@ class BuildInstaller(Command): class BuildInstallers(BuildInstaller): OS = '' + ALL_ARCHES = '64', '32' def run(self, opts): - bits = '64 32'.split() - for bitness in bits: - shutdown = bitness is bits[-1] and not opts.dont_shutdown + for bitness in self.ALL_ARCHES: + shutdown = bitness is self.ALL_ARCHES[-1] and not opts.dont_shutdown build_single(self.OS, bitness, shutdown) class Linux32(BuildInstaller): OS = 'linux' BITNESS = '32' - description = 'Build the 32-bit linux calibre installer' + description = 'Build the 32-bit Linux calibre installer' class Linux64(BuildInstaller): OS = 'linux' BITNESS = '64' - description = 'Build the 64-bit linux calibre installer' + description = 'Build the 64-bit Linux calibre installer' + + +class LinuxArm64(BuildInstaller): + OS = 'linux' + BITNESS = 'arm64' + description = 'Build the 64-bit ARM Linux calibre installer' class Win32(BuildInstaller): @@ -178,6 +184,7 @@ class OSX(BuildInstaller): class Linux(BuildInstallers): OS = 'linux' + ALL_ARCHES = '64', '32', 'arm64' class Win(BuildInstallers):