package: Add python-spy

You can use it to inspect python applications, to inspect
executiontime.
This commit is contained in:
Mattias Walström
2026-02-24 06:59:28 +01:00
committed by Joachim Wiberg
parent 845e7c13fe
commit f187fee89b
4 changed files with 48 additions and 0 deletions
+1
View File
@@ -33,6 +33,7 @@ source "$BR2_EXTERNAL_INFIX_PATH/package/mdns-alias/Config.in"
source "$BR2_EXTERNAL_INFIX_PATH/package/netbrowse/Config.in"
source "$BR2_EXTERNAL_INFIX_PATH/package/onieprom/Config.in"
source "$BR2_EXTERNAL_INFIX_PATH/package/podman/Config.in"
source "$BR2_EXTERNAL_INFIX_PATH/package/python-spy/Config.in"
source "$BR2_EXTERNAL_INFIX_PATH/package/python-libyang/Config.in"
source "$BR2_EXTERNAL_INFIX_PATH/package/python-yangdoc/Config.in"
source "$BR2_EXTERNAL_INFIX_PATH/package/skeleton-init-finit/Config.in"
+8
View File
@@ -0,0 +1,8 @@
config BR2_PACKAGE_PYTHON_SPY
bool "python-spy"
depends on BR2_aarch64 || BR2_x86_64
select BR2_PACKAGE_PYTHON3
help
Sampling profiler for Python programs.
https://github.com/benfred/py-spy
+3
View File
@@ -0,0 +1,3 @@
# Locally calculated
sha256 ee776b9d512a011d1ad3907ed53ae32ce2f3d9ff3e1782236554e22103b5c084 py_spy-0.4.1-py2.py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
sha256 6a80ec05eb8a6883863a367c6a4d4f2d57de68466f7956b6367d4edd5c61bb29 py_spy-0.4.1-py2.py3-none-manylinux_2_5_x86_64.manylinux1_x86_64.whl
+36
View File
@@ -0,0 +1,36 @@
################################################################################
#
# python-spy
#
################################################################################
PYTHON_SPY_VERSION = 0.4.1
ifeq ($(BR2_aarch64),y)
PYTHON_SPY_SITE = https://files.pythonhosted.org/packages/df/79/9ed50bb0a9de63ed023aa2db8b6265b04a7760d98c61eb54def6a5fddb68
PYTHON_SPY_SOURCE = py_spy-$(PYTHON_SPY_VERSION)-py2.py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
else ifeq ($(BR2_x86_64),y)
PYTHON_SPY_SITE = https://files.pythonhosted.org/packages/68/fb/bc7f639aed026bca6e7beb1e33f6951e16b7d315594e7635a4f7d21d63f4
PYTHON_SPY_SOURCE = py_spy-$(PYTHON_SPY_VERSION)-py2.py3-none-manylinux_2_5_x86_64.manylinux1_x86_64.whl
endif
PYTHON_SPY_LICENSE = MIT
PYTHON_SPY_DEPENDENCIES = host-python3 host-python-installer
# Keep the wheel intact; we install from it directly.
define PYTHON_SPY_EXTRACT_CMDS
cp $(PYTHON_SPY_DL_DIR)/$(PYTHON_SPY_SOURCE) $(@D)/
endef
define PYTHON_SPY_INSTALL_TARGET_CMDS
$(HOST_DIR)/bin/python3 $(TOPDIR)/support/scripts/pyinstaller.py \
$(@D)/$(PYTHON_SPY_SOURCE) \
--interpreter=/usr/bin/python3 \
--script-kind=posix \
--purelib=$(TARGET_DIR)/usr/lib/python$(PYTHON3_VERSION_MAJOR)/site-packages \
--headers=$(TARGET_DIR)/usr/include/python$(PYTHON3_VERSION_MAJOR) \
--scripts=$(TARGET_DIR)/usr/bin \
--data=$(TARGET_DIR)
endef
$(eval $(generic-package))