aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Gibson <david@gibson.dropbear.id.au>2017-09-27 18:10:02 +1000
committerDavid Gibson <david@gibson.dropbear.id.au>2017-09-27 18:10:02 +1000
commit8c1eb1526d2d02f34bfe6f94dacba60834ae9f79 (patch)
tree5b7cc2df149633d4cc3dddee12c1ae9183dfb013
parentee3d26f6960bb5922d9a35fe266d9eac74a78ec0 (diff)
downloaddtc-8c1eb1526d2d02f34bfe6f94dacba60834ae9f79.zip
dtc-8c1eb1526d2d02f34bfe6f94dacba60834ae9f79.tar.gz
dtc-8c1eb1526d2d02f34bfe6f94dacba60834ae9f79.tar.bz2
pylibfdt: Use Python2 explicitly
The pylibfdt code is written for Python2, not Python3. So, it's safer to explicitly request Python2 in our scripts and when checking pkg-config. On Arch Linux at least, there isn't actually a plain "python" link, just "python2" and "python3", so the current setup won't work at all. According to https://www.python.org/dev/peps/pep-0394/ using "python2" should work, and is preferred. Updating pylibfdt to work with Python3 would be nice, but is a problem for another day. Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
-rw-r--r--Makefile2
-rwxr-xr-xpylibfdt/setup.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index fe482b9..782a085 100644
--- a/Makefile
+++ b/Makefile
@@ -129,7 +129,7 @@ all: $(BIN) libfdt
# We need both Python and swig to build pylibfdt.
.PHONY: maybe_pylibfdt
maybe_pylibfdt: FORCE
- if $(PKG_CONFIG) --cflags python >/dev/null 2>&1; then \
+ if $(PKG_CONFIG) --cflags python2 >/dev/null 2>&1; then \
if which swig >/dev/null 2>&1; then \
can_build=yes; \
fi; \
diff --git a/pylibfdt/setup.py b/pylibfdt/setup.py
index 90e80f3..1a1e832 100755
--- a/pylibfdt/setup.py
+++ b/pylibfdt/setup.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python2
"""
setup.py file for SWIG libfdt