diff --git a/package/pkg-python.mk b/package/pkg-python.mk index 02df061a19..61f0dd6ec2 100644 --- a/package/pkg-python.mk +++ b/package/pkg-python.mk @@ -130,27 +130,27 @@ endif # Distutils ifeq ($$($(2)_SETUP_TYPE),distutils) ifeq ($(4),target) -$(2)_BASE_ENV = $$(PKG_PYTHON_DISTUTILS_ENV) -$(2)_BASE_BUILD_TGT = build -$(2)_BASE_BUILD_OPTS = $$(PKG_PYTHON_DISTUTILS_BUILD_OPTS) -$(2)_BASE_INSTALL_TARGET_OPTS = $$(PKG_PYTHON_DISTUTILS_INSTALL_TARGET_OPTS) -$(2)_BASE_INSTALL_STAGING_OPTS = $$(PKG_PYTHON_DISTUTILS_INSTALL_STAGING_OPTS) +$(2)_BASE_ENV = $$(PKG_PYTHON_DISTUTILS_ENV) +$(2)_BASE_BUILD_CMD = setup.py build +$(2)_BASE_BUILD_OPTS = $$(PKG_PYTHON_DISTUTILS_BUILD_OPTS) +$(2)_BASE_INSTALL_TARGET_CMD = setup.py install --no-compile $$(PKG_PYTHON_DISTUTILS_INSTALL_TARGET_OPTS) +$(2)_BASE_INSTALL_STAGING_CMD = setup.py install $$(PKG_PYTHON_DISTUTILS_INSTALL_STAGING_OPTS) else $(2)_BASE_ENV = $$(HOST_PKG_PYTHON_DISTUTILS_ENV) -$(2)_BASE_BUILD_TGT = build -$(2)_BASE_INSTALL_OPTS = $$(HOST_PKG_PYTHON_DISTUTILS_INSTALL_OPTS) +$(2)_BASE_BUILD_CMD = setup.py build +$(2)_BASE_INSTALL_CMD = setup.py install $$(HOST_PKG_PYTHON_DISTUTILS_INSTALL_OPTS) endif # Setuptools else ifeq ($$($(2)_SETUP_TYPE),setuptools) ifeq ($(4),target) -$(2)_BASE_ENV = $$(PKG_PYTHON_SETUPTOOLS_ENV) -$(2)_BASE_BUILD_TGT = build -$(2)_BASE_INSTALL_TARGET_OPTS = $$(PKG_PYTHON_SETUPTOOLS_INSTALL_TARGET_OPTS) -$(2)_BASE_INSTALL_STAGING_OPTS = $$(PKG_PYTHON_SETUPTOOLS_INSTALL_STAGING_OPTS) +$(2)_BASE_ENV = $$(PKG_PYTHON_SETUPTOOLS_ENV) +$(2)_BASE_BUILD_CMD = setup.py build +$(2)_BASE_INSTALL_TARGET_CMD = setup.py install --no-compile $$(PKG_PYTHON_SETUPTOOLS_INSTALL_TARGET_OPTS) +$(2)_BASE_INSTALL_STAGING_CMD = setup.py install $$(PKG_PYTHON_SETUPTOOLS_INSTALL_STAGING_OPTS) else -$(2)_BASE_ENV = $$(HOST_PKG_PYTHON_SETUPTOOLS_ENV) -$(2)_BASE_BUILD_TGT = build -$(2)_BASE_INSTALL_OPTS = $$(HOST_PKG_PYTHON_SETUPTOOLS_INSTALL_OPTS) +$(2)_BASE_ENV = $$(HOST_PKG_PYTHON_SETUPTOOLS_ENV) +$(2)_BASE_BUILD_CMD = setup.py build +$(2)_BASE_INSTALL_CMD = setup.py install $$(HOST_PKG_PYTHON_SETUPTOOLS_INSTALL_OPTS) endif else $$(error "Invalid $(2)_SETUP_TYPE. Valid options are 'distutils' or 'setuptools'") @@ -186,8 +186,8 @@ ifndef $(2)_BUILD_CMDS define $(2)_BUILD_CMDS (cd $$($$(PKG)_BUILDDIR)/; \ $$($$(PKG)_BASE_ENV) $$($$(PKG)_ENV) \ - $$($(2)_PYTHON_INTERPRETER) setup.py \ - $$($$(PKG)_BASE_BUILD_TGT) \ + $$($(2)_PYTHON_INTERPRETER) \ + $$($$(PKG)_BASE_BUILD_CMD) \ $$($$(PKG)_BASE_BUILD_OPTS) $$($$(PKG)_BUILD_OPTS)) endef endif @@ -200,8 +200,9 @@ ifndef $(2)_INSTALL_CMDS define $(2)_INSTALL_CMDS (cd $$($$(PKG)_BUILDDIR)/; \ $$($$(PKG)_BASE_ENV) $$($$(PKG)_ENV) \ - $$($(2)_PYTHON_INTERPRETER) setup.py install \ - $$($$(PKG)_BASE_INSTALL_OPTS) $$($$(PKG)_INSTALL_OPTS)) + $$($(2)_PYTHON_INTERPRETER) \ + $$($$(PKG)_BASE_INSTALL_CMD) \ + $$($$(PKG)_INSTALL_OPTS)) endef endif @@ -213,8 +214,8 @@ ifndef $(2)_INSTALL_TARGET_CMDS define $(2)_INSTALL_TARGET_CMDS (cd $$($$(PKG)_BUILDDIR)/; \ $$($$(PKG)_BASE_ENV) $$($$(PKG)_ENV) \ - $$($(2)_PYTHON_INTERPRETER) setup.py install --no-compile \ - $$($$(PKG)_BASE_INSTALL_TARGET_OPTS) \ + $$($(2)_PYTHON_INTERPRETER) \ + $$($$(PKG)_BASE_INSTALL_TARGET_CMD) \ $$($$(PKG)_INSTALL_TARGET_OPTS)) endef endif @@ -227,8 +228,8 @@ ifndef $(2)_INSTALL_STAGING_CMDS define $(2)_INSTALL_STAGING_CMDS (cd $$($$(PKG)_BUILDDIR)/; \ $$($$(PKG)_BASE_ENV) $$($$(PKG)_ENV) \ - $$($(2)_PYTHON_INTERPRETER) setup.py install \ - $$($$(PKG)_BASE_INSTALL_STAGING_OPTS) \ + $$($(2)_PYTHON_INTERPRETER) \ + $$($$(PKG)_BASE_INSTALL_STAGING_CMD) \ $$($$(PKG)_INSTALL_STAGING_OPTS)) endef endif