First hunk:
The swig executable from devel/swig30 is named 'swig3.0' and the build system
only looks for an executable named 'swig':
unable to execute 'swig': No such file or directory

Second hunk:
Fix staging and build the *.pyc and *.pyo files 

--- lang/python/Makefile.in.orig	2023-08-21 07:46:32 UTC
+++ lang/python/Makefile.in
@@ -768,7 +768,7 @@ all-local: copystamp
 	  CFLAGS="$(CFLAGS)" \
 	  srcdir="$(srcdir)" \
 	  top_builddir="$(top_builddir)" \
-	    $$PYTHON setup.py build --verbose --build-base="$$(basename "$${PYTHON}")-gpg" ; \
+	    $$PYTHON setup.py build --verbose --build-base="$$(basename "$${PYTHON}")-gpg" build_ext --swig=$(SWIG) ; \
 	done
 
 python$(PYTHON_VERSION)-gpg/dist/gpg-$(VERSION).tar.gz.asc: copystamp
@@ -811,7 +811,8 @@ install-exec-local:
 	  build \
 	  --build-base="$$(basename "$${PYTHON}")-gpg" \
 	  install \
-	  --prefix "$(DESTDIR)$(prefix)" \
+	  -c -O1 --prefix=$(prefix) \
+	  --root=$(DESTDIR) \
 	  --verbose ; \
 	done
 
