1
0
mirror of https://git.openwrt.org/feed/packages.git synced 2024-06-17 04:44:10 +02:00
openwrt-packages/lang/python/python3/patches/025-choose-python-config-version.patch
Jeffery To 18330902a0
python3: Fix target python-config when building on macOS
The Python version of python-config is installed when building on macOS,
rather than the shell script version when building on Linux. When run on
macOS, the Python version of python-config will return values with
Mac-specific customizations.

This patches the python-config install recipe so that which version is
installed can be controlled by the package makefile. When building on
macOS, this installs the Python version for host Python and the shell
script version for target Python.

This also updates Host/Compile and Host/Install to use the default host
build recipes, so that the various HOST_* variables are taken into
account automatically.

Fixes https://github.com/openwrt/packages/issues/14652

Signed-off-by: Jeffery To <jeffery.to@gmail.com>
2021-02-17 00:01:41 +08:00

12 lines
421 B
Diff

--- 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