summaryrefslogtreecommitdiffstats
path: root/rules/host-system-python.make
blob: 84be5b2dde2ee4c1675204ad316e06a4b343a2ef (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# -*-makefile-*-
#
# Copyright (C) 2013 by Michael Olbrich <m.olbrich@pengutronix.de>
#
# See CREDITS for details about who has contributed to this project.
#
# For further information about the PTXdist project and license conditions
# see the README file.
#

#
# We provide this package
#
PACKAGES-$(PTXCONF_HOST_SYSTEM_PYTHON) += host-system-python

# ----------------------------------------------------------------------------
# Prepare
# ----------------------------------------------------------------------------

$(STATEDIR)/host-system-python.prepare:
	@$(call targetinfo)
	@echo "Checking for Python ..."
	@python -V >/dev/null 2>&1 || \
		ptxd_bailout "'python' not found! Please install.";
ifdef PTXCONF_HOST_SYSTEM_PYTHON_XML2
	@echo "Checking for Python libxml2 bindings ..."
	@python -c 'import libxml2' 2>/dev/null || \
		ptxd_bailout "Python libxml2 module not found! \
	Please install python-libxml2 (debian)";
endif
ifdef PTXCONF_HOST_SYSTEM_PYTHON_ARGPARSE
	@echo "Checking for Python argparse ..."
	@python -c 'import argparse' 2>/dev/null || \
		ptxd_bailout "Python argparse module not found! \
	Please install python-argparse (debian)";
endif
ifdef PTXCONF_HOST_SYSTEM_PYTHON_BZ2
	@echo "Checking for Python bz2 ..."
	@python -c 'import bz2' 2>/dev/null || \
		ptxd_bailout "Python bz2 module not found! \
	Please install python-bz2";
endif
	@echo
	@$(call touch)

# vim: syntax=make