head	1.2;
access;
symbols;
locks; strict;
comment	@# @;


1.2
date	2026.11.08.12.44.10;	author ryoon;	state Exp;
branches;
next	1.1;
commitid	wZSnRdoKmvGuLE2H;

1.1
date	2026.10.10.10.34.19;	author adam;	state Exp;
branches;
next	;
commitid	3QgDdOxfv0nAYUYG;


desc
@@


1.2
log
@lang/python315: Add an option, pyfreethreading for free-threading

This is not mature. Some packages do not build with pyfreethreading.
@
text
@# $NetBSD: options.mk,v 1.1 2026/10/10 10:34:19 adam Exp $

PKG_OPTIONS_VAR=	PKG_OPTIONS.python315
PKG_SUPPORTED_OPTIONS=	dtrace pymalloc tkinter x11 readline pyfreethreading
PKG_SUGGESTED_OPTIONS=	x11 readline

.include "../../mk/bsd.prefs.mk"
.include "../../mk/bsd.options.mk"

PLIST_VARS+=		dtrace readline tkinter

.if !empty(PKG_OPTIONS:Mdtrace)
CONFIGURE_ARGS+=	--with-dtrace
PLIST.dtrace=		yes
.endif

.if !empty(PKG_OPTIONS:Mtkinter)
PLIST.tkinter=	yes
.include "../../lang/tcl/buildlink3.mk"
.include "../../x11/tk/buildlink3.mk"
.else
CONFIGURE_ENV+=		py_cv_module__tkinter="n/a"
.endif

.if !empty(PKG_OPTIONS:Mx11)
# Support for native X11 paths as an option
# This code is no-op for modular X11, however for simplicity don't make it conditional.
SUBST_CLASSES+=		xfindlib
SUBST_MESSAGE.xfindlib=	Fixing find_library() for native X11.
SUBST_STAGE.xfindlib=	pre-configure
SUBST_FILES.xfindlib=	Lib/ctypes/util.py
SUBST_SED.xfindlib=	-e "s!\('-Wl,-t'\)!'${COMPILER_RPATH_FLAG}${X11BASE}/lib', '-L${X11BASE}/lib', \1!"

# Required to get definition of X11BASE and retain X11 rpath paths for linker
# We need to pass rpath to _ctypes.so to get functional dlopen(3) for X11 libs
USE_X11=	weak
.endif

.if !empty(PKG_OPTIONS:Mpymalloc)
CONFIGURE_ARGS+=	--with-pymalloc
.else
CONFIGURE_ARGS+=	--without-pymalloc
.endif

.if ${PKG_OPTIONS:Mreadline}
.  include "../../devel/readline/buildlink3.mk"
CONFIGURE_ARGS+=	--with-readline=readline
PLIST.readline=		yes
.else
CONFIGURE_ARGS+=	--without-readline
.endif

.if !empty(PKG_OPTIONS:Mpyfreethreading)
CONFIGURE_ARGS+=	--disable-gil --enable-optimizations
PY_VER=			3.15t
.else
PY_VER=			3.15
.endif
@


1.1
log
@python315 py315-html-docs: added version 3.15.0

Python 3.15 is the latest stable release of the Python programming language,
with a mix of changes to the language, the implementation, and the standard
library. The biggest changes include lazy imports, frozendict and sentinel
builtins, UTF-8 as the default encoding, unpacking in comprehensions, and a
stable ABI for free-threaded builds.

The library changes include a new profiling package with Tachyon, a
high-frequency statistical sampling profiler, more color in command-line
output, as well as the usual deprecations and removals, and improvements in
user-friendliness and correctness.
@
text
@d1 1
a1 1
# $NetBSD: options.mk,v 1.2 2025/10/11 10:14:06 wiz Exp $
d4 1
a4 1
PKG_SUPPORTED_OPTIONS=	dtrace pymalloc tkinter x11 readline
d52 7
@

