Merge pull request #14848 from jefferyto/python-config-macos-openwrt-21.02
[openwrt-21.02] python3: Fix target python-config when building on macOS
This commit is contained in:
commit
a384058a89
2 changed files with 17 additions and 4 deletions
|
@ -11,7 +11,7 @@ include $(TOPDIR)/rules.mk
|
||||||
include ../python3-version.mk
|
include ../python3-version.mk
|
||||||
|
|
||||||
PKG_NAME:=python3
|
PKG_NAME:=python3
|
||||||
PKG_RELEASE:=1
|
PKG_RELEASE:=2
|
||||||
PKG_VERSION:=$(PYTHON3_VERSION).$(PYTHON3_VERSION_MICRO)
|
PKG_VERSION:=$(PYTHON3_VERSION).$(PYTHON3_VERSION_MICRO)
|
||||||
|
|
||||||
PKG_SOURCE:=Python-$(PKG_VERSION).tar.xz
|
PKG_SOURCE:=Python-$(PKG_VERSION).tar.xz
|
||||||
|
@ -299,6 +299,8 @@ endif
|
||||||
ifeq ($(HOST_OS),Darwin)
|
ifeq ($(HOST_OS),Darwin)
|
||||||
HOST_CONFIGURE_VARS += \
|
HOST_CONFIGURE_VARS += \
|
||||||
ac_cv_header_libintl_h=no
|
ac_cv_header_libintl_h=no
|
||||||
|
HOST_MAKE_VARS += \
|
||||||
|
USE_PYTHON_CONFIG_PY=1
|
||||||
endif
|
endif
|
||||||
|
|
||||||
HOST_CONFIGURE_ARGS+= \
|
HOST_CONFIGURE_ARGS+= \
|
||||||
|
@ -315,8 +317,8 @@ define Host/Configure
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define Host/Compile
|
define Host/Compile
|
||||||
+$(HOST_MAKE_VARS) $(MAKE) $(HOST_JOBS) -C $(HOST_BUILD_DIR) python
|
$(call Host/Compile/Default,python)
|
||||||
+$(HOST_MAKE_VARS) $(MAKE) $(HOST_JOBS) -C $(HOST_BUILD_DIR) sharedmods
|
$(call Host/Compile/Default,sharedmods)
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define Host/Install
|
define Host/Install
|
||||||
|
@ -336,7 +338,7 @@ define Host/Install
|
||||||
$(HOST_PYTHON3_PKG_DIR)/.pip-patched* \
|
$(HOST_PYTHON3_PKG_DIR)/.pip-patched* \
|
||||||
$(HOST_PYTHON3_PKG_DIR)/.pip_installed_*
|
$(HOST_PYTHON3_PKG_DIR)/.pip_installed_*
|
||||||
)
|
)
|
||||||
$(MAKE) -C $(HOST_BUILD_DIR) install
|
$(call Host/Install/Default)
|
||||||
$(if $(wildcard $(HOST_PYTHON3_PKG_DIR)/.setuptools_installed_$(PYTHON3_SETUPTOOLS_VERSION)-$(PYTHON3_SETUPTOOLS_PKG_RELEASE)),,
|
$(if $(wildcard $(HOST_PYTHON3_PKG_DIR)/.setuptools_installed_$(PYTHON3_SETUPTOOLS_VERSION)-$(PYTHON3_SETUPTOOLS_PKG_RELEASE)),,
|
||||||
$(call HostPatchDir,$(HOST_PYTHON3_PKG_DIR),./patches-setuptools,)
|
$(call HostPatchDir,$(HOST_PYTHON3_PKG_DIR),./patches-setuptools,)
|
||||||
touch $(HOST_PYTHON3_PKG_DIR)/.setuptools_installed_$(PYTHON3_SETUPTOOLS_VERSION)-$(PYTHON3_SETUPTOOLS_PKG_RELEASE)
|
touch $(HOST_PYTHON3_PKG_DIR)/.setuptools_installed_$(PYTHON3_SETUPTOOLS_VERSION)-$(PYTHON3_SETUPTOOLS_PKG_RELEASE)
|
||||||
|
|
|
@ -0,0 +1,11 @@
|
||||||
|
--- a/Makefile.pre.in
|
||||||
|
+++ b/Makefile.pre.in
|
||||||
|
@@ -1586,7 +1586,7 @@ python-config: $(srcdir)/Misc/python-con
|
||||||
|
@ # On Darwin, always use the python version of the script, the shell
|
||||||
|
@ # version doesn't use the compiler customizations that are provided
|
||||||
|
@ # in python (_osx_support.py).
|
||||||
|
- @if test `uname -s` = Darwin; then \
|
||||||
|
+ @if test "$(USE_PYTHON_CONFIG_PY)" = 1; then \
|
||||||
|
cp python-config.py python-config; \
|
||||||
|
fi
|
||||||
|
|
Loading…
Reference in a new issue