python3: Rename canned recipes in python3-package.mk
authorJeffery To <jeffery.to@gmail.com>
Thu, 9 Apr 2020 15:28:07 +0000 (23:28 +0800)
committerJeffery To <jeffery.to@gmail.com>
Sat, 18 Apr 2020 17:56:23 +0000 (01:56 +0800)
This renames "internal" recipes to use the Python3/ prefix and clarifies
the names (RunTarget to Run, Mod to ModSetup, Shebang to FixShebang).

Signed-off-by: Jeffery To <jeffery.to@gmail.com>
lang/python/gunicorn/Makefile
lang/python/python-gnupg/Makefile
lang/python/python-lxml/Makefile
lang/python/python3-package.mk
lang/python/python3-packages/Makefile
net/scapy/Makefile
net/uwsgi/Makefile

index 75f3bef5761cc1abaf3717ef4871b7f3c4dc5370..49df326d27f0b485e6522921157d84085b9af2de 100644 (file)
@@ -66,7 +66,7 @@ define Package/gunicorn3/install
                $(PKG_INSTALL_DIR)/usr/bin/gunicorn \
                $(1)/usr/bin/gunicorn3
        $(LN) gunicorn3 $(1)/usr/bin/gunicorn
-       $(call Py3Shebang,$(1)/usr/bin/*)
+       $(call Python3/FixShebang,$(1)/usr/bin/*)
 endef
 
 $(eval $(call Py3Package,python3-gunicorn))
index 53f716547e89c27f1ee30176d57dde0cf4e069cc..fd439b245e1d3a9650d541006d0ac6cbb77f6995 100644 (file)
@@ -50,7 +50,7 @@ Python 3.3, Python 3.4, or PyPy.
 endef
 
 define Py3Build/Compile
-       $(call Build/Compile/Py3Mod,,\
+       $(call Python3/ModSetup,,\
                install --prefix="/usr" --root="$(PKG_INSTALL_DIR)" \
        )
 endef
index c2c7d3ad3ea3f958183fe69578b0b23a7bfbffb6..05decd7044a1e361407316785b1f2721595395fd 100644 (file)
@@ -48,7 +48,7 @@ endef
 TARGET_LDFLAGS += -lxml2 -lxslt -lexslt
 
 define Py3Build/Compile
-       $(call Build/Compile/Py3Mod,, \
+       $(call Python3/ModSetup,, \
                install --prefix="/usr" --root="$(PKG_INSTALL_DIR)" \
                --static \
                --single-version-externally-managed \
index 88ab726eb03d3753a178acc9da772eafc65d8fae..b3326eaa89858f83dba73bf3e0d5e5f324617c96 100644 (file)
@@ -34,7 +34,7 @@ ifdef CONFIG_USE_MIPS16
   TARGET_CFLAGS += -mno-mips16 -mno-interlink-mips16
 endif
 
-define Py3Shebang
+define Python3/FixShebang
 $(SED) "1"'!'"b;s,^#"'!'".*python.*,#"'!'"/usr/bin/python3," -i --follow-symlinks $(1)
 endef
 
@@ -86,7 +86,7 @@ define Py3Package
                "$(HOST_PYTHON3_BIN)" "$$(2)" \
                "$$$$$$$$$$(call shvar,Py3Package/$(1)/filespec)" && \
        if [ -d "$$(1)/usr/bin" ]; then \
-               $(call Py3Shebang,$$(1)/usr/bin/*) ; \
+               $(call Python3/FixShebang,$$(1)/usr/bin/*) ; \
        fi
  endef
 
@@ -117,7 +117,7 @@ PYTHON3_VARS = \
 # $(1) => directory of python script
 # $(2) => python script and its arguments
 # $(3) => additional variables
-define Build/Compile/HostPy3RunTarget
+define Python3/Run
        cd "$(if $(strip $(1)),$(strip $(1)),.)" && \
        $(PYTHON3_VARS) \
        $(3) \
@@ -127,9 +127,9 @@ endef
 # $(1) => build subdir
 # $(2) => additional arguments to setup.py
 # $(3) => additional variables
-define Build/Compile/Py3Mod
+define Python3/ModSetup
        $(INSTALL_DIR) $(PKG_INSTALL_DIR)/$(PYTHON3_PKG_DIR)
-       $(call Build/Compile/HostPy3RunTarget, \
+       $(call Python3/Run, \
                $(PKG_BUILD_DIR)/$(strip $(1)), \
                setup.py $(2), \
                $(3))
@@ -144,7 +144,7 @@ define Py3Build/Compile/Default
        $(if $(HOST_PYTHON3_PACKAGE_BUILD_DEPENDS),
                $(call HostPython3/PipInstall,$(HOST_PYTHON3_PACKAGE_BUILD_DEPENDS))
        )
-       $(call Build/Compile/Py3Mod, \
+       $(call Python3/ModSetup, \
                $(PYTHON3_PKG_SETUP_DIR), \
                $(PYTHON3_PKG_SETUP_GLOBAL_ARGS) \
                install --prefix="/usr" --root="$(PKG_INSTALL_DIR)" \
index 4310fe9204473f8232f613e581b5dd55caac9fed..b1b37dac04708db7ea6c8a6edd3b2a31162eba96 100644 (file)
@@ -104,10 +104,10 @@ define Build/Compile
                $(call HostPython3/Run,,$(HOST_PYTHON3_PIP_INSTALL_HOST) $(pkg))
        )
        $(foreach pkg,$(CONFIG_PACKAGE_python3-packages-list),
-               $(call Build/Compile/HostPy3RunTarget,,$(call HOST_PYTHON3_PIP_INSTALL_TARGET,$(pkg)) $(pkg),$(CONFIG_PACKAGE_python3-packages-envs))
+               $(call Python3/Run,,$(call HOST_PYTHON3_PIP_INSTALL_TARGET,$(pkg)) $(pkg),$(CONFIG_PACKAGE_python3-packages-envs))
        )
        $(foreach pkg,$(CONFIG_PACKAGE_python3-packages-list-cleanup),
-               $(call Build/Compile/HostPy3RunTarget,,$(HOST_PYTHON3_PIP_INSTALL_CLEANUP) $(pkg),$(CONFIG_PACKAGE_python3-packages-envs))
+               $(call Python3/Run,,$(HOST_PYTHON3_PIP_INSTALL_CLEANUP) $(pkg),$(CONFIG_PACKAGE_python3-packages-envs))
        )
 endef
 
index 19c06031e2b69a56d2fad7ce467d7bbc2984ada7..4a3b395d3f65eb46968e3b41b04a1449e772e4f7 100644 (file)
@@ -37,7 +37,7 @@ define Package/scapy/description
 endef
 
 define Build/Compile
-       $(call Build/Compile/Py3Mod,., \
+       $(call Python3/ModSetup,., \
                install --prefix="/usr" --root="$(PKG_INSTALL_DIR)", \
        )
 endef
index 9b95027d7f8e1b21b1d6d8ff76a8e921949cb24f..d658c9c283b2b1cbfb9d4aad95d9d572fc5f6114 100644 (file)
@@ -108,7 +108,7 @@ define Build/Compile
        $(call Build/Compile/Default,plugin.logfile PROFILE=openwrt)
        $(call Build/Compile/Default,plugin.syslog PROFILE=openwrt)
        $(call Build/Compile/Default,plugin.cgi PROFILE=openwrt)
-       $(call Build/Compile/HostPy3RunTarget, \
+       $(call Python3/Run, \
                $(PKG_BUILD_DIR), \
                uwsgiconfig.py --plugin plugins/python openwrt, \
                CPP="$(TARGET_CROSS)cpp" \