forked from sonic-net/sonic-buildimage
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
libyang3-py3: libyang3 uses a python cffi bindings
libyang 1.0.73 provided python bindings via swig. Those have been removed and libyang3 now requires the use of the cffi bindings which are in a separate repo. The binding names themselves are actually different ('yang' vs 'libyang') so both should be installable simultaneously. This is built as a debian package rather than a wheel since it contains binary elements.
- Loading branch information
Showing
12 changed files
with
106 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
|
||
SPATH := $($(LIBYANG3_PY3)_SRC_PATH) | ||
DEP_FILES := $(SONIC_COMMON_FILES_LIST) rules/libyang3-py3.mk rules/libyang3-py3.dep | ||
DEP_FILES += $(SONIC_COMMON_BASE_FILES_LIST) | ||
SMDEP_FILES := $(addprefix $(SPATH)/,$(shell cd $(SPATH) && find . -type f -exec sh -c 'git ls-files --error-unmatch "$0" >/dev/null 2>&1' {} \; -printf '%P\n')) | ||
SMDEP_FILES += $(addprefix $(SPATH).patch/,$(shell cd $(SPATH).patch && find . -type f -exec sh -c 'git ls-files --error-unmatch "$0" >/dev/null 2>&1' {} \; -printf '%P\n')) | ||
|
||
$(LIBYANG3_PY3)_CACHE_MODE := GIT_CONTENT_SHA | ||
$(LIBYANG3_PY3)_DEP_FLAGS := $(SONIC_COMMON_FLAGS_LIST) | ||
$(LIBYANG3_PY3)_DEP_FILES := $(DEP_FILES) | ||
$(LIBYANG3_PY3)_SMDEP_FILES := $(SMDEP_FILES) | ||
$(LIBYANG3_PY3)_SMDEP_PATHS := $(SPATH) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# libyang3 python3 deb package | ||
|
||
LIBYANG3_PY3_VERSION = 3.0.3 | ||
LIBYANG3_PY3_SUBVERSION = 1 | ||
LIBYANG3_PY3_FULLVERSION = $(LIBYANG3_PY3_VERSION)-$(LIBYANG3_PY3_SUBVERSION) | ||
|
||
export LIBYANG3_PY3_VERSION | ||
export LIBYANG3_PY3_SUBVERSION | ||
export LIBYANG3_PY3_FULLVERSION | ||
|
||
LIBYANG3_PY3 = python3-libyang_$(LIBYANG3_PY3_FULLVERSION)_$(CONFIGURED_ARCH).deb | ||
$(LIBYANG3_PY3)_SRC_PATH = $(SRC_PATH)/libyang3-py3 | ||
$(LIBYANG3_PY3)_DEPENDS += $(LIBYANG3) $(LIBYANG3_DEV) | ||
$(LIBYANG3_PY3)_RDEPENDS += $(LIBYANG3) | ||
SONIC_DPKG_DEBS += $(LIBYANG3_PY3) | ||
|
||
export LIBYANG3_PY3 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule libyang3-py3
added at
1afc2a
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
diff -ruN libyang-python.orig/debian/changelog libyang-python.new/debian/changelog | ||
--- libyang-python.orig/debian/changelog 1970-01-01 00:00:00.000000000 +0000 | ||
+++ libyang-python.new/debian/changelog 2025-02-09 12:45:51.113010546 +0000 | ||
@@ -0,0 +1,5 @@ | ||
+libyang-python (3.0.3-1) unstable; urgency=low | ||
+ | ||
+ * source package automatically created by stdeb 0.10.0 | ||
+ | ||
+ -- None <None> Sat, 08 Feb 2025 20:55:02 +0000 | ||
diff -ruN libyang-python.orig/debian/compat libyang-python.new/debian/compat | ||
--- libyang-python.orig/debian/compat 1970-01-01 00:00:00.000000000 +0000 | ||
+++ libyang-python.new/debian/compat 2025-02-09 12:45:51.113010546 +0000 | ||
@@ -0,0 +1 @@ | ||
+13 | ||
diff -ruN libyang-python.orig/debian/control libyang-python.new/debian/control | ||
--- libyang-python.orig/debian/control 1970-01-01 00:00:00.000000000 +0000 | ||
+++ libyang-python.new/debian/control 2025-02-09 12:45:51.113010546 +0000 | ||
@@ -0,0 +1,15 @@ | ||
+Source: libyang-python | ||
+Maintainer: None <None> | ||
+Section: python | ||
+Priority: optional | ||
+Build-Depends: dh-python, python3-setuptools, python3-all-dev, python3-cffi, debhelper (>= 13), libyang-dev ( >= 3.0.3) | ||
+Standards-Version: 3.9.6 | ||
+Homepage: https://github.com/CESNET/libyang-python | ||
+ | ||
+Package: python3-libyang | ||
+Architecture: any | ||
+Depends: ${misc:Depends}, ${python3:Depends}, ${shlibs:Depends} | ||
+Description: CFFI bindings to libyang | ||
+ Python CFFI bindings to libyang | ||
+ https://github.com/CESNET/libyang/ | ||
+ | ||
diff -ruN libyang-python.orig/debian/rules libyang-python.new/debian/rules | ||
--- libyang-python.orig/debian/rules 1970-01-01 00:00:00.000000000 +0000 | ||
+++ libyang-python.new/debian/rules 2025-02-09 12:45:51.113010546 +0000 | ||
@@ -0,0 +1,9 @@ | ||
+#!/usr/bin/make -f | ||
+ | ||
+# This file was automatically generated by stdeb 0.10.0 at | ||
+# Sat, 08 Feb 2025 20:55:02 +0000 | ||
+export PYBUILD_NAME=libyang | ||
+ | ||
+%: | ||
+ dh $@ --with python3 --buildsystem=pybuild | ||
+ | ||
diff -ruN libyang-python.orig/debian/source/format libyang-python.new/debian/source/format | ||
--- libyang-python.orig/debian/source/format 1970-01-01 00:00:00.000000000 +0000 | ||
+++ libyang-python.new/debian/source/format 2025-02-09 12:45:51.113010546 +0000 | ||
@@ -0,0 +1 @@ | ||
+3.0 (quilt) | ||
diff -ruN libyang-python.orig/debian/watch libyang-python.new/debian/watch | ||
--- libyang-python.orig/debian/watch 1970-01-01 00:00:00.000000000 +0000 | ||
+++ libyang-python.new/debian/watch 2025-02-09 12:45:51.113010546 +0000 | ||
@@ -0,0 +1,4 @@ | ||
+# please also check http://pypi.debian.net/libyang/watch | ||
+version=3 | ||
+opts=uversionmangle=s/(rc|a|b|c)/~$1/ \ | ||
+http://pypi.debian.net/libyang/libyang-(.+)\.(?:zip|tgz|tbz|txz|(?:tar\.(?:gz|bz2|xz))) | ||
\ No newline at end of file |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
0001-debian.patch |