pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/lang python38: added version 3.8.0



details:   https://anonhg.NetBSD.org/pkgsrc/rev/7ddb8d74d03c
branches:  trunk
changeset: 415841:7ddb8d74d03c
user:      adam <adam%pkgsrc.org@localhost>
date:      Tue Oct 15 16:50:10 2019 +0000

description:
python38: added version 3.8.0

Major new features of the 3.8 series, compared to 3.7

PEP 572, Assignment expressions
PEP 570, Positional-only arguments
PEP 587, Python Initialization Configuration (improved embedding)
PEP 590, Vectorcall: a fast calling protocol for CPython
PEP 578, Runtime audit hooks
PEP 574, Pickle protocol 5 with out-of-band data
Typing-related: PEP 591 (Final qualifier), PEP 586 (Literal types), and PEP 589 (TypedDict)
Parallel filesystem cache for compiled bytecode
Debug builds share ABI as release builds
f-strings support a handy = specifier for debugging
continue is now legal in finally: blocks
on Windows, the default asyncio event loop is now ProactorEventLoop
on macOS, the spawn start method is now used by default in multiprocessing
multiprocessing can now use shared memory segments to avoid pickling costs between processes
typed_ast is merged back to CPython
LOAD_GLOBAL is now 40% faster
pickle now uses Protocol 4 by default, improving performance

diffstat:

 lang/Makefile                                                |     3 +-
 lang/python/pyversion.mk                                     |    12 +-
 lang/python38/ALTERNATIVES                                   |     4 +
 lang/python38/DESCR                                          |    16 +
 lang/python38/Makefile                                       |   190 +
 lang/python38/PLIST                                          |  5596 ++++++++++
 lang/python38/PLIST.Darwin                                   |     2 +
 lang/python38/PLIST.FreeBSD                                  |     2 +
 lang/python38/PLIST.IRIX                                     |    66 +
 lang/python38/PLIST.Linux                                    |     3 +
 lang/python38/PLIST.SunOS                                    |     2 +
 lang/python38/dist.mk                                        |     8 +
 lang/python38/distinfo                                       |    20 +
 lang/python38/options.mk                                     |    41 +
 lang/python38/patches/patch-Lib_ctypes_util.py               |    76 +
 lang/python38/patches/patch-Lib_distutils_command_install.py |    12 +
 lang/python38/patches/patch-Lib_distutils_sysconfig.py       |    28 +
 lang/python38/patches/patch-Lib_distutils_unixccompiler.py   |    31 +
 lang/python38/patches/patch-Lib_sysconfig.py                 |    26 +
 lang/python38/patches/patch-Makefile.pre.in                  |   114 +
 lang/python38/patches/patch-Modules_makesetup                |    15 +
 lang/python38/patches/patch-Modules_nismodule.c              |    16 +
 lang/python38/patches/patch-Modules_socketmodule.c           |    27 +
 lang/python38/patches/patch-Modules_socketmodule.h           |    15 +
 lang/python38/patches/patch-Python_thread__pthread.h         |    14 +
 lang/python38/patches/patch-configure                        |    38 +
 lang/python38/patches/patch-pyconfig.h.in                    |    16 +
 lang/python38/patches/patch-setup.py                         |   143 +
 28 files changed, 6529 insertions(+), 7 deletions(-)

diffs (truncated from 6686 to 300 lines):

diff -r 5bc631b7d338 -r 7ddb8d74d03c lang/Makefile
--- a/lang/Makefile     Tue Oct 15 14:37:39 2019 +0000
+++ b/lang/Makefile     Tue Oct 15 16:50:10 2019 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.524 2019/10/07 14:38:49 kamil Exp $
+# $NetBSD: Makefile,v 1.525 2019/10/15 16:50:10 adam Exp $
 #
 
 COMMENT=       Programming languages
@@ -221,6 +221,7 @@
 SUBDIR+=       python27
 SUBDIR+=       python36
 SUBDIR+=       python37
+SUBDIR+=       python38
 SUBDIR+=       qore
 SUBDIR+=       racket
 SUBDIR+=       racket-textual
diff -r 5bc631b7d338 -r 7ddb8d74d03c lang/python/pyversion.mk
--- a/lang/python/pyversion.mk  Tue Oct 15 14:37:39 2019 +0000
+++ b/lang/python/pyversion.mk  Tue Oct 15 16:50:10 2019 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: pyversion.mk,v 1.129 2019/04/26 09:44:59 roy Exp $
+# $NetBSD: pyversion.mk,v 1.130 2019/10/15 16:50:10 adam Exp $
 
 # This file determines which Python version is used as a dependency for
 # a package.
@@ -8,7 +8,7 @@
 # PYTHON_VERSION_DEFAULT
 #      The preferred Python version to use.
 #
-#      Possible values: 27 36 37
+#      Possible values: 27 36 37 38
 #      Default: 37
 #
 # === Infrastructure variables ===
@@ -27,13 +27,13 @@
 #      order of the entries matters, since earlier entries are
 #      preferred over later ones.
 #
-#      Possible values: 37 36 27
-#      Default: 37 36 27
+#      Possible values: 38 37 36 27
+#      Default: 38 37 36 27
 #
 # PYTHON_VERSIONS_INCOMPATIBLE
 #      The Python versions that are NOT acceptable for the package.
 #
-#      Possible values: 27 36 37
+#      Possible values: 27 36 37 38
 #      Default: (empty)
 #
 # PYTHON_FOR_BUILD_ONLY
@@ -85,7 +85,7 @@
 BUILD_DEFS_EFFECTS+=   PYPACKAGE
 
 PYTHON_VERSION_DEFAULT?=               37
-PYTHON_VERSIONS_ACCEPTED?=             37 36 27
+PYTHON_VERSIONS_ACCEPTED?=             38 37 36 27
 PYTHON_VERSIONS_INCOMPATIBLE?=         # empty by default
 
 # transform the list into individual variables
diff -r 5bc631b7d338 -r 7ddb8d74d03c lang/python38/ALTERNATIVES
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/python38/ALTERNATIVES        Tue Oct 15 16:50:10 2019 +0000
@@ -0,0 +1,4 @@
+bin/2to3 @PREFIX@/bin/2to3-3.8
+bin/pydoc3 @PREFIX@/bin/pydoc3.8
+bin/python @PREFIX@/bin/python3.8
+bin/python3 @PREFIX@/bin/python3.8
diff -r 5bc631b7d338 -r 7ddb8d74d03c lang/python38/DESCR
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/python38/DESCR       Tue Oct 15 16:50:10 2019 +0000
@@ -0,0 +1,16 @@
+Python is an interpreted, interactive, object-oriented
+programming language that combines remarkable power with
+very clear syntax. For an introduction to programming in
+Python you are referred to the Python Tutorial. The
+Python Library Reference documents built-in and standard
+types, constants, functions and modules. Finally, the
+Python Reference Manual describes the syntax and semantics
+of the core language in (perhaps too) much detail.
+
+Python's basic power can be extended with your own modules
+written in C or C++. On most systems such modules may be
+dynamically loaded. Python is also adaptable as an exten-
+sion language for existing applications. See the internal
+documentation for hints.
+
+This package provides Python version 3.8.x.
diff -r 5bc631b7d338 -r 7ddb8d74d03c lang/python38/Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/python38/Makefile    Tue Oct 15 16:50:10 2019 +0000
@@ -0,0 +1,190 @@
+# $NetBSD: Makefile,v 1.1 2019/10/15 16:50:11 adam Exp $
+
+.include "dist.mk"
+
+PKGNAME=       python38-${PY_DISTVERSION}
+CATEGORIES=    lang python
+
+MAINTAINER=    pkgsrc-users%NetBSD.org@localhost
+HOMEPAGE=      https://www.python.org/
+COMMENT=       Interpreted, interactive, object-oriented programming language
+LICENSE=       python-software-foundation
+
+CONFLICTS+=    python-[0-9]*
+
+PLIST_AWK=             -f ${PKGSRCDIR}/lang/python/plist-python.awk
+PLIST_AWK_ENV+=                PYVERS=38
+PRINT_PLIST_AWK+=      /^[^@]/ && /[^\/]+\.pyc$$/ {
+PRINT_PLIST_AWK+=      sub(/__pycache__\//, "")
+PRINT_PLIST_AWK+=      sub(/\.cpython-38/, "")}
+PRINT_PLIST_AWK+=      /^[^@]/ && /[^\/]+\.opt-1.pyc$$/ {
+PRINT_PLIST_AWK+=      sub(/.opt-[12].pyc$$/, ".pyo")}
+
+USE_LANGUAGES=         c c++
+GNU_CONFIGURE=         yes
+CONFIGURE_ARGS+=       --enable-shared
+CONFIGURE_ARGS+=       --with-openssl=${BUILDLINK_PREFIX.openssl}
+CONFIGURE_ARGS+=       --with-system-ffi
+CONFIGURE_ARGS+=       --without-ensurepip
+CONFIGURE_ENV+=                OPT=${CFLAGS:M*:Q}
+CONFIGURE_ENV+=                ac_cv_path_mkdir=${TOOLS_PATH.mkdir}
+PKGCONFIG_OVERRIDE+=   Misc/python.pc.in
+
+PTHREAD_OPTS+= require
+.include "../../mk/pthread.buildlink3.mk"
+
+.include "../../mk/bsd.prefs.mk"
+
+# http://bugs.python.org/issue13241
+.if !empty(MACHINE_PLATFORM:MDarwin-10.*)
+PKGSRC_COMPILER=       clang
+PKG_CC=                        clang
+PKG_CXX=               clang++
+.endif
+
+# fdatasync()
+LIBS.SunOS+=           -lrt
+
+PY_VER_SUFFIX=         3.8
+
+.if ${OPSYS} == "Darwin"
+PY_PLATNAME=   ${LOWER_OPSYS}
+USE_TOOLS+=    gmake
+.elif ${OPSYS} == "IRIX"
+PY_PLATNAME=   ${LOWER_OPSYS:C/\..*//}
+.elif ${OPSYS} == "SunOS"
+PY_PLATNAME=   sunos${OS_VERSION:C/\..*//}
+.elif ${OPSYS} == "HPUX"
+PY_PLATNAME=   hp-ux11
+.elif ${OPSYS} == "Linux"
+PY_PLATNAME=   linux
+.else
+PY_PLATNAME=   ${LOWER_OPSYS}${OS_VERSION:C/\..*//}
+.endif
+PLIST_SUBST+=  PY_PLATNAME=${PY_PLATNAME:Q}
+
+# ossaudiodev is only available on x86 for the following platforms
+PLIST_VARS+=   oss
+.if (${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "x86_64") && \
+    (${PY_PLATNAME} == "linux" || ${OPSYS} == "FreeBSD")
+PLIST.oss=     yes
+.endif
+
+# For Xcode 5 and up, we need to search the SDK path for headers, otherwise
+# certain modules will not be built.
+.if ${OPSYS} == "Darwin" && exists(${OSX_SDK_PATH:Q}/usr/include)
+CFLAGS+=               -I${OSX_SDK_PATH:Q}/usr/include
+.endif
+
+PLIST_VARS+=   nis
+.for incdir in ${_OPSYS_INCLUDE_DIRS}
+.  if (exists(${incdir}/rpc/rpc.h) || exists(${incdir}/tirpc/rpc/rpc.h))
+HAVE_RPC_H=    yes
+.  endif
+.  if (exists(${incdir}/rpcsvc/yp_prot.h) || exists(${incdir}/nsl/rpcsvc/yp_prot.h))
+HAVE_YP_PROT_H=        yes
+.  endif
+.endfor
+.if (${HAVE_RPC_H:Uno} == yes && ${HAVE_YP_PROT_H:Uno} == yes)
+PLIST.nis=     yes
+.endif
+
+PLIST_SUBST+=  PY_VER_SUFFIX=${PY_VER_SUFFIX:Q}
+
+PRINT_PLIST_AWK+=      { gsub(/${PY_PLATNAME}/, "$${PY_PLATNAME}") }
+PRINT_PLIST_AWK+=      { gsub(/python${PY_VER_SUFFIX}/, \
+                               "python$${PY_VER_SUFFIX}") }
+
+TEST_TARGET=   test
+INSTALL_TARGET=        altinstall
+
+REPLACE_INTERPRETER+=  python
+REPLACE.python.old=    .*python[^ ]*
+REPLACE.python.new=    ${PREFIX}/bin/python${PY_VER_SUFFIX}
+REPLACE_FILES.python+= Lib/base64.py
+REPLACE_FILES.python+= Lib/cProfile.py
+REPLACE_FILES.python+= Lib/cgi.py
+REPLACE_FILES.python+= Lib/encodings/rot_13.py
+REPLACE_FILES.python+= Lib/idlelib/pyshell.py
+REPLACE_FILES.python+= Lib/keyword.py
+REPLACE_FILES.python+= Lib/lib2to3/pgen2/token.py
+REPLACE_FILES.python+= Lib/lib2to3/tests/data/different_encoding.py
+REPLACE_FILES.python+= Lib/lib2to3/tests/data/false_encoding.py
+REPLACE_FILES.python+= Lib/lib2to3/tests/pytree_idempotency.py
+REPLACE_FILES.python+= Lib/pdb.py
+REPLACE_FILES.python+= Lib/platform.py
+REPLACE_FILES.python+= Lib/profile.py
+REPLACE_FILES.python+= Lib/pydoc.py
+REPLACE_FILES.python+= Lib/quopri.py
+REPLACE_FILES.python+= Lib/smtpd.py
+REPLACE_FILES.python+= Lib/smtplib.py
+REPLACE_FILES.python+= Lib/symbol.py
+REPLACE_FILES.python+= Lib/tabnanny.py
+REPLACE_FILES.python+= Lib/tarfile.py
+REPLACE_FILES.python+= Lib/test/bisect_cmd.py
+REPLACE_FILES.python+= Lib/test/crashers/recursive_call.py
+REPLACE_FILES.python+= Lib/test/curses_tests.py
+REPLACE_FILES.python+= Lib/test/re_tests.py
+REPLACE_FILES.python+= Lib/test/regrtest.py
+REPLACE_FILES.python+= Lib/timeit.py
+REPLACE_FILES.python+= Lib/trace.py
+REPLACE_FILES.python+= Lib/turtledemo/__main__.py
+REPLACE_FILES.python+= Lib/turtledemo/bytedesign.py
+REPLACE_FILES.python+= Lib/turtledemo/clock.py
+REPLACE_FILES.python+= Lib/turtledemo/forest.py
+REPLACE_FILES.python+= Lib/turtledemo/fractalcurves.py
+REPLACE_FILES.python+= Lib/turtledemo/lindenmayer.py
+REPLACE_FILES.python+= Lib/turtledemo/minimal_hanoi.py
+REPLACE_FILES.python+= Lib/turtledemo/paint.py
+REPLACE_FILES.python+= Lib/turtledemo/peace.py
+REPLACE_FILES.python+= Lib/turtledemo/penrose.py
+REPLACE_FILES.python+= Lib/turtledemo/planet_and_moon.py
+REPLACE_FILES.python+= Lib/turtledemo/sorting_animate.py
+REPLACE_FILES.python+= Lib/turtledemo/tree.py
+REPLACE_FILES.python+= Lib/turtledemo/yinyang.py
+REPLACE_FILES.python+= Lib/uu.py
+REPLACE_FILES.python+= Lib/webbrowser.py
+
+# XXX: It might be needed to add manually more paths like ${PREFIX}/qt5/lib
+# Test: python -c 'from ctypes.util import find_library; print(find_library("ffi"));'
+SUBST_CLASSES+=                findlib
+SUBST_MESSAGE.findlib= Fixing find_library().
+SUBST_STAGE.findlib=   pre-configure
+SUBST_FILES.findlib=   Lib/ctypes/macholib/dyld.py
+SUBST_FILES.findlib+=  Lib/ctypes/util.py
+SUBST_FILES.findlib+=  Lib/distutils/unixccompiler.py
+SUBST_SED.findlib=     -e 's,/usr/local,${PREFIX},'
+SUBST_SED.findlib+=    -e "s!\('-Wl,-t'\)!'${COMPILER_RPATH_FLAG}${PREFIX}/lib', '-L${PREFIX}/lib', \1!"
+
+.include "options.mk"
+
+CHECK_INTERPRETER_SKIP=        lib/python${PY_VER_SUFFIX}/venv/scripts/posix/pydoc
+CHECK_INTERPRETER_SKIP+=lib/python${PY_VER_SUFFIX}/test/ziptestdata/exe_with_z64
+CHECK_INTERPRETER_SKIP+=lib/python${PY_VER_SUFFIX}/test/ziptestdata/exe_with_zip
+CHECK_INTERPRETER_SKIP+=lib/python${PY_VER_SUFFIX}/test/ziptestdata/header.sh
+
+# Avoid error: Cannot generate ./Include/opcode.h, python not found !
+post-configure:
+       touch ${WRKSRC}/Include/opcode.h
+
+.if ${OPSYS} == "HPUX"
+post-install:
+       ${LN} -fs ${DESTDIR}${PREFIX}/lib/libpython3.8.sl \
+               ${DESTDIR}${PREFIX}/lib/libpython3.8.sl.1.0
+.endif
+
+BUILDLINK_DEPMETHOD.readline=          build
+
+.include "../../archivers/bzip2/buildlink3.mk"
+.include "../../archivers/xz/buildlink3.mk"
+.include "../../devel/gettext-lib/buildlink3.mk"
+.include "../../devel/libffi/buildlink3.mk"
+.include "../../devel/libuuid/buildlink3.mk"
+.include "../../devel/readline/buildlink3.mk"
+.include "../../devel/zlib/buildlink3.mk"
+BUILDLINK_API_DEPENDS.openssl+=        openssl>=1.0.2
+.include "../../security/openssl/buildlink3.mk"
+.include "../../mk/bdb.buildlink3.mk"
+.include "../../mk/dlopen.buildlink3.mk"
+.include "../../mk/oss.buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
diff -r 5bc631b7d338 -r 7ddb8d74d03c lang/python38/PLIST
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/python38/PLIST       Tue Oct 15 16:50:10 2019 +0000
@@ -0,0 +1,5596 @@
+@comment $NetBSD: PLIST,v 1.1 2019/10/15 16:50:11 adam Exp $
+bin/2to3-${PY_VER_SUFFIX}
+bin/pydoc${PY_VER_SUFFIX}
+bin/python${PY_VER_SUFFIX}
+bin/python${PY_VER_SUFFIX}-config
+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}/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



Home | Main Index | Thread Index | Old Index