diff options
| author | Matthias Andree <mandree@FreeBSD.org> | 2025-11-01 20:02:17 +0000 |
|---|---|---|
| committer | Matthias Andree <mandree@FreeBSD.org> | 2025-11-01 20:11:56 +0000 |
| commit | 60648732604548051b170d9e599e05b870f9d008 (patch) | |
| tree | 64da5d34241ff31caab5b0e9d1b1130e991162c3 | |
| parent | 962f4aa7d8cdfe5ac7244cc806f4d451a0414da0 (diff) | |
lang/python314: get port ready to ship
claim maintainership on the new port - not doing that with the
previous commit by wen@ to have a clear distinction who contributed
what.
- require archivers/zstd since it's part of the Python standard library:
https://docs.python.org/3.14/whatsnew/3.14.html#whatsnew314-zstandard
- refresh Makefile.pre.in patch
- skip test_gdb without WITH_DEBUG
test_gdb has test_pretty_print, which requires debug symbols.
Skip it if WITH_DEBUG is not defined.
- drop --with-system-ffi configure option, which is no longer supported
and its behaviour is now the default
- move sqlite3 extension back into port
because the separate port fails to build
(mark the external python:-3.13)
PR: 282176
| -rw-r--r-- | Mk/Uses/python.mk | 2 | ||||
| -rw-r--r-- | Mk/bsd.default-versions.mk | 2 | ||||
| -rw-r--r-- | databases/py-sqlite3/Makefile | 2 | ||||
| -rw-r--r-- | lang/python314/Makefile | 18 | ||||
| -rw-r--r-- | lang/python314/files/patch-Makefile.pre.in | 6 | ||||
| -rw-r--r-- | lang/python314/files/pkg-message.in | 1 | ||||
| -rw-r--r-- | lang/python314/pkg-plist | 2 |
7 files changed, 18 insertions, 15 deletions
diff --git a/Mk/Uses/python.mk b/Mk/Uses/python.mk index 3000e4e5a118..66be65eba7cf 100644 --- a/Mk/Uses/python.mk +++ b/Mk/Uses/python.mk @@ -341,7 +341,7 @@ ZEROREGS_UNSAFE= yes # What Python version and what Python interpreters are currently supported? # When adding a version, please keep the comment in # Mk/bsd.default-versions.mk in sync. -_PYTHON_VERSIONS= 3.11 3.12 3.10 2.7 # preferred first +_PYTHON_VERSIONS= 3.11 3.12 3.14 3.10 2.7 # preferred first _PYTHON_PORTBRANCH= 3.11 # ${_PYTHON_VERSIONS:[1]} _PYTHON_BASECMD= ${LOCALBASE}/bin/python _PYTHON_RELPORTDIR= lang/python diff --git a/Mk/bsd.default-versions.mk b/Mk/bsd.default-versions.mk index a1cc119107d9..f016f1879c02 100644 --- a/Mk/bsd.default-versions.mk +++ b/Mk/bsd.default-versions.mk @@ -140,7 +140,7 @@ PYCRYPTOGRAPHY_DEFAULT?= rust . else PYCRYPTOGRAPHY_DEFAULT?= legacy . endif -# Possible values: 3.10, 3.11, 3.12 +# Possible values: 3.10, 3.11, 3.12, 3.14 PYTHON_DEFAULT?= 3.11 # Possible values: 2.7 PYTHON2_DEFAULT?= 2.7 diff --git a/databases/py-sqlite3/Makefile b/databases/py-sqlite3/Makefile index d0b47c51cae6..c54ee0c4efc5 100644 --- a/databases/py-sqlite3/Makefile +++ b/databases/py-sqlite3/Makefile @@ -17,7 +17,7 @@ BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}setuptools>0:devel/py-setuptools@${PY_FLAV ${PYTHON_PKGNAMEPREFIX}wheel>0:devel/py-wheel@${PY_FLAVOR} LIB_DEPENDS= libsqlite3.so:databases/sqlite3 -USES= compiler:c11 python tar:xz +USES= compiler:c11 python:-3.13 tar:xz USE_PYTHON= allflavors autoplist pep517 DISTINFO_FILE= ${PORTSDIR}/lang/python${PYTHON_SUFFIX}/distinfo diff --git a/lang/python314/Makefile b/lang/python314/Makefile index 45097519d7bc..41fa3216fe18 100644 --- a/lang/python314/Makefile +++ b/lang/python314/Makefile @@ -6,16 +6,17 @@ PKGNAMESUFFIX= ${PYTHON_SUFFIX} DISTNAME= Python-${DISTVERSION} DIST_SUBDIR= python -MAINTAINER= python@FreeBSD.org +MAINTAINER= mandree@FreeBSD.org COMMENT= Interpreted object-oriented programming language WWW= https://www.python.org/ LICENSE= PSFL -LIB_DEPENDS= libffi.so:devel/libffi +LIB_DEPENDS= libffi.so:devel/libffi \ + libzstd.so:archivers/zstd USES= compiler:c11 cpe ncurses pathfix pkgconfig readline \ - shebangfix ssl tar:xz + shebangfix sqlite ssl tar:xz PATHFIX_MAKEFILEIN= Makefile.pre.in USE_LDCONFIG= yes GNU_CONFIGURE= yes @@ -30,15 +31,16 @@ PYTHON_VER= ${PYTHON_DISTVERSION:R} PYTHON_VERSION= python${PYTHON_VER} PYTHON_SUFFIX= ${PYTHON_VER:S/.//g} -DISABLED_EXTENSIONS= _sqlite3 _tkinter _gdbm -CONFIGURE_ARGS+= --enable-shared --without-ensurepip \ - --with-system-ffi +DISABLED_EXTENSIONS= _tkinter _gdbm +CONFIGURE_ARGS+= --enable-shared --without-ensurepip CONFIGURE_ENV+= OPT="" # Null out OPT to respect user CFLAGS and remove optimizations INSTALL_TARGET= altinstall # Don't want cloberring of unprefixed files -TEST_TARGET= buildbottest -TEST_ARGS= TESTOPTS=-j${MAKE_JOBS_NUMBER} +# TEST_TARGET= buildbottest # that's the --slow-ci with more resources/longer timeouts +TEST_TARGET= test # that's the --fast-ci with tighter timeouts and using less resources +# TEST_ARGS: test_gdb requires debug symbols for the test_gdb.test_pretty_print test, so skip it unless defined(WITH_DEBUG) +TEST_ARGS= TESTOPTS="-j${MAKE_JOBS_NUMBER} ${WITH_DEBUG:U-x test_gdb}" MAKE_ARGS+= INSTALL_SHARED="${INSTALL_LIB}" # Strip shared library diff --git a/lang/python314/files/patch-Makefile.pre.in b/lang/python314/files/patch-Makefile.pre.in index 7a3acb763099..e5e8bfa7e0e9 100644 --- a/lang/python314/files/patch-Makefile.pre.in +++ b/lang/python314/files/patch-Makefile.pre.in @@ -1,4 +1,4 @@ ---- Makefile.pre.in.orig 2025-01-15 08:42:56 UTC +--- Makefile.pre.in.orig 2025-11-01 17:59:00 UTC +++ Makefile.pre.in @@ -84,7 +84,6 @@ BASECPPFLAGS= @BASECPPFLAGS@ OPT= @OPT@ @@ -30,7 +30,7 @@ PY_LDFLAGS_NODIST=$(CONFIGURE_LDFLAGS_NODIST) $(LDFLAGS_NODIST) PY_LDFLAGS_NOLTO=$(PY_LDFLAGS) $(CONFIGURE_LDFLAGS_NOLTO) $(LDFLAGS_NODIST) NO_AS_NEEDED= @NO_AS_NEEDED@ -@@ -2344,14 +2341,6 @@ bininstall: commoninstall altbininstall +@@ -2492,14 +2489,6 @@ bininstall: commoninstall altbininstall else true; \ fi (cd $(DESTDIR)$(BINDIR); $(LN) -s python$(VERSION)$(EXE) python3$(EXE)) @@ -45,7 +45,7 @@ -rm -f $(DESTDIR)$(BINDIR)/python3-config (cd $(DESTDIR)$(BINDIR); $(LN) -s python$(VERSION)-config python3-config) -rm -f $(DESTDIR)$(LIBPC)/python3.pc -@@ -2798,6 +2787,14 @@ libainstall: all scripts +@@ -2952,6 +2941,14 @@ libainstall: all scripts $(INSTALL_SCRIPT) $(srcdir)/install-sh $(DESTDIR)$(LIBPL)/install-sh $(INSTALL_SCRIPT) python-config.py $(DESTDIR)$(LIBPL)/python-config.py $(INSTALL_SCRIPT) python-config $(DESTDIR)$(BINDIR)/python$(LDVERSION)-config diff --git a/lang/python314/files/pkg-message.in b/lang/python314/files/pkg-message.in index 286359c9f272..d0ccc00761c5 100644 --- a/lang/python314/files/pkg-message.in +++ b/lang/python314/files/pkg-message.in @@ -5,7 +5,6 @@ Note that some standard Python modules are provided as separate ports as they require additional dependencies. They are available as: py%%PYTHON_SUFFIX%%-gdbm databases/py-gdbm@py%%PYTHON_SUFFIX%% -py%%PYTHON_SUFFIX%%-sqlite3 databases/py-sqlite3@py%%PYTHON_SUFFIX%% py%%PYTHON_SUFFIX%%-tkinter x11-toolkits/py-tkinter@py%%PYTHON_SUFFIX%% EOM } diff --git a/lang/python314/pkg-plist b/lang/python314/pkg-plist index e1199297a862..01ff69efb048 100644 --- a/lang/python314/pkg-plist +++ b/lang/python314/pkg-plist @@ -2600,6 +2600,7 @@ lib/python%%XYDOT%%/lib-dynload/_sha1.cpython-%%XY%%%%ABI%%.so lib/python%%XYDOT%%/lib-dynload/_sha2.cpython-%%XY%%%%ABI%%.so lib/python%%XYDOT%%/lib-dynload/_sha3.cpython-%%XY%%%%ABI%%.so lib/python%%XYDOT%%/lib-dynload/_socket.cpython-%%XY%%%%ABI%%.so +lib/python%%XYDOT%%/lib-dynload/_sqlite3.cpython-%%XY%%.so lib/python%%XYDOT%%/lib-dynload/_ssl.cpython-%%XY%%%%ABI%%.so lib/python%%XYDOT%%/lib-dynload/_statistics.cpython-%%XY%%%%ABI%%.so lib/python%%XYDOT%%/lib-dynload/_struct.cpython-%%XY%%%%ABI%%.so @@ -2615,6 +2616,7 @@ lib/python%%XYDOT%%/lib-dynload/_testsinglephase.cpython-%%XY%%%%ABI%%.so lib/python%%XYDOT%%/lib-dynload/_uuid.cpython-%%XY%%%%ABI%%.so lib/python%%XYDOT%%/lib-dynload/_xxtestfuzz.cpython-%%XY%%%%ABI%%.so lib/python%%XYDOT%%/lib-dynload/_zoneinfo.cpython-%%XY%%%%ABI%%.so +lib/python%%XYDOT%%/lib-dynload/_zstd.cpython-%%XY%%%%ABI%%.so lib/python%%XYDOT%%/lib-dynload/array.cpython-%%XY%%%%ABI%%.so lib/python%%XYDOT%%/lib-dynload/binascii.cpython-%%XY%%%%ABI%%.so lib/python%%XYDOT%%/lib-dynload/cmath.cpython-%%XY%%%%ABI%%.so |
