Add option to prepare.py to build Python module for Raspeberry PI.

This commit is contained in:
Ghislain MARY 2015-10-19 10:06:41 +02:00
parent 214881cc6e
commit 1c41a13a7c

View file

@ -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: