Initial Commit

- initial default booting image
This commit is contained in:
2026-11-06 20:45:42 +01:00
commit b8783708ae
15201 changed files with 602532 additions and 0 deletions

View File

@@ -0,0 +1,36 @@
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
@@ -2,7 +2,8 @@ from __future__ import annotations
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: # noqa: ARG001
--
2.31.1

View 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

View File

@@ -0,0 +1,4 @@
# Locally calculated
sha256 741633da746b7c738bb71f1854f957b9da660bcd2dce68d71949037f0969d0ca python-pybind-3.0.1.tar.gz
# License files, locally calculated
sha256 83965b843b98f670d3a85bd041ed4b372c8ec50d7b4a5995a83ac697ba675dcb LICENSE

View File

@@ -0,0 +1,35 @@
################################################################################
#
# python-pybind
#
################################################################################
PYTHON_PYBIND_VERSION = 3.0.1
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
# Overwrite 'pybind11/_version.py' with a hard-coded version to replace
# 'pybind11/_version.py' installed by default that require
# pybind11/detail/common.h header in HOST_DIR.
# https://github.com/pybind/pybind11/blob/f5fbe867d2d26e4a0a9177a51f6e568868ad3dc8/pyproject.toml#L93
define PYTHON_PYBIND_INSTALL_MODULE
mkdir -p $(PYTHON_PYBIND_INSTALL_PATH)
cp -dpf $(@D)/pybind11/*.py $(PYTHON_PYBIND_INSTALL_PATH)
sed -e 's#@@PYBIND_VERSION@@#$(PYTHON_PYBIND_VERSION)#' \
$(PYTHON_PYBIND_PKGDIR)/python-pybind_version.py.in \
> $(PYTHON_PYBIND_INSTALL_PATH)/_version.py
endef
PYTHON_PYBIND_POST_INSTALL_STAGING_HOOKS += PYTHON_PYBIND_INSTALL_MODULE
$(eval $(cmake-package))

View File

@@ -0,0 +1,12 @@
from __future__ import annotations
def _to_int(s: str) -> int | str:
try:
return int(s)
except ValueError:
return s
__version__ = "@@PYBIND_VERSION@@"
version_info = tuple(_to_int(s) for s in __version__.split("."))