Skip to content

Commit dc6abfa

Browse files
committed
statd: Remove python-statd package
Now statd handling the rebuilding of the python libraries by using the same script as buildroot uses for building python-packages.
1 parent 2d35f15 commit dc6abfa

File tree

7 files changed

+22
-27
lines changed

7 files changed

+22
-27
lines changed

doc/developers-guide.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ gathers data from local linux services and feeds it into sysrepo.
217217

218218
To apply changes, rebuild the image:
219219

220-
make python-statd-rebuild statd-rebuild all
220+
make statd-rebuild all
221221

222222
Rebuilding the image and testing on target for every change during
223223
development process can be tedious. Instead, `yanger` allows remote

package/Config.in

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ source "$BR2_EXTERNAL_INFIX_PATH/package/netbrowse/Config.in"
3232
source "$BR2_EXTERNAL_INFIX_PATH/package/onieprom/Config.in"
3333
source "$BR2_EXTERNAL_INFIX_PATH/package/podman/Config.in"
3434
source "$BR2_EXTERNAL_INFIX_PATH/package/python-libyang/Config.in"
35-
source "$BR2_EXTERNAL_INFIX_PATH/package/python-statd/Config.in"
3635
source "$BR2_EXTERNAL_INFIX_PATH/package/python-yangdoc/Config.in"
3736
source "$BR2_EXTERNAL_INFIX_PATH/package/skeleton-init-finit/Config.in"
3837
source "$BR2_EXTERNAL_INFIX_PATH/package/show/Config.in"

package/python-statd/Config.in

Lines changed: 0 additions & 6 deletions
This file was deleted.

package/python-statd/python-statd.hash

Lines changed: 0 additions & 1 deletion
This file was deleted.

package/python-statd/python-statd.mk

Lines changed: 0 additions & 16 deletions
This file was deleted.

package/statd/Config.in

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ config BR2_PACKAGE_STATD
55
select BR2_PACKAGE_SYSREPO
66
select BR2_PACKAGE_LIBSRX
77
select BR2_PACKAGE_LIBITE
8-
select BR2_PACKAGE_PYTHON_STATD
8+
select BR2_PACKAGE_HOST_PYTHON3
9+
select BR2_PACKAGE_DBUS_PYTHON
910
help
1011
Operational Status Daemon. Responsible for handling sysrepo
1112
operational run-time info. Such as interface state and address.

package/statd/statd.mk

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@ STATD_SITE = $(BR2_EXTERNAL_INFIX_PATH)/src/statd
1010
STATD_LICENSE = BSD-3-Clause
1111
STATD_LICENSE_FILES = LICENSE
1212
STATD_REDISTRIBUTE = NO
13-
STATD_DEPENDENCIES = sysrepo libev libsrx jansson python-statd libyang libite
13+
STATD_DEPENDENCIES = sysrepo libev libsrx jansson libyang libite \
14+
host-python3 python3 host-python-pypa-build host-python-installer \
15+
host-python-poetry-core dbus-python
1416
STATD_AUTORECONF = YES
1517

1618
define STATD_CONF_ENV
@@ -25,6 +27,22 @@ else
2527
STATD_CONF_OPTS += --disable-containers
2628
endif
2729

30+
define STATD_BUILD_PYTHON
31+
cd $(STATD_SITE)/python && \
32+
$(PKG_PYTHON_PEP517_ENV) $(HOST_DIR)/bin/python3 $(PKG_PYTHON_PEP517_BUILD_CMD) -o $(@D)/python/dist
33+
mkdir -p $(TARGET_DIR)/usr/libexec/statd
34+
cd $(@D)/python && \
35+
$(HOST_DIR)/bin/python3 $(TOPDIR)/support/scripts/pyinstaller.py \
36+
dist/*.whl \
37+
--interpreter=/usr/bin/python3 \
38+
--script-kind=posix \
39+
--purelib=$(TARGET_DIR)/usr/lib/python$(PYTHON3_VERSION_MAJOR)/site-packages \
40+
--headers=$(TARGET_DIR)/usr/include/python$(PYTHON3_VERSION_MAJOR) \
41+
--scripts=$(TARGET_DIR)/usr/libexec/statd \
42+
--data=$(TARGET_DIR)
43+
endef
44+
STATD_POST_INSTALL_TARGET_HOOKS += STATD_BUILD_PYTHON
45+
2846
define STATD_INSTALL_EXTRA
2947
cp $(STATD_PKGDIR)/statd.conf $(FINIT_D)/available/
3048
ln -sf ../available/statd.conf $(FINIT_D)/enabled/statd.conf

0 commit comments

Comments
 (0)