pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/lang/python37 python37: add pymalloc option.



details:   https://anonhg.NetBSD.org/pkgsrc/rev/f42d415ee969
branches:  trunk
changeset: 325266:f42d415ee969
user:      markd <markd%pkgsrc.org@localhost>
date:      Tue Nov 13 11:54:06 2018 +0000

description:
python37: add pymalloc option.

pymalloc is on by default in non pkgsrc builds. Add option to allow it in
pkgsrc but don't enable so pkgsrc defaults don't change

diffstat:

 lang/python37/Makefile   |    3 +-
 lang/python37/PLIST      |  237 +++++++++++++++++++++++-----------------------
 lang/python37/options.mk |   15 ++-
 3 files changed, 133 insertions(+), 122 deletions(-)

diffs (299 lines):

diff -r 4ec33e478bf6 -r f42d415ee969 lang/python37/Makefile
--- a/lang/python37/Makefile    Tue Nov 13 11:42:35 2018 +0000
+++ b/lang/python37/Makefile    Tue Nov 13 11:54:06 2018 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.2 2018/07/09 11:58:58 ryoon Exp $
+# $NetBSD: Makefile,v 1.3 2018/11/13 11:54:06 markd Exp $
 
 .include "dist.mk"
 
@@ -27,7 +27,6 @@
 CONFIGURE_ARGS+=       --with-system-ffi
 CONFIGURE_ARGS+=       --with-threads
 CONFIGURE_ARGS+=       --without-ensurepip
-CONFIGURE_ARGS+=       --without-pymalloc
 CONFIGURE_ENV+=                OPT=${CFLAGS:M*:Q}
 CONFIGURE_ENV+=                ac_cv_path_mkdir=${TOOLS_PATH.mkdir}
 PKGCONFIG_OVERRIDE+=   Misc/python.pc.in
diff -r 4ec33e478bf6 -r f42d415ee969 lang/python37/PLIST
--- a/lang/python37/PLIST       Tue Nov 13 11:42:35 2018 +0000
+++ b/lang/python37/PLIST       Tue Nov 13 11:54:06 2018 +0000
@@ -1,112 +1,113 @@
-@comment $NetBSD: PLIST,v 1.2 2018/10/22 17:32:48 adam Exp $
+@comment $NetBSD: PLIST,v 1.3 2018/11/13 11:54:06 markd Exp $
 bin/2to3-${PY_VER_SUFFIX}
 bin/pydoc${PY_VER_SUFFIX}
-bin/python${PY_VER_SUFFIX}
-bin/python${PY_VER_SUFFIX}-config
+${PLIST.pymalloc}bin/python${PY_VER_SUFFIX}
+bin/python${PY_VER_SUFFIX}${M}
+bin/python${PY_VER_SUFFIX}${M}-config
 bin/pyvenv-${PY_VER_SUFFIX}
-include/python${PY_VER_SUFFIX}/Python-ast.h
-include/python${PY_VER_SUFFIX}/Python.h
-include/python${PY_VER_SUFFIX}/abstract.h
-include/python${PY_VER_SUFFIX}/accu.h
-include/python${PY_VER_SUFFIX}/asdl.h
-include/python${PY_VER_SUFFIX}/ast.h
-include/python${PY_VER_SUFFIX}/bitset.h
-include/python${PY_VER_SUFFIX}/bltinmodule.h
-include/python${PY_VER_SUFFIX}/boolobject.h
-include/python${PY_VER_SUFFIX}/bytearrayobject.h
-include/python${PY_VER_SUFFIX}/bytes_methods.h
-include/python${PY_VER_SUFFIX}/bytesobject.h
-include/python${PY_VER_SUFFIX}/cellobject.h
-include/python${PY_VER_SUFFIX}/ceval.h
-include/python${PY_VER_SUFFIX}/classobject.h
-include/python${PY_VER_SUFFIX}/code.h
-include/python${PY_VER_SUFFIX}/codecs.h
-include/python${PY_VER_SUFFIX}/compile.h
-include/python${PY_VER_SUFFIX}/complexobject.h
-include/python${PY_VER_SUFFIX}/context.h
-include/python${PY_VER_SUFFIX}/datetime.h
-include/python${PY_VER_SUFFIX}/descrobject.h
-include/python${PY_VER_SUFFIX}/dictobject.h
-include/python${PY_VER_SUFFIX}/dtoa.h
-include/python${PY_VER_SUFFIX}/dynamic_annotations.h
-include/python${PY_VER_SUFFIX}/enumobject.h
-include/python${PY_VER_SUFFIX}/errcode.h
-include/python${PY_VER_SUFFIX}/eval.h
-include/python${PY_VER_SUFFIX}/fileobject.h
-include/python${PY_VER_SUFFIX}/fileutils.h
-include/python${PY_VER_SUFFIX}/floatobject.h
-include/python${PY_VER_SUFFIX}/frameobject.h
-include/python${PY_VER_SUFFIX}/funcobject.h
-include/python${PY_VER_SUFFIX}/genobject.h
-include/python${PY_VER_SUFFIX}/graminit.h
-include/python${PY_VER_SUFFIX}/grammar.h
-include/python${PY_VER_SUFFIX}/import.h
-include/python${PY_VER_SUFFIX}/intrcheck.h
-include/python${PY_VER_SUFFIX}/iterobject.h
-include/python${PY_VER_SUFFIX}/listobject.h
-include/python${PY_VER_SUFFIX}/longintrepr.h
-include/python${PY_VER_SUFFIX}/longobject.h
-include/python${PY_VER_SUFFIX}/marshal.h
-include/python${PY_VER_SUFFIX}/memoryobject.h
-include/python${PY_VER_SUFFIX}/metagrammar.h
-include/python${PY_VER_SUFFIX}/methodobject.h
-include/python${PY_VER_SUFFIX}/modsupport.h
-include/python${PY_VER_SUFFIX}/moduleobject.h
-include/python${PY_VER_SUFFIX}/namespaceobject.h
-include/python${PY_VER_SUFFIX}/node.h
-include/python${PY_VER_SUFFIX}/object.h
-include/python${PY_VER_SUFFIX}/objimpl.h
-include/python${PY_VER_SUFFIX}/odictobject.h
-include/python${PY_VER_SUFFIX}/opcode.h
-include/python${PY_VER_SUFFIX}/osdefs.h
-include/python${PY_VER_SUFFIX}/osmodule.h
-include/python${PY_VER_SUFFIX}/parsetok.h
-include/python${PY_VER_SUFFIX}/patchlevel.h
-include/python${PY_VER_SUFFIX}/pgen.h
-include/python${PY_VER_SUFFIX}/pgenheaders.h
-include/python${PY_VER_SUFFIX}/py_curses.h
-include/python${PY_VER_SUFFIX}/pyarena.h
-include/python${PY_VER_SUFFIX}/pyatomic.h
-include/python${PY_VER_SUFFIX}/pycapsule.h
-include/python${PY_VER_SUFFIX}/pyconfig.h
-include/python${PY_VER_SUFFIX}/pyctype.h
-include/python${PY_VER_SUFFIX}/pydebug.h
-include/python${PY_VER_SUFFIX}/pydtrace.h
-${PLIST.dtrace}include/python${PY_VER_SUFFIX}/pydtrace_probes.h
-include/python${PY_VER_SUFFIX}/pyerrors.h
-include/python${PY_VER_SUFFIX}/pyexpat.h
-include/python${PY_VER_SUFFIX}/pyfpe.h
-include/python${PY_VER_SUFFIX}/pyhash.h
-include/python${PY_VER_SUFFIX}/pylifecycle.h
-include/python${PY_VER_SUFFIX}/pymacconfig.h
-include/python${PY_VER_SUFFIX}/pymacro.h
-include/python${PY_VER_SUFFIX}/pymath.h
-include/python${PY_VER_SUFFIX}/pymem.h
-include/python${PY_VER_SUFFIX}/pyport.h
-include/python${PY_VER_SUFFIX}/pystate.h
-include/python${PY_VER_SUFFIX}/pystrcmp.h
-include/python${PY_VER_SUFFIX}/pystrhex.h
-include/python${PY_VER_SUFFIX}/pystrtod.h
-include/python${PY_VER_SUFFIX}/pythonrun.h
-include/python${PY_VER_SUFFIX}/pythread.h
-include/python${PY_VER_SUFFIX}/pytime.h
-include/python${PY_VER_SUFFIX}/rangeobject.h
-include/python${PY_VER_SUFFIX}/setobject.h
-include/python${PY_VER_SUFFIX}/sliceobject.h
-include/python${PY_VER_SUFFIX}/structmember.h
-include/python${PY_VER_SUFFIX}/structseq.h
-include/python${PY_VER_SUFFIX}/symtable.h
-include/python${PY_VER_SUFFIX}/sysmodule.h
-include/python${PY_VER_SUFFIX}/token.h
-include/python${PY_VER_SUFFIX}/traceback.h
-include/python${PY_VER_SUFFIX}/tupleobject.h
-include/python${PY_VER_SUFFIX}/typeslots.h
-include/python${PY_VER_SUFFIX}/ucnhash.h
-include/python${PY_VER_SUFFIX}/unicodeobject.h
-include/python${PY_VER_SUFFIX}/warnings.h
-include/python${PY_VER_SUFFIX}/weakrefobject.h
-lib/libpython${PY_VER_SUFFIX}.so
-lib/libpython${PY_VER_SUFFIX}.so.1.0
+include/python${PY_VER_SUFFIX}${M}/Python-ast.h
+include/python${PY_VER_SUFFIX}${M}/Python.h
+include/python${PY_VER_SUFFIX}${M}/abstract.h
+include/python${PY_VER_SUFFIX}${M}/accu.h
+include/python${PY_VER_SUFFIX}${M}/asdl.h
+include/python${PY_VER_SUFFIX}${M}/ast.h
+include/python${PY_VER_SUFFIX}${M}/bitset.h
+include/python${PY_VER_SUFFIX}${M}/bltinmodule.h
+include/python${PY_VER_SUFFIX}${M}/boolobject.h
+include/python${PY_VER_SUFFIX}${M}/bytearrayobject.h
+include/python${PY_VER_SUFFIX}${M}/bytes_methods.h
+include/python${PY_VER_SUFFIX}${M}/bytesobject.h
+include/python${PY_VER_SUFFIX}${M}/cellobject.h
+include/python${PY_VER_SUFFIX}${M}/ceval.h
+include/python${PY_VER_SUFFIX}${M}/classobject.h
+include/python${PY_VER_SUFFIX}${M}/code.h
+include/python${PY_VER_SUFFIX}${M}/codecs.h
+include/python${PY_VER_SUFFIX}${M}/compile.h
+include/python${PY_VER_SUFFIX}${M}/complexobject.h
+include/python${PY_VER_SUFFIX}${M}/context.h
+include/python${PY_VER_SUFFIX}${M}/datetime.h
+include/python${PY_VER_SUFFIX}${M}/descrobject.h
+include/python${PY_VER_SUFFIX}${M}/dictobject.h
+include/python${PY_VER_SUFFIX}${M}/dtoa.h
+include/python${PY_VER_SUFFIX}${M}/dynamic_annotations.h
+include/python${PY_VER_SUFFIX}${M}/enumobject.h
+include/python${PY_VER_SUFFIX}${M}/errcode.h
+include/python${PY_VER_SUFFIX}${M}/eval.h
+include/python${PY_VER_SUFFIX}${M}/fileobject.h
+include/python${PY_VER_SUFFIX}${M}/fileutils.h
+include/python${PY_VER_SUFFIX}${M}/floatobject.h
+include/python${PY_VER_SUFFIX}${M}/frameobject.h
+include/python${PY_VER_SUFFIX}${M}/funcobject.h
+include/python${PY_VER_SUFFIX}${M}/genobject.h
+include/python${PY_VER_SUFFIX}${M}/graminit.h
+include/python${PY_VER_SUFFIX}${M}/grammar.h
+include/python${PY_VER_SUFFIX}${M}/import.h
+include/python${PY_VER_SUFFIX}${M}/intrcheck.h
+include/python${PY_VER_SUFFIX}${M}/iterobject.h
+include/python${PY_VER_SUFFIX}${M}/listobject.h
+include/python${PY_VER_SUFFIX}${M}/longintrepr.h
+include/python${PY_VER_SUFFIX}${M}/longobject.h
+include/python${PY_VER_SUFFIX}${M}/marshal.h
+include/python${PY_VER_SUFFIX}${M}/memoryobject.h
+include/python${PY_VER_SUFFIX}${M}/metagrammar.h
+include/python${PY_VER_SUFFIX}${M}/methodobject.h
+include/python${PY_VER_SUFFIX}${M}/modsupport.h
+include/python${PY_VER_SUFFIX}${M}/moduleobject.h
+include/python${PY_VER_SUFFIX}${M}/namespaceobject.h
+include/python${PY_VER_SUFFIX}${M}/node.h
+include/python${PY_VER_SUFFIX}${M}/object.h
+include/python${PY_VER_SUFFIX}${M}/objimpl.h
+include/python${PY_VER_SUFFIX}${M}/odictobject.h
+include/python${PY_VER_SUFFIX}${M}/opcode.h
+include/python${PY_VER_SUFFIX}${M}/osdefs.h
+include/python${PY_VER_SUFFIX}${M}/osmodule.h
+include/python${PY_VER_SUFFIX}${M}/parsetok.h
+include/python${PY_VER_SUFFIX}${M}/patchlevel.h
+include/python${PY_VER_SUFFIX}${M}/pgen.h
+include/python${PY_VER_SUFFIX}${M}/pgenheaders.h
+include/python${PY_VER_SUFFIX}${M}/py_curses.h
+include/python${PY_VER_SUFFIX}${M}/pyarena.h
+include/python${PY_VER_SUFFIX}${M}/pyatomic.h
+include/python${PY_VER_SUFFIX}${M}/pycapsule.h
+include/python${PY_VER_SUFFIX}${M}/pyconfig.h
+include/python${PY_VER_SUFFIX}${M}/pyctype.h
+include/python${PY_VER_SUFFIX}${M}/pydebug.h
+include/python${PY_VER_SUFFIX}${M}/pydtrace.h
+${PLIST.dtrace}include/python${PY_VER_SUFFIX}${M}/pydtrace_probes.h
+include/python${PY_VER_SUFFIX}${M}/pyerrors.h
+include/python${PY_VER_SUFFIX}${M}/pyexpat.h
+include/python${PY_VER_SUFFIX}${M}/pyfpe.h
+include/python${PY_VER_SUFFIX}${M}/pyhash.h
+include/python${PY_VER_SUFFIX}${M}/pylifecycle.h
+include/python${PY_VER_SUFFIX}${M}/pymacconfig.h
+include/python${PY_VER_SUFFIX}${M}/pymacro.h
+include/python${PY_VER_SUFFIX}${M}/pymath.h
+include/python${PY_VER_SUFFIX}${M}/pymem.h
+include/python${PY_VER_SUFFIX}${M}/pyport.h
+include/python${PY_VER_SUFFIX}${M}/pystate.h
+include/python${PY_VER_SUFFIX}${M}/pystrcmp.h
+include/python${PY_VER_SUFFIX}${M}/pystrhex.h
+include/python${PY_VER_SUFFIX}${M}/pystrtod.h
+include/python${PY_VER_SUFFIX}${M}/pythonrun.h
+include/python${PY_VER_SUFFIX}${M}/pythread.h
+include/python${PY_VER_SUFFIX}${M}/pytime.h
+include/python${PY_VER_SUFFIX}${M}/rangeobject.h
+include/python${PY_VER_SUFFIX}${M}/setobject.h
+include/python${PY_VER_SUFFIX}${M}/sliceobject.h
+include/python${PY_VER_SUFFIX}${M}/structmember.h
+include/python${PY_VER_SUFFIX}${M}/structseq.h
+include/python${PY_VER_SUFFIX}${M}/symtable.h
+include/python${PY_VER_SUFFIX}${M}/sysmodule.h
+include/python${PY_VER_SUFFIX}${M}/token.h
+include/python${PY_VER_SUFFIX}${M}/traceback.h
+include/python${PY_VER_SUFFIX}${M}/tupleobject.h
+include/python${PY_VER_SUFFIX}${M}/typeslots.h
+include/python${PY_VER_SUFFIX}${M}/ucnhash.h
+include/python${PY_VER_SUFFIX}${M}/unicodeobject.h
+include/python${PY_VER_SUFFIX}${M}/warnings.h
+include/python${PY_VER_SUFFIX}${M}/weakrefobject.h
+lib/libpython${PY_VER_SUFFIX}${M}.so
+lib/libpython${PY_VER_SUFFIX}${M}.so.1.0
 lib/pkgconfig/python-${PY_VER_SUFFIX}.pc
 lib/python${PY_VER_SUFFIX}/LICENSE.txt
 lib/python${PY_VER_SUFFIX}/__future__.py
@@ -325,18 +326,18 @@
 lib/python${PY_VER_SUFFIX}/concurrent/futures/thread.py
 lib/python${PY_VER_SUFFIX}/concurrent/futures/thread.pyc
 lib/python${PY_VER_SUFFIX}/concurrent/futures/thread.pyo
-lib/python${PY_VER_SUFFIX}/config-${PY_VER_SUFFIX}/Makefile
-lib/python${PY_VER_SUFFIX}/config-${PY_VER_SUFFIX}/Setup
-lib/python${PY_VER_SUFFIX}/config-${PY_VER_SUFFIX}/Setup.local
-lib/python${PY_VER_SUFFIX}/config-${PY_VER_SUFFIX}/config.c
-lib/python${PY_VER_SUFFIX}/config-${PY_VER_SUFFIX}/config.c.in
-lib/python${PY_VER_SUFFIX}/config-${PY_VER_SUFFIX}/install-sh
-lib/python${PY_VER_SUFFIX}/config-${PY_VER_SUFFIX}/libpython${PY_VER_SUFFIX}.a
-lib/python${PY_VER_SUFFIX}/config-${PY_VER_SUFFIX}/makesetup
-lib/python${PY_VER_SUFFIX}/config-${PY_VER_SUFFIX}/python-config.py
-lib/python${PY_VER_SUFFIX}/config-${PY_VER_SUFFIX}/python-config.pyc
-lib/python${PY_VER_SUFFIX}/config-${PY_VER_SUFFIX}/python-config.pyo
-lib/python${PY_VER_SUFFIX}/config-${PY_VER_SUFFIX}/python.o
+lib/python${PY_VER_SUFFIX}/config-${PY_VER_SUFFIX}${M}/Makefile
+lib/python${PY_VER_SUFFIX}/config-${PY_VER_SUFFIX}${M}/Setup
+lib/python${PY_VER_SUFFIX}/config-${PY_VER_SUFFIX}${M}/Setup.local
+lib/python${PY_VER_SUFFIX}/config-${PY_VER_SUFFIX}${M}/config.c
+lib/python${PY_VER_SUFFIX}/config-${PY_VER_SUFFIX}${M}/config.c.in
+lib/python${PY_VER_SUFFIX}/config-${PY_VER_SUFFIX}${M}/install-sh
+lib/python${PY_VER_SUFFIX}/config-${PY_VER_SUFFIX}${M}/libpython${PY_VER_SUFFIX}${M}.a
+lib/python${PY_VER_SUFFIX}/config-${PY_VER_SUFFIX}${M}/makesetup
+lib/python${PY_VER_SUFFIX}/config-${PY_VER_SUFFIX}${M}/python-config.py
+lib/python${PY_VER_SUFFIX}/config-${PY_VER_SUFFIX}${M}/python-config.pyc
+lib/python${PY_VER_SUFFIX}/config-${PY_VER_SUFFIX}${M}/python-config.pyo
+lib/python${PY_VER_SUFFIX}/config-${PY_VER_SUFFIX}${M}/python.o
 lib/python${PY_VER_SUFFIX}/configparser.py
 lib/python${PY_VER_SUFFIX}/configparser.pyc
 lib/python${PY_VER_SUFFIX}/configparser.pyo
diff -r 4ec33e478bf6 -r f42d415ee969 lang/python37/options.mk
--- a/lang/python37/options.mk  Tue Nov 13 11:42:35 2018 +0000
+++ b/lang/python37/options.mk  Tue Nov 13 11:54:06 2018 +0000
@@ -1,7 +1,7 @@
-# $NetBSD: options.mk,v 1.1 2018/07/03 03:55:40 adam Exp $
+# $NetBSD: options.mk,v 1.2 2018/11/13 11:54:06 markd Exp $
 
 PKG_OPTIONS_VAR=       PKG_OPTIONS.python37
-PKG_SUPPORTED_OPTIONS= dtrace x11
+PKG_SUPPORTED_OPTIONS= dtrace pymalloc x11
 PKG_SUGGESTED_OPTIONS= x11
 
 .include "../../mk/bsd.prefs.mk"
@@ -32,3 +32,14 @@
 SUBST_FILES.cdlopen=   setup.py
 SUBST_SED.cdlopen=     -e "s!\(libraries=\[\],\)!\1 runtime_library_dirs=\['${X11BASE}/lib'\],!"
 .endif
+
+PLIST_VARS+=           pymalloc
+.if !empty(PKG_OPTIONS:Mpymalloc)
+PLIST_SUBST+=          M=m
+PLIST.pymalloc=                yes
+PRINT_PLIST_AWK+=      { gsub(/PY_VER_SUFFIX}m/, "PY_VER_SUFFIX}$${M}") }
+PRINT_PLIST_AWK+=      { gsub(/config-${PY_VER_SUFFIX}m/, "config-$${PY_VER_SUFFIX}$${M}") }
+.else
+CONFIGURE_ARGS+=       --without-pymalloc
+PLIST_SUBST+=          M=
+.endif



Home | Main Index | Thread Index | Old Index