$NetBSD: patch-Makefile.pre.in,v 1.3 2025/08/07 11:39:16 adam Exp $ Use only one optimisation level; needed for PLIST and setuptools compatibility. Do not build/install libpython3.so. Simplify _sysconfigdata to include only platform name. Swap targets libinstall and libainstall, to byte-compile python-config.py. --- Makefile.pre.in.orig 2025-08-06 13:05:20.000000000 +0000 +++ Makefile.pre.in @@ -270,7 +270,7 @@ DIST= $(DISTFILES) $(DISTDIRS) LIBRARY= @LIBRARY@ LDLIBRARY= @LDLIBRARY@ BLDLIBRARY= @BLDLIBRARY@ -PY3LIBRARY= @PY3LIBRARY@ +PY3LIBRARY= DLLLIBRARY= @DLLLIBRARY@ LDLIBRARYDIR= @LDLIBRARYDIR@ INSTSONAME= @INSTSONAME@ @@ -2154,7 +2154,7 @@ altinstall: commoninstall .PHONY: commoninstall commoninstall: check-clean-src @FRAMEWORKALTINSTALLFIRST@ \ - altbininstall libinstall inclinstall libainstall \ + altbininstall libainstall inclinstall libinstall \ sharedinstall altmaninstall @FRAMEWORKALTINSTALLLAST@ # Install shared libraries enabled by Setup @@ -2217,7 +2217,8 @@ altbininstall: $(BUILDPYTHON) @FRAMEWORK if test -n "$(PY3LIBRARY)"; then \ $(INSTALL_SHARED) $(PY3LIBRARY) $(DESTDIR)$(LIBDIR)/$(PY3LIBRARY); \ fi; \ - else true; \ + elif test -f $(INSTSONAME); then \ + $(INSTALL_SHARED) $(INSTSONAME) $(DESTDIR)$(LIBDIR); \ fi; \ fi if test "x$(LIPO_32BIT_FLAGS)" != "x" ; then \ @@ -2558,7 +2559,7 @@ libinstall: all $(srcdir)/Modules/xxmodu esac; \ done; \ done - $(INSTALL_DATA) `cat pybuilddir.txt`/_sysconfigdata_$(ABIFLAGS)_$(MACHDEP)_$(MULTIARCH).py \ + $(INSTALL_DATA) `cat pybuilddir.txt`/_sysconfigdata_$(MACHDEP).py \ $(DESTDIR)$(LIBDEST); \ $(INSTALL_DATA) $(srcdir)/LICENSE $(DESTDIR)$(LIBDEST)/LICENSE.txt @ # If app store compliance has been configured, apply the patch to the @@ -2572,12 +2573,12 @@ libinstall: all $(srcdir)/Modules/xxmodu @ # Build PYC files for the 3 optimization levels (0, 1, 2) -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ $(PYTHON_FOR_BUILD) -Wi $(DESTDIR)$(LIBDEST)/compileall.py \ - -o 0 -o 1 -o 2 $(COMPILEALL_OPTS) -d $(LIBDEST) -f \ + -o 0 -o 1 $(COMPILEALL_OPTS) -d $(LIBDEST) -f \ -x 'bad_coding|badsyntax|site-packages' \ $(DESTDIR)$(LIBDEST) -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ $(PYTHON_FOR_BUILD) -Wi $(DESTDIR)$(LIBDEST)/compileall.py \ - -o 0 -o 1 -o 2 $(COMPILEALL_OPTS) -d $(LIBDEST)/site-packages -f \ + -o 0 -o 1 $(COMPILEALL_OPTS) -d $(LIBDEST)/site-packages -f \ -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages # bpo-21536: Misc/python-config.sh is generated in the build directory