You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

37 lines
1.2 KiB

  1. From 54484e79aca0981ebc42ddc68487e6531da9b59d Mon Sep 17 00:00:00 2001
  2. From: Yousong Zhou <yszhou4tech@gmail.com>
  3. Date: Fri, 20 Mar 2020 15:11:31 +0800
  4. Subject: [PATCH] python: separate host/target python for cross-compile
  5. Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
  6. ---
  7. Makefile.am | 2 +-
  8. m4/openvswitch.m4 | 2 ++
  9. 2 files changed, 3 insertions(+), 1 deletion(-)
  10. diff --git a/Makefile.am b/Makefile.am
  11. index 27ef9e4b4..7effb5fec 100644
  12. --- a/Makefile.am
  13. +++ b/Makefile.am
  14. @@ -60,7 +60,7 @@ endif
  15. # foo/__init__.pyc will cause Python to ignore foo.py.
  16. run_python = \
  17. PYTHONPATH=$(top_srcdir)/python$(psep)$$PYTHONPATH \
  18. - PYTHONDONTWRITEBYTECODE=yes $(PYTHON3)
  19. + PYTHONDONTWRITEBYTECODE=yes $(PYTHON3_HOST)
  20. ALL_LOCAL =
  21. BUILT_SOURCES =
  22. diff --git a/m4/openvswitch.m4 b/m4/openvswitch.m4
  23. index 6fe79297e..f2e0169f8 100644
  24. --- a/m4/openvswitch.m4
  25. +++ b/m4/openvswitch.m4
  26. @@ -383,6 +383,8 @@ else:
  27. AC_MSG_ERROR([Python 3.4 or later is required but not found in $PATH, please install it or set $PYTHON3 to point to it])
  28. fi
  29. AC_ARG_VAR([PYTHON3])
  30. + PYTHON3_HOST=$ovs_cv_python3_host
  31. + AM_MISSING_PROG([PYTHON3_HOST], [python3])
  32. PYTHON3=$ovs_cv_python3])
  33. dnl Checks for flake8.