From 69291f7a5dfc3747ecd4f9c0d2d3b5915285ee60 Mon Sep 17 00:00:00 2001 From: Ovidiu Panait Date: Tue, 3 Mar 2020 21:40:52 +0200 Subject: bcc: inherit python3native Use python3-native rather than the version provided by the build host. Signed-off-by: Ovidiu Panait --- ...eLists.txt-Remove-check-for-host-etc-debi.patch | 40 ++++++++++++++++++++++ recipes-devtools/bcc/bcc_0.13.0.bb | 10 +++--- 2 files changed, 46 insertions(+), 4 deletions(-) create mode 100644 recipes-devtools/bcc/bcc/0001-python-CMakeLists.txt-Remove-check-for-host-etc-debi.patch diff --git a/recipes-devtools/bcc/bcc/0001-python-CMakeLists.txt-Remove-check-for-host-etc-debi.patch b/recipes-devtools/bcc/bcc/0001-python-CMakeLists.txt-Remove-check-for-host-etc-debi.patch new file mode 100644 index 0000000..4d71b15 --- /dev/null +++ b/recipes-devtools/bcc/bcc/0001-python-CMakeLists.txt-Remove-check-for-host-etc-debi.patch @@ -0,0 +1,40 @@ +From cb3f032b55b32c50201862b26c76ea18ad37cb39 Mon Sep 17 00:00:00 2001 +From: Ovidiu Panait +Date: Thu, 30 Jan 2020 14:19:33 +0200 +Subject: [PATCH] python/CMakeLists.txt: Remove check for host + /etc/debian_version + +Fix the following error that occurs during do_install when using the native +version of python3: +usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...] + or: setup.py --help [cmd1 cmd2 ...] + or: setup.py --help-commands + or: setup.py cmd --help + +error: option --install-layout not recognized + +Upstream-status: Innapropriate [oe-specific] + +Signed-off-by: Ovidiu Panait +--- + src/python/CMakeLists.txt | 4 ---- + 1 file changed, 4 deletions(-) + +diff --git a/src/python/CMakeLists.txt b/src/python/CMakeLists.txt +index fa602397..797e0d14 100644 +--- a/src/python/CMakeLists.txt ++++ b/src/python/CMakeLists.txt +@@ -5,10 +5,6 @@ if(NOT PYTHON_CMD) + set(PYTHON_CMD "python") + endif() + +-if(EXISTS "/etc/debian_version") +- set(PYTHON_FLAGS "${PYTHON_FLAGS} --install-layout deb") +-endif() +- + file(GLOB_RECURSE PYTHON_SOURCES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_CURRENT_SOURCE_DIR}/*.py) + file(GLOB_RECURSE PYTHON_INCLUDES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} +-- +2.17.1 + diff --git a/recipes-devtools/bcc/bcc_0.13.0.bb b/recipes-devtools/bcc/bcc_0.13.0.bb index c5aeb29..058baa3 100644 --- a/recipes-devtools/bcc/bcc_0.13.0.bb +++ b/recipes-devtools/bcc/bcc_0.13.0.bb @@ -3,6 +3,8 @@ HOMEPAGE = "https://github.com/iovisor/bcc" LICENSE = "Apache-2.0" LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=e3fc50a88d0a364313df4b21ef20c29e" +inherit cmake python3native + DEPENDS += "bison-native \ ninja-native \ elfutils-native \ @@ -17,20 +19,20 @@ DEPENDS += "bison-native \ RDEPENDS_${PN} += "bash python3 python3-core" SRC_URI = "git://github.com/iovisor/bcc \ + file://0001-python-CMakeLists.txt-Remove-check-for-host-etc-debi.patch \ " + SRCREV = "942227484d3207f6a42103674001ef01fb5335a0" S = "${WORKDIR}/git" -inherit cmake - EXTRA_OECMAKE = " \ -DCMAKE_INSTALL_PREFIX=/usr \ -DENABLE_LLVM_SHARED=ON \ -DENABLE_CLANG_JIT=ON \ -DENABLE_MAN=OFF \ -DLLVM_PACKAGE_VERSION=${LLVMVERSION} \ - -DPYTHON_CMD=python3 \ + -DPYTHON_CMD=${PYTHON} \ " do_install_append() { @@ -38,6 +40,6 @@ do_install_append() { -i $(find ${D}${datadir}/${PN} -type f) } -FILES_${PN} += "${libdir}/python*/dist-packages" +FILES_${PN} += "${PYTHON_SITEPACKAGES_DIR}" COMPATIBLE_HOST = "(x86_64.*|aarch64.*|powerpc64.*)-linux" -- cgit v1.2.3-54-g00ecf