[Python-checkins] bpo-46023: Fix makesetup handling of disabled rule (GH-30001)

tiran webhook-mailer at python.org
Fri Dec 10 08:12:07 EST 2021


https://github.com/python/cpython/commit/036bbb1d1b6156a1a72c40e9f907f302505085bc
commit: 036bbb1d1b6156a1a72c40e9f907f302505085bc
branch: main
author: Christian Heimes <christian at python.org>
committer: tiran <christian at python.org>
date: 2021-12-10T14:11:55+01:00
summary:

bpo-46023: Fix makesetup handling of disabled rule (GH-30001)

files:
A Misc/NEWS.d/next/Build/2021-12-09-10-25-11.bpo-46023.PLpNB6.rst
M Modules/makesetup

diff --git a/Misc/NEWS.d/next/Build/2021-12-09-10-25-11.bpo-46023.PLpNB6.rst b/Misc/NEWS.d/next/Build/2021-12-09-10-25-11.bpo-46023.PLpNB6.rst
new file mode 100644
index 0000000000000..4ef9202559394
--- /dev/null
+++ b/Misc/NEWS.d/next/Build/2021-12-09-10-25-11.bpo-46023.PLpNB6.rst
@@ -0,0 +1,2 @@
+:program:`makesetup` no longer builds extensions that have been marked as
+*disabled*. This allows users to disable modules in ``Modules/Setup.local``.
diff --git a/Modules/makesetup b/Modules/makesetup
index 2335724e804cc..6d83b8f0cbb7a 100755
--- a/Modules/makesetup
+++ b/Modules/makesetup
@@ -206,6 +206,9 @@ sed -e 's/[ 	]*#.*//' -e '/^[ 	]*$/d' |
 			cpps="\$(MODULE_${mods_upper}_CFLAGS)"
 			libs="\$(MODULE_${mods_upper}_LDFLAGS)"
 		fi
+		case $DISABLED in
+		*$mods*) doconfig=disabled;;
+		esac
 		case $doconfig in
 		yes)
 			LIBS="$LIBS $libs"



More information about the Python-checkins mailing list