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.

41 lines
1.3 KiB

  1. From e2d9b5d6fc33d7b9cbb7dc16832c5c86e6470966 Mon Sep 17 00:00:00 2001
  2. From: Yousong Zhou <zhouyousong@yunionyun.com>
  3. Date: Tue, 21 Aug 2018 12:21:05 +0000
  4. Subject: [PATCH 2/4] python: separate host/target python for cross-compile
  5. At the moment, python-six is a requirement for openvswitch python
  6. library on target machine.
  7. Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
  8. ---
  9. Makefile.am | 2 +-
  10. m4/openvswitch.m4 | 2 ++
  11. 2 files changed, 3 insertions(+), 1 deletion(-)
  12. diff --git a/Makefile.am b/Makefile.am
  13. index ff1f94b48..417f53230 100644
  14. --- a/Makefile.am
  15. +++ b/Makefile.am
  16. @@ -60,7 +60,7 @@ endif
  17. # foo/__init__.pyc will cause Python to ignore foo.py.
  18. run_python = \
  19. PYTHONPATH=$(top_srcdir)/python$(psep)$$PYTHONPATH \
  20. - PYTHONDONTWRITEBYTECODE=yes $(PYTHON)
  21. + PYTHONDONTWRITEBYTECODE=yes $(PYTHON_HOST)
  22. ALL_LOCAL =
  23. BUILT_SOURCES =
  24. diff --git a/m4/openvswitch.m4 b/m4/openvswitch.m4
  25. index cd6b51d86..6dc9d630b 100644
  26. --- a/m4/openvswitch.m4
  27. +++ b/m4/openvswitch.m4
  28. @@ -456,7 +456,9 @@ AC_DEFUN([OVS_CHECK_PYTHON],
  29. fi])
  30. AC_SUBST([PYTHON])
  31. PYTHON=$ovs_cv_python
  32. + PYTHON_HOST=$ovs_cv_python_host
  33. AC_SUBST([HAVE_PYTHON])
  34. + AM_MISSING_PROG([PYTHON_HOST], [python])
  35. HAVE_PYTHON=yes
  36. AM_CONDITIONAL([HAVE_PYTHON], [test "$HAVE_PYTHON" = yes])])