diff options
| author | Jeffery To <jeffery.to@gmail.com> | 2020-04-09 23:28:07 +0800 |
|---|---|---|
| committer | Jeffery To <jeffery.to@gmail.com> | 2020-04-19 01:56:23 +0800 |
| commit | fc8387614ccd919e5c2308d61924fb5a994c83c5 (patch) | |
| tree | 0e4f78bfbe2a7d69991bf413e626a1c7deac0a9e /lang/python | |
| parent | 87b8f45230c59d2b4c90ee0a2caaa5a22bf3d77a (diff) | |
python3: Rename canned recipes in python3-package.mk
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>
Diffstat (limited to 'lang/python')
| -rw-r--r-- | lang/python/gunicorn/Makefile | 2 | ||||
| -rw-r--r-- | lang/python/python-gnupg/Makefile | 2 | ||||
| -rw-r--r-- | lang/python/python-lxml/Makefile | 2 | ||||
| -rw-r--r-- | lang/python/python3-package.mk | 12 | ||||
| -rw-r--r-- | lang/python/python3-packages/Makefile | 4 |
5 files changed, 11 insertions, 11 deletions
diff --git a/lang/python/gunicorn/Makefile b/lang/python/gunicorn/Makefile index 75f3bef57..49df326d2 100644 --- a/lang/python/gunicorn/Makefile +++ b/lang/python/gunicorn/Makefile @@ -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)) diff --git a/lang/python/python-gnupg/Makefile b/lang/python/python-gnupg/Makefile index 53f716547..fd439b245 100644 --- a/lang/python/python-gnupg/Makefile +++ b/lang/python/python-gnupg/Makefile @@ -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 diff --git a/lang/python/python-lxml/Makefile b/lang/python/python-lxml/Makefile index c2c7d3ad3..05decd704 100644 --- a/lang/python/python-lxml/Makefile +++ b/lang/python/python-lxml/Makefile @@ -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 \ diff --git a/lang/python/python3-package.mk b/lang/python/python3-package.mk index 88ab726eb..b3326eaa8 100644 --- a/lang/python/python3-package.mk +++ b/lang/python/python3-package.mk @@ -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)" \ diff --git a/lang/python/python3-packages/Makefile b/lang/python/python3-packages/Makefile index 4310fe920..b1b37dac0 100644 --- a/lang/python/python3-packages/Makefile +++ b/lang/python/python3-packages/Makefile @@ -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 |
