Merge pull request #11724 from jefferyto/python2-remove-plugins

treewide: Remove Python 2 plugin/bindings/etc from non-Python packages
This commit is contained in:
Hannu Nyman
2020-04-01 16:24:53 +03:00
committed by GitHub
11 changed files with 15 additions and 219 deletions
+2 -27
View File
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=freeradius3
PKG_VERSION:=release_3_0_20
PKG_RELEASE:=2
PKG_RELEASE:=3
PKG_SOURCE:=$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://github.com/FreeRADIUS/freeradius-server/archive
@@ -30,7 +30,6 @@ PKG_CONFIG_DEPENDS := \
CFLAGS += $(FPIC)
include $(INCLUDE_DIR)/package.mk
include $(TOPDIR)/feeds/packages/lang/python/python-package.mk
include $(TOPDIR)/feeds/packages/lang/python/python3-package.mk
define Package/freeradius3/config
@@ -342,16 +341,6 @@ define Package/freeradius3-mod-preprocess/conffiles
/etc/freeradius3/mods-enabled/preprocess
endef
define Package/freeradius3-mod-python
$(call Package/freeradius3/Default)
DEPENDS:=freeradius3 +python
TITLE:=Python module
endef
define Package/freeradius3-mod-python/conffiles
/etc/freeradius3/mods-available/python
endef
define Package/freeradius3-mod-python3
$(call Package/freeradius3/Default)
DEPENDS:=freeradius3 +python3
@@ -512,6 +501,7 @@ CONFIGURE_ARGS+= \
--without-rlm_opendirectory \
--without-rlm_pam \
--without-rlm_perl \
--without-rlm_python \
--without-rlm_redis \
--without-rlm_rediswho \
--without-rlm_rest \
@@ -577,19 +567,6 @@ else
CONFIGURE_ARGS+= --without-rlm_eap_pwd
endif
ifneq ($(SDK)$(CONFIG_PACKAGE_freeradius3-mod-python),)
CFLAGS+= -fPIC
CONFIGURE_ARGS+= \
--with-rlm_python \
--with-rlm-python-include-dir="$(PYTHON_INC_DIR)" \
--with-rlm-python-lib-dir="$(PYTHON_LIB_DIR)"
CONFIGURE_VARS+= \
OPENWRTTARGET_PY_PREFIX="$(PYTHON_DIR)" \
OPENWRTTARGET_PY_SYS_VERSION="$(PYTHON_VERSION)"
else
CONFIGURE_ARGS+= --without-rlm_python
endif
ifneq ($(SDK)$(CONFIG_PACKAGE_freeradius3-mod-python3),)
CFLAGS+= -fPIC
CONFIGURE_ARGS+= \
@@ -789,8 +766,6 @@ $(eval $(call BuildPlugin,freeradius3-mod-mschap,rlm_mschap,))
$(eval $(call BuildPlugin,freeradius3-mod-pap,rlm_pap,))
$(eval $(call BuildPlugin,freeradius3-mod-passwd,rlm_passwd,))
$(eval $(call BuildPlugin,freeradius3-mod-preprocess,rlm_preprocess,))
$(eval $(call PyPackage,freeradius3-mod-python))
$(eval $(call BuildPlugin,freeradius3-mod-python,rlm_python,))
$(eval $(call Py3Package,freeradius3-mod-python3))
$(eval $(call BuildPlugin,freeradius3-mod-python3,rlm_python3,))
$(eval $(call BuildPlugin,freeradius3-mod-radutmp,rlm_radutmp,))
@@ -1,43 +1,3 @@
--- a/src/modules/rlm_python/configure
+++ b/src/modules/rlm_python/configure
@@ -2928,15 +2928,15 @@ fi
if test x$fail = x; then
- PY_PREFIX=`${PYTHON_BIN} -c 'import sys ; print(sys.prefix)'`
+ PY_PREFIX="$OPENWRTTARGET_PY_PREFIX"
{ $as_echo "$as_me:${as_lineno-$LINENO}: Python sys.prefix \"${PY_PREFIX}\"" >&5
$as_echo "$as_me: Python sys.prefix \"${PY_PREFIX}\"" >&6;}
- PY_EXEC_PREFIX=`${PYTHON_BIN} -c 'import sys ; print(sys.exec_prefix)'`
+ PY_EXEC_PREFIX="$OPENWRTTARGET_PY_PREFIX"
{ $as_echo "$as_me:${as_lineno-$LINENO}: Python sys.exec_prefix \"${PY_EXEC_PREFIX}\"" >&5
$as_echo "$as_me: Python sys.exec_prefix \"${PY_EXEC_PREFIX}\"" >&6;}
- PY_SYS_VERSION=`${PYTHON_BIN} -c 'import sys ; print(sys.version[0:3])'`
+ PY_SYS_VERSION="$OPENWRTTARGET_PY_SYS_VERSION"
{ $as_echo "$as_me:${as_lineno-$LINENO}: Python sys.version \"${PY_SYS_VERSION}\"" >&5
$as_echo "$as_me: Python sys.version \"${PY_SYS_VERSION}\"" >&6;}
--- a/src/modules/rlm_python/configure.ac
+++ b/src/modules/rlm_python/configure.ac
@@ -65,13 +65,13 @@ if test x$with_[]modname != xno; then
)
if test x$fail = x; then
- PY_PREFIX=`${PYTHON_BIN} -c 'import sys ; print(sys.prefix)'`
+ PY_PREFIX="$OPENWRTTARGET_PY_PREFIX"
AC_MSG_NOTICE([Python sys.prefix \"${PY_PREFIX}\"])
- PY_EXEC_PREFIX=`${PYTHON_BIN} -c 'import sys ; print(sys.exec_prefix)'`
+ PY_EXEC_PREFIX="$OPENWRTTARGET_PY_PREFIX"
AC_MSG_NOTICE([Python sys.exec_prefix \"${PY_EXEC_PREFIX}\"])
- PY_SYS_VERSION=`${PYTHON_BIN} -c 'import sys ; print(sys.version[[0:3]])'`
+ PY_SYS_VERSION="$OPENWRTTARGET_PY_SYS_VERSION"
AC_MSG_NOTICE([Python sys.version \"${PY_SYS_VERSION}\"])
if test "x$PY_LIB_DIR" = "x"; then
--- a/src/modules/rlm_python3/configure
+++ b/src/modules/rlm_python3/configure
@@ -2928,15 +2928,15 @@ fi
+1 -5
View File
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=seafile-ccnet
PKG_VERSION:=7.1.2
PKG_RELEASE:=1
PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/haiwen/ccnet-server/tar.gz/v$(PKG_VERSION)-server?
@@ -28,7 +28,6 @@ PKG_INSTALL:=1
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/nls.mk
include ../../lang/python/python-package.mk
include ../../lang/python/python3-package.mk
define Package/seafile-ccnet
@@ -74,12 +73,9 @@ CONFIGURE_ARGS += \
--enable-python \
--with-mysql="$(STAGING_DIR)/usr/bin/mysql_config"
# Include Python 2 bindings in this package to maintain compatibility with previous versions
define Package/seafile-ccnet/install
$(INSTALL_DIR) $(1)/usr/{lib,libexec}
$(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR)/ccnet
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/libexec/
$(INSTALL_DATA) $(PKG_BUILD_DIR)/python/ccnet/*.py $(1)$(PYTHON_PKG_DIR)/ccnet/
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libccnet.so* $(1)/usr/lib/
endef
+2 -9
View File
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=seafile-server
PKG_VERSION:=7.1.2
PKG_RELEASE:=1
PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/haiwen/seafile-server/tar.gz/v$(PKG_VERSION)-server?
@@ -28,7 +28,6 @@ PKG_INSTALL:=1
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/nls.mk
include ../../lang/python/python-package.mk
include ../../lang/python/python3-package.mk
# Check that the actual Makefile version-relase match the above.
@@ -127,7 +126,7 @@ CONFIGURE_ARGS += \
--enable-python \
--with-mysql="$(STAGING_DIR)/usr/bin/mysql_config"
# This is required as python[3]-package.mk overrides the default setting of having interlinking enabled
# This is required as python3-package.mk overrides the default setting of having interlinking enabled
ifdef CONFIG_USE_MIPS16
TARGET_CFLAGS += -minterlink-mips16
endif
@@ -162,10 +161,8 @@ SEAFILE_SERVER_PYTHON_SCRIPTS:= \
setup-seafile-mysql.py \
sqlite2mysql.py
# Include Python 2 bindings in this package to maintain compatibility with previous versions
define Package/seafile-server/install
$(INSTALL_DIR) $(1)/usr/{bin,libexec}
$(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR)/{seafile,seaserv}
$(INSTALL_DIR) $(1)/usr/share/seafile/seafile-server
$(INSTALL_DIR) $(1)/etc/{config,init.d,seafile}
$(INSTALL_DIR) $(1)/lib/upgrade/keep.d
@@ -174,9 +171,6 @@ define Package/seafile-server/install
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/$$$$bin $(1)/usr/libexec/ ; \
done
$(INSTALL_DATA) $(PKG_BUILD_DIR)/python/seafile/*.py $(1)$(PYTHON_PKG_DIR)/seafile/
$(INSTALL_DATA) $(PKG_BUILD_DIR)/python/seaserv/*.py $(1)$(PYTHON_PKG_DIR)/seaserv/
for sh in $(SEAFILE_SERVER_SHELL_SCRIPTS) ; do \
$(INSTALL_BIN) $(PKG_BUILD_DIR)/scripts/$$$$sh $(1)/usr/bin/$$$${sh%.sh} ; \
done
@@ -201,7 +195,6 @@ endef
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/include/seafile
$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
$(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR)
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/include/seafile/*.h $(1)/usr/include/seafile/
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libseafile.pc $(1)/usr/lib/pkgconfig/
endef