From owner-dev-commits-ports-all@freebsd.org Thu Jul 8 02:13:22 2021 Return-Path: Delivered-To: dev-commits-ports-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id AB2C0660A14; Thu, 8 Jul 2021 02:13:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GL0FZ2s61z4l5b; Thu, 8 Jul 2021 02:13:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3E3A4188D5; Thu, 8 Jul 2021 02:13:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1682DMg9044939; Thu, 8 Jul 2021 02:13:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1682DMlm044938; Thu, 8 Jul 2021 02:13:22 GMT (envelope-from git) Date: Thu, 8 Jul 2021 02:13:22 GMT Message-Id: <202107080213.1682DMlm044938@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-branches@FreeBSD.org From: "Danilo G. Baio" Subject: git: 42b74dbb33b8 - 2021Q3 - lang/python*: Replace DISABLED_EXTENSIONS with Setup.local MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dbaio X-Git-Repository: ports X-Git-Refname: refs/heads/2021Q3 X-Git-Reftype: branch X-Git-Commit: 42b74dbb33b8a8fa1fcd06ca376270fed30c839c Auto-Submitted: auto-generated X-BeenThere: dev-commits-ports-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the ports repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Jul 2021 02:13:22 -0000 The branch 2021Q3 has been updated by dbaio: URL: https://cgit.FreeBSD.org/ports/commit/?id=42b74dbb33b8a8fa1fcd06ca376270fed30c839c commit 42b74dbb33b8a8fa1fcd06ca376270fed30c839c Author: Danilo G. Baio AuthorDate: 2021-07-07 02:04:38 +0000 Commit: Danilo G. Baio CommitDate: 2021-07-08 02:12:09 +0000 lang/python*: Replace DISABLED_EXTENSIONS with Setup.local Currently, lang/python38 and lang/python39 don't honor DISABLED_EXTENSIONS because patch-issue20210 was removed when lang/python38 was added to the ports tree. patch-issue20210 is still present on lang/python36 and lang/python37. Building with poudriere is not affected because builds are executed in a clean environment. Setup.local is the more canonical and recommended method for customizing Python builds for shared extensions & third party libraries. Support for a *disabled* marker in Setup files was introduced in Python 3.7, so backport this fix to it to keep consistency in the ports tree. PR: 243358 [1] PR: 243937 [2] Reported by: ngie [1] Reported by: jcfyecrayz@liamekaens.com [2] Reported by: tuxillo (IRC) DPorts Reviewed by: koobs (python, maintainer) Approved by: koobs, dbaio (python, maintainer) Differential Revision: https://reviews.freebsd.org/D31086 (cherry picked from commit a94d4b1005b1e93a27bcb9e4e794eeb13c991dd5) --- lang/python37/Makefile | 7 +++- lang/python37/files/patch-issue20210 | 68 ------------------------------------ lang/python38/Makefile | 7 +++- lang/python39/Makefile | 7 +++- 4 files changed, 18 insertions(+), 71 deletions(-) diff --git a/lang/python37/Makefile b/lang/python37/Makefile index d95dc23b192a..b08a8d1136e4 100644 --- a/lang/python37/Makefile +++ b/lang/python37/Makefile @@ -31,7 +31,7 @@ PYTHON_SUFFIX= ${PYTHON_VER:S/.//g} DISABLED_EXTENSIONS= _sqlite3 _tkinter _gdbm CONFIGURE_ARGS+= --enable-shared --with-system-ffi --with-system-libmpdec --without-ensurepip -CONFIGURE_ENV+= OPT="" DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS}" # Null out OPT to respect user CFLAGS and remove optimizations +CONFIGURE_ENV+= OPT="" # Null out OPT to respect user CFLAGS and remove optimizations INSTALL_TARGET= altinstall # Don't want cloberring of unprefixed files @@ -112,6 +112,11 @@ post-patch: # which introduces hidden dependency and breaks build @${REINPLACE_CMD} -e 's|uuid/uuid.h|ignore_&|' ${WRKSRC}/configure @${REINPLACE_CMD} -e '/find_library_file/ s|uuid|ignore_&|' ${WRKSRC}/setup.py +# Apply DISABLED_EXTENSIONS + @${ECHO} '*disabled*' > ${WRKSRC}/Modules/Setup.local +. for _module in ${DISABLED_EXTENSIONS} + @${ECHO} ${_module} >> ${WRKSRC}/Modules/Setup.local +. endfor post-install: .if ! ${PORT_OPTIONS:MDEBUG} diff --git a/lang/python37/files/patch-issue20210 b/lang/python37/files/patch-issue20210 deleted file mode 100644 index 90330d8f90a5..000000000000 --- a/lang/python37/files/patch-issue20210 +++ /dev/null @@ -1,68 +0,0 @@ -# Backport patch 0001 from Issue #20210 -# Issue: https://bugs.python.org/issue20210 -# By: Thomas Petazzoni - ---- ./Makefile.pre.in.orig 2014-03-24 22:45:17.908886504 +1100 -+++ ./Makefile.pre.in 2014-03-24 22:47:55.503779805 +1100 -@@ -172,6 +172,8 @@ - # configure script arguments - CONFIG_ARGS= @CONFIG_ARGS@ - -+# disabled extensions -+DISABLED_EXTENSIONS= @DISABLED_EXTENSIONS@ - - # Subdirectories with code - SRCDIRS= @SRCDIRS@ -@@ -555,6 +557,7 @@ - esac; \ - $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' \ - _TCLTK_INCLUDES='$(TCLTK_INCLUDES)' _TCLTK_LIBS='$(TCLTK_LIBS)' \ -+ DISABLED_EXTENSIONS="$(DISABLED_EXTENSIONS)" \ - $(PYTHON_FOR_BUILD) $(srcdir)/setup.py $$quiet build - - # Build static library -@@ -1352,7 +1355,8 @@ - # Install the dynamically loadable modules - # This goes into $(exec_prefix) - sharedinstall: sharedmods -- $(RUNSHARED) $(PYTHON_FOR_BUILD) $(srcdir)/setup.py install \ -+ $(RUNSHARED) DISABLED_EXTENSIONS="$(DISABLED_EXTENSIONS)" \ -+ $(PYTHON_FOR_BUILD) $(srcdir)/setup.py install \ - --prefix=$(prefix) \ - --install-scripts=$(BINDIR) \ - --install-platlib=$(DESTSHARED) \ ---- ./configure.ac.orig 2014-03-24 22:48:10.442551831 +1100 -+++ ./configure.ac 2014-03-24 22:48:42.059827384 +1100 -@@ -2331,6 +2331,8 @@ - - AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) - -+AC_SUBST(DISABLED_EXTENSIONS) -+ - # Check for use of the system expat library - AC_MSG_CHECKING(for --with-system-expat) - AC_ARG_WITH(system_expat, ---- configure.orig 2015-03-01 13:57:08.000000000 +0300 -+++ configure 2015-03-01 13:57:30.000000000 +0300 -@@ -650,6 +650,7 @@ - TCLTK_LIBS - TCLTK_INCLUDES - LIBFFI_INCLUDEDIR -+DISABLED_EXTENSIONS - PKG_CONFIG_LIBDIR - PKG_CONFIG_PATH - PKG_CONFIG ---- ./setup.py.orig 2014-03-24 22:48:48.495472513 +1100 -+++ ./setup.py 2014-03-24 22:49:20.076122201 +1100 -@@ -33,7 +33,10 @@ - COMPILED_WITH_PYDEBUG = ('--with-pydebug' in sysconfig.get_config_var("CONFIG_ARGS")) - - # This global variable is used to hold the list of modules to be disabled. --disabled_module_list = [] -+try: -+ disabled_module_list = sysconfig.get_config_var("DISABLED_EXTENSIONS").split(" ") -+except KeyError: -+ disabled_module_list = list() - - def add_dir_to_list(dirlist, dir): - """Add the directory 'dir' to the list 'dirlist' (after any relative diff --git a/lang/python38/Makefile b/lang/python38/Makefile index 83a6943299b3..26f043a13531 100644 --- a/lang/python38/Makefile +++ b/lang/python38/Makefile @@ -33,7 +33,7 @@ PYTHON_SUFFIX= ${PYTHON_VER:S/.//g} DISABLED_EXTENSIONS= _sqlite3 _tkinter _gdbm CONFIGURE_ARGS+= --enable-shared --without-ensurepip \ --with-system-ffi -CONFIGURE_ENV+= OPT="" DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS}" # Null out OPT to respect user CFLAGS and remove optimizations +CONFIGURE_ENV+= OPT="" # Null out OPT to respect user CFLAGS and remove optimizations INSTALL_TARGET= altinstall # Don't want cloberring of unprefixed files @@ -115,6 +115,11 @@ post-patch: # which introduces hidden dependency and breaks build @${REINPLACE_CMD} -e 's|uuid/uuid.h|ignore_&|' ${WRKSRC}/configure @${REINPLACE_CMD} -e '/find_library_file/ s|uuid|ignore_&|' ${WRKSRC}/setup.py +# Apply DISABLED_EXTENSIONS + @${ECHO} '*disabled*' > ${WRKSRC}/Modules/Setup.local +. for _module in ${DISABLED_EXTENSIONS} + @${ECHO} ${_module} >> ${WRKSRC}/Modules/Setup.local +. endfor post-install: .if ! ${PORT_OPTIONS:MDEBUG} diff --git a/lang/python39/Makefile b/lang/python39/Makefile index 227b7085a135..e937b5a23b23 100644 --- a/lang/python39/Makefile +++ b/lang/python39/Makefile @@ -34,7 +34,7 @@ PYTHON_SUFFIX= ${PYTHON_VER:S/.//g} DISABLED_EXTENSIONS= _sqlite3 _tkinter _gdbm CONFIGURE_ARGS+= --enable-shared --without-ensurepip \ --with-system-ffi -CONFIGURE_ENV+= OPT="" DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS}" # Null out OPT to respect user CFLAGS and remove optimizations +CONFIGURE_ENV+= OPT="" # Null out OPT to respect user CFLAGS and remove optimizations INSTALL_TARGET= altinstall # Don't want cloberring of unprefixed files @@ -116,6 +116,11 @@ post-patch: # which introduces hidden dependency and breaks build @${REINPLACE_CMD} -e 's|uuid/uuid.h|ignore_&|' ${WRKSRC}/configure @${REINPLACE_CMD} -e '/find_library_file/ s|uuid|ignore_&|' ${WRKSRC}/setup.py +# Apply DISABLED_EXTENSIONS + @${ECHO} '*disabled*' > ${WRKSRC}/Modules/Setup.local +. for _module in ${DISABLED_EXTENSIONS} + @${ECHO} ${_module} >> ${WRKSRC}/Modules/Setup.local +. endfor post-install: .if ! ${PORT_OPTIONS:MDEBUG}