From 1c41a13a7c00c5432351e33355961ffd1bd0193f Mon Sep 17 00:00:00 2001 From: Ghislain MARY Date: Mon, 19 Oct 2015 10:06:41 +0200 Subject: [PATCH] Add option to prepare.py to build Python module for Raspeberry PI. --- prepare.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/prepare.py b/prepare.py index 7f3a61391..e47fcc711 100755 --- a/prepare.py +++ b/prepare.py @@ -66,6 +66,18 @@ class PythonTarget(prepare.Target): current_path + '/submodules' ] +class PythonRaspberryTarget(prepare.Target): + + def __init__(self): + prepare.Target.__init__(self, '') + self.required_build_platforms = ['Linux'] + self.config_file = 'configs/config-python-raspberry.cmake' + self.toolchain_file = 'toolchains/toolchain-raspberry.cmake' + self.additional_args = [ + '-DLINPHONE_BUILDER_EXTERNAL_SOURCE_PATH=' + + current_path + '/submodules' + ] + def check_is_installed(binary, prog=None, warn=True): if not find_executable(binary): @@ -150,6 +162,8 @@ def main(argv=None): '-os', '--only-submodules', help="Build only submodules (finding all dependencies on the system.", action='store_true') argparser.add_argument( '--python', help="Build Python module instead of desktop application.", action='store_true') + argparser.add_argument( + '--python-raspberry', help="Build Python module for raspberry pi instead of desktop application.", action='store_true') argparser.add_argument( '-t', '--tunnel', help="Enable Tunnel.", action='store_true') @@ -210,6 +224,8 @@ def main(argv=None): target = None if args.python: target = PythonTarget() + elif args.python_raspberry: + target = PythonRaspberryTarget() else: target = DesktopTarget() if args.clean: