Browse Source

sysrepo: Switch to Python 3

Python 2 will be EOL by the end of the year. Switch to Python 3 as there
is already support for it.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
lilik-openwrt-22.03
Rosen Penev 5 years ago
parent
commit
c6cf2dadc0
1 changed files with 6 additions and 5 deletions
  1. +6
    -5
      net/sysrepo/Makefile

+ 6
- 5
net/sysrepo/Makefile View File

@ -26,7 +26,7 @@ PKG_BUILD_DEPENDS:=SYSREPO_BINDINGS:swig/host
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/cmake.mk
ifeq ($(CONFIG_SYSREPO_PYTHON),y)
$(call include_mk, python-package.mk)
$(call include_mk, python3-package.mk)
endif
define Package/libsysrepo/config
@ -38,7 +38,7 @@ define Package/libsysrepo
CATEGORY:=Libraries
TITLE:=YANG-based data store library
URL:=https://www.sysrepo.org/
DEPENDS:=+libyang +libprotobuf-c +libev +libredblack +librt +libpthread +SYSREPO_BINDINGS:libstdcpp +SYSREPO_PYTHON:python-base +SYSREPO_LUA:lua
DEPENDS:=+libyang +libprotobuf-c +libev +libredblack +librt +libpthread +SYSREPO_BINDINGS:libstdcpp +SYSREPO_PYTHON:python3-base +SYSREPO_LUA:lua
MENU:=1
endef
@ -98,7 +98,8 @@ endif
ifeq ($(CONFIG_SYSREPO_PYTHON),y)
CMAKE_OPTIONS += \
-DGEN_PYTHON_BINDINGS:BOOL=TRUE \
-DGEN_PYTHON_VERSION=2
-DGEN_PYTHON_VERSION=3 \
-DGEN_PYTHON3_TESTS:BOOL=FALSE
endif
ifeq ($(CONFIG_SYSREPO_BINDINGS),y)
@ -136,8 +137,8 @@ ifeq ($(CONFIG_SYSREPO_PYTHON),y)
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_BUILD_DIR)/swig/libSysrepo-cpp.so* $(1)/usr/lib
$(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR)
$(INSTALL_DATA) $(PKG_BUILD_DIR)/swig/python2/libsysrepoPython2.py $(1)$(PYTHON_PKG_DIR)
$(INSTALL_DATA) $(PKG_BUILD_DIR)/swig/python2/_libsysrepoPython2.so $(1)$(PYTHON_PKG_DIR)
$(INSTALL_DATA) $(PKG_BUILD_DIR)/swig/python3/libsysrepoPython3.py $(1)$(PYTHON_PKG_DIR)
$(INSTALL_DATA) $(PKG_BUILD_DIR)/swig/python3/_libsysrepoPython3.so $(1)$(PYTHON_PKG_DIR)
endif
ifeq ($(CONFIG_SYSREPO_LUA),y)


Loading…
Cancel
Save