Summary: | lang/python*: DISABLED_EXTENSIONS doesn't work as advertised | ||
---|---|---|---|
Product: | Ports & Packages | Reporter: | Enji Cooper <ngie> |
Component: | Individual Port(s) | Assignee: | Danilo G. Baio <dbaio> |
Status: | Closed FIXED | ||
Severity: | Affects Only Me | CC: | dbaio, ngie |
Priority: | --- | Flags: | dbaio:
maintainer-feedback+
|
Version: | Latest | ||
Hardware: | Any | ||
OS: | Any | ||
URL: | https://reviews.freebsd.org/D31086 |
Description
Enji Cooper
![]() ![]() I take it back. My REINPLACE_CMD was wrong. This works: $ git diff ports/lang/ diff --git a/ports/lang/python38/Makefile b/ports/lang/python38/Makefile index 3bdf1c461846..968cd2b167f5 100644 --- a/ports/lang/python38/Makefile +++ b/ports/lang/python38/Makefile @@ -34,9 +34,9 @@ PYTHON_SUFFIX= ${PYTHON_VER:S/.//g} DISABLED_EXTENSIONS= _sqlite3 _tkinter _gdbm CONFIGURE_ARGS+= --enable-shared --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 +INSTALL_TARGET= altinstall # Don't want clobbering of unprefixed files TEST_TARGET= buildbottest TEST_ARGS= TESTOPTS=-j${MAKE_JOBS_NUMBER} @@ -132,6 +132,10 @@ 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 +.if !empty(DISABLED_EXTENSIONS) + @${REINPLACE_CMD} -e '/^#\*disabled\*/ s|^#||' ${WRKSRC}/Modules/Setup + @${ECHO_CMD} "${DISABLED_EXTENSIONS}" >> ${WRKSRC}/Modules/Setup +.endif post-install: .if ! ${PORT_OPTIONS:MDEBUG} Hi. Thanks and sorry about the delay on this PR. I've just opened this review, please take a look. I'll do more tests; I plan to push it in a day or two. A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=a94d4b1005b1e93a27bcb9e4e794eeb13c991dd5 commit a94d4b1005b1e93a27bcb9e4e794eeb13c991dd5 Author: Danilo G. Baio <dbaio@FreeBSD.org> AuthorDate: 2021-07-07 02:04:38 +0000 Commit: Danilo G. Baio <dbaio@FreeBSD.org> CommitDate: 2021-07-08 01:55:17 +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) MFH: 2021Q3 (build bugfix) Differential Revision: https://reviews.freebsd.org/D31086 lang/python37/Makefile | 7 ++- lang/python37/files/patch-issue20210 (gone) | 68 ----------------------------- lang/python38/Makefile | 7 ++- lang/python39/Makefile | 7 ++- 4 files changed, 18 insertions(+), 71 deletions(-) A commit in branch 2021Q3 references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=42b74dbb33b8a8fa1fcd06ca376270fed30c839c commit 42b74dbb33b8a8fa1fcd06ca376270fed30c839c Author: Danilo G. Baio <dbaio@FreeBSD.org> AuthorDate: 2021-07-07 02:04:38 +0000 Commit: Danilo G. Baio <dbaio@FreeBSD.org> 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 (gone) | 68 ----------------------------- lang/python38/Makefile | 7 ++- lang/python39/Makefile | 7 ++- 4 files changed, 18 insertions(+), 71 deletions(-) Committed, thanks! |