Skip to content
This repository was archived by the owner on Feb 27, 2025. It is now read-only.

Commit ca8af87

Browse files
Add external package python-py-spy.
1 parent 02c554c commit ca8af87

File tree

6 files changed

+82
-0
lines changed

6 files changed

+82
-0
lines changed

OS/buildroot/external/Config.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ source "$BR2_EXTERNAL_SBT_AQUA_PATH/package/python-jmespath/Config.in"
1010
source "$BR2_EXTERNAL_SBT_AQUA_PATH/package/python-jsonpatch/Config.in"
1111
source "$BR2_EXTERNAL_SBT_AQUA_PATH/package/python-jsonpointer/Config.in"
1212
source "$BR2_EXTERNAL_SBT_AQUA_PATH/package/python-multidict/Config.in"
13+
source "$BR2_EXTERNAL_SBT_AQUA_PATH/package/python-py-spy/Config.in"
1314
source "$BR2_EXTERNAL_SBT_AQUA_PATH/package/python-pympler/Config.in"
1415
source "$BR2_EXTERNAL_SBT_AQUA_PATH/package/python-restrictedpython/Config.in"
1516
source "$BR2_EXTERNAL_SBT_AQUA_PATH/package/python-rxpy/Config.in"
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
From bfa69ee8d967281a230d4fca1a9582d5c0628568 Mon Sep 17 00:00:00 2001
2+
From: Frederik Peter Aalund <[email protected]>
3+
Date: Thu, 4 Oct 2018 11:20:04 +0200
4+
Subject: [PATCH] Add PYSPY_CROSS_COMPILE_TARGET parameter to setup.py.
5+
6+
---
7+
setup.py | 4 ++++
8+
1 file changed, 4 insertions(+)
9+
10+
diff --git a/setup.py b/setup.py
11+
index da83478..61d70dc 100755
12+
--- a/setup.py
13+
+++ b/setup.py
14+
@@ -54,12 +54,16 @@ class PostInstallCommand(install):
15+
# issues like https://github.com/benfred/py-spy/issues/5.
16+
# Note: we're only doing this on demand since this requires musl-tools installed
17+
# but the released wheels should have this option set
18+
+ cross_compile_target = os.getenv("PYSPY_CROSS_COMPILE_TARGET")
19+
if os.getenv("PYSPY_MUSL_64"):
20+
compile_args = " --target=x86_64-unknown-linux-musl"
21+
build_dir = os.path.join(source_dir, "target", "x86_64-unknown-linux-musl", "release")
22+
elif os.getenv("PYSPY_MUSL_32"):
23+
compile_args = " --target=i686-unknown-linux-musl"
24+
build_dir = os.path.join(source_dir, "target", "i686-unknown-linux-musl", "release")
25+
+ elif cross_compile_target:
26+
+ compile_args = " --target=%s" % cross_compile_target
27+
+ build_dir = os.path.join(source_dir, "target", cross_compile_target, "release")
28+
else:
29+
compile_args = ""
30+
build_dir = os.path.join(source_dir, "target", "release")
31+
--
32+
2.17.1
33+
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
From 1ba6c8936a87a44f7788d09df46c0c704e3ca3c7 Mon Sep 17 00:00:00 2001
2+
From: Frederik Peter Aalund <[email protected]>
3+
Date: Thu, 4 Oct 2018 11:33:45 +0200
4+
Subject: [PATCH] Add .cargo/config with linker information for armv7.
5+
6+
---
7+
.cargo/config | 2 ++
8+
1 file changed, 2 insertions(+)
9+
create mode 100644 .cargo/config
10+
11+
diff --git a/.cargo/config b/.cargo/config
12+
new file mode 100644
13+
index 0000000..0c1c209
14+
--- /dev/null
15+
+++ b/.cargo/config
16+
@@ -0,0 +1,2 @@
17+
+[target.armv7-unknown-linux-gnueabihf]
18+
+linker = "arm-linux-gnueabihf-gcc"
19+
--
20+
2.17.1
21+
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
config BR2_PACKAGE_PYTHON_PY_SPY
2+
bool "python-py-spy"
3+
select BR2_PACKAGE_HOST_RUSTC
4+
select BR2_PACKAGE_HOST_CARGO
5+
help
6+
Sampling profiler for Python programs.
7+
8+
https://github.com/benfred/py-spy
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Locally computed:
2+
sha256 5f38de07f0162e0cb66f17c5a07d9bdbb6ae5fb9e6f2cbedc87949670030fdb1 python-py-spy-v0.1.8.tar.gz
3+
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
################################################################################
2+
#
3+
# python-py-spy
4+
#
5+
################################################################################
6+
7+
PYTHON_PY_SPY_VERSION = v0.1.8
8+
PYTHON_PY_SPY_SITE = $(call github,benfred,py-spy,$(PYTHON_PY_SPY_VERSION))
9+
PYTHON_PY_SPY_SETUP_TYPE = setuptools
10+
PYTHON_PY_SPY_LICENSE = GPL-3.0
11+
PYTHON_PY_SPY_LICENSE_FILES = LICENSE
12+
PYTHON_PY_SPY_DEPENDENCIES += host-rustc
13+
PYTHON_PY_SPY_DEPENDENCIES += host-cargo
14+
PYTHON_PY_SPY_ENV = PYSPY_CROSS_COMPILE_TARGET=armv7-unknown-linux-gnueabihf
15+
16+
$(eval $(python-package))

0 commit comments

Comments
 (0)