generated from gaoyang3513/SDK_RK3288
[Mod] First commit
This commit is contained in:
@ -0,0 +1,35 @@
|
||||
From bf9f0d619e2e0a424e471a2f9235d26ece5b348c Mon Sep 17 00:00:00 2001
|
||||
From: "Arnout Vandecappelle (Essensium/Mind)" <arnout@mind.be>
|
||||
Date: Fri, 7 Jan 2022 19:32:18 +0100
|
||||
Subject: [PATCH] pybind11/commands.py: support STAGING_DIR
|
||||
|
||||
In Buildroot, we install build-time python scripts in the host directory
|
||||
(otherwise they can't be run with host python), but when running
|
||||
pybind11 --includes it should return the staging directory.
|
||||
|
||||
Patch commands.py to use the STAGING_DIR environment variable instead of
|
||||
the current directory, if it is set.
|
||||
|
||||
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
|
||||
Upstream-Status: N/A, Buildroot specific
|
||||
Signed-off-by: Guillaume W. Bres <guillaume.bressaix@gmail.com>
|
||||
---
|
||||
pybind11/commands.py | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/pybind11/commands.py b/pybind11/commands.py
|
||||
index a29c8ca..de8a27c 100644
|
||||
--- a/pybind11/commands.py
|
||||
+++ b/pybind11/commands.py
|
||||
@@ -1,6 +1,7 @@
|
||||
import os
|
||||
|
||||
-DIR = os.path.abspath(os.path.dirname(__file__))
|
||||
+DIR = os.environ.get('STAGING_DIR') or \
|
||||
+ os.path.abspath(os.path.dirname(__file__))
|
||||
|
||||
|
||||
def get_include(user: bool = False) -> str: # pylint: disable=unused-argument
|
||||
--
|
||||
2.31.1
|
||||
|
||||
12
package/python-pybind/Config.in
Normal file
12
package/python-pybind/Config.in
Normal file
@ -0,0 +1,12 @@
|
||||
config BR2_PACKAGE_PYTHON_PYBIND
|
||||
bool "python-pybind"
|
||||
depends on BR2_INSTALL_LIBSTDCPP
|
||||
help
|
||||
PyBind is a lightweight header-only library that exposes C++
|
||||
types in Python and vice versa, mainly to create Python
|
||||
bindings of existing C++ code.
|
||||
|
||||
http://pybind11.readthedocs.org/en/master
|
||||
|
||||
comment "python-pybind needs a toolchain w/ C++"
|
||||
depends on !BR2_INSTALL_LIBSTDCPP
|
||||
4
package/python-pybind/python-pybind.hash
Normal file
4
package/python-pybind/python-pybind.hash
Normal file
@ -0,0 +1,4 @@
|
||||
# Locally calculated
|
||||
sha256 eacf582fa8f696227988d08cfc46121770823839fe9e301a20fbce67e7cd70ec python-pybind-2.10.0.tar.gz
|
||||
# License files, locally calculated
|
||||
sha256 83965b843b98f670d3a85bd041ed4b372c8ec50d7b4a5995a83ac697ba675dcb LICENSE
|
||||
28
package/python-pybind/python-pybind.mk
Normal file
28
package/python-pybind/python-pybind.mk
Normal file
@ -0,0 +1,28 @@
|
||||
################################################################################
|
||||
#
|
||||
# python-pybind
|
||||
#
|
||||
################################################################################
|
||||
|
||||
PYTHON_PYBIND_VERSION = 2.10.0
|
||||
PYTHON_PYBIND_SITE = $(call github,pybind,pybind11,v$(PYTHON_PYBIND_VERSION))
|
||||
PYTHON_PYBIND_LICENSE = BSD-3-Clause
|
||||
PYTHON_PYBIND_LICENSE_FILES = LICENSE
|
||||
PYTHON_PYBIND_INSTALL_STAGING = YES
|
||||
PYTHON_PYBIND_INSTALL_TARGET = NO # Header-only library
|
||||
PYTHON_PYBIND_DEPENDENCIES = python3
|
||||
|
||||
PYTHON_PYBIND_CONF_OPTS = \
|
||||
-DPYBIND11_INSTALL=ON \
|
||||
-DPYBIND11_TEST=OFF \
|
||||
-DPYBIND11_NOPYTHON=ON
|
||||
|
||||
PYTHON_PYBIND_INSTALL_PATH = $(HOST_DIR)/lib/python$(PYTHON3_VERSION_MAJOR)/site-packages/pybind11
|
||||
|
||||
define PYTHON_PYBIND_INSTALL_MODULE
|
||||
mkdir -p $(PYTHON_PYBIND_INSTALL_PATH)
|
||||
cp -dpf $(@D)/pybind11/*.py $(PYTHON_PYBIND_INSTALL_PATH)
|
||||
endef
|
||||
PYTHON_PYBIND_POST_INSTALL_STAGING_HOOKS += PYTHON_PYBIND_INSTALL_MODULE
|
||||
|
||||
$(eval $(cmake-package))
|
||||
Reference in New Issue
Block a user