python37: added version 3.7.0
Python 3.7.0 is the newest major release of the Python language, and it contains many new features and optimizations. Among the major new features in Python 3.7 are: PEP 539, new C API for thread-local storage PEP 545, Python documentation translations New documentation translations: Japanese, French, and Korean. PEP 552, Deterministic pyc files PEP 553, Built-in breakpoint() PEP 557, Data Classes PEP 560, Core support for typing module and generic types PEP 562, Customization of access to module attributes PEP 563, Postponed evaluation of annotations PEP 564, Time functions with nanosecond resolution PEP 565, Improved DeprecationWarning handling PEP 567, Context Variables Avoiding the use of ASCII as a default text encoding (PEP 538, legacy C locale coercion and PEP 540, forced UTF-8 runtime mode) The insertion-order preservation nature of dict objects is now an official part of the Python language spec. Notable performance improvements in many areas.
This commit is contained in:
parent
d6d5732773
commit
74b47a89d4
29 changed files with 6378 additions and 9 deletions
|
@ -1,4 +1,4 @@
|
|||
# $NetBSD: Makefile,v 1.484 2018/06/14 01:56:27 agc Exp $
|
||||
# $NetBSD: Makefile,v 1.485 2018/07/03 03:55:40 adam Exp $
|
||||
#
|
||||
|
||||
COMMENT= Programming languages
|
||||
|
@ -204,6 +204,7 @@ SUBDIR+= python27
|
|||
SUBDIR+= python34
|
||||
SUBDIR+= python35
|
||||
SUBDIR+= python36
|
||||
SUBDIR+= python37
|
||||
SUBDIR+= qore
|
||||
SUBDIR+= racket
|
||||
SUBDIR+= racket-textual
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# $NetBSD: pyversion.mk,v 1.123 2017/01/01 14:34:26 adam Exp $
|
||||
# $NetBSD: pyversion.mk,v 1.124 2018/07/03 03:55:40 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 34 35 36
|
||||
# Possible values: 27 34 35 36 37
|
||||
# Default: 27
|
||||
#
|
||||
# === Infrastructure variables ===
|
||||
|
@ -27,13 +27,13 @@
|
|||
# order of the entries matters, since earlier entries are
|
||||
# preferred over later ones.
|
||||
#
|
||||
# Possible values: 36 35 34 27
|
||||
# Default: 36 35 34 27
|
||||
# Possible values: 37 36 35 34 27
|
||||
# Default: 37 36 35 34 27
|
||||
#
|
||||
# PYTHON_VERSIONS_INCOMPATIBLE
|
||||
# The Python versions that are NOT acceptable for the package.
|
||||
#
|
||||
# Possible values: 27 34 35 36
|
||||
# Possible values: 27 34 35 36 37
|
||||
# Default: (empty)
|
||||
#
|
||||
# PYTHON_FOR_BUILD_ONLY
|
||||
|
@ -85,7 +85,7 @@ BUILD_DEFS+= PYTHON_VERSION_DEFAULT
|
|||
BUILD_DEFS_EFFECTS+= PYPACKAGE
|
||||
|
||||
PYTHON_VERSION_DEFAULT?= 27
|
||||
PYTHON_VERSIONS_ACCEPTED?= 36 35 34 27
|
||||
PYTHON_VERSIONS_ACCEPTED?= 37 36 35 34 27
|
||||
PYTHON_VERSIONS_INCOMPATIBLE?= # empty by default
|
||||
|
||||
# transform the list into individual variables
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# $NetBSD: srcdist.mk,v 1.36 2017/01/01 14:34:26 adam Exp $
|
||||
# $NetBSD: srcdist.mk,v 1.37 2018/07/03 03:55:40 adam Exp $
|
||||
|
||||
.include "../../lang/python/pyversion.mk"
|
||||
|
||||
|
@ -11,7 +11,7 @@ WRKSRC= ${WRKDIR}/${PYSUBDIR}
|
|||
# This is used for standard modules shipped with Python but build as
|
||||
# separate packages.
|
||||
|
||||
. if ${PYVERSSUFFIX} == "3.5" || ${PYVERSSUFFIX} == "3.6"
|
||||
. if ${PYVERSSUFFIX} == "3.5" || ${PYVERSSUFFIX} == "3.6" || ${PYVERSSUFFIX} == "3.7"
|
||||
EXTRACT_ELEMENTS+= ${PYSUBDIR}/Modules/clinic
|
||||
. endif
|
||||
|
||||
|
|
4
lang/python37/ALTERNATIVES
Normal file
4
lang/python37/ALTERNATIVES
Normal file
|
@ -0,0 +1,4 @@
|
|||
bin/2to3 @PREFIX@/bin/2to3-3.7
|
||||
bin/pydoc3 @PREFIX@/bin/pydoc3.7
|
||||
bin/python @PREFIX@/bin/python3.7
|
||||
bin/python3 @PREFIX@/bin/python3.7
|
16
lang/python37/DESCR
Normal file
16
lang/python37/DESCR
Normal file
|
@ -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.7.x.
|
200
lang/python37/Makefile
Normal file
200
lang/python37/Makefile
Normal file
|
@ -0,0 +1,200 @@
|
|||
# $NetBSD: Makefile,v 1.1 2018/07/03 03:55:40 adam Exp $
|
||||
|
||||
.include "dist.mk"
|
||||
|
||||
PKGNAME= python37-${PY_DISTVERSION}
|
||||
CATEGORIES= lang python
|
||||
|
||||
MAINTAINER= pkgsrc-users@NetBSD.org
|
||||
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=37
|
||||
PRINT_PLIST_AWK+= /^[^@]/ && /[^\/]+\.pyc$$/ {
|
||||
PRINT_PLIST_AWK+= sub(/__pycache__\//, "")
|
||||
PRINT_PLIST_AWK+= sub(/\.cpython-37/, "")}
|
||||
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+= --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
|
||||
|
||||
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.7
|
||||
|
||||
.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+= dll nis no-nis
|
||||
.if ${OPSYS} == "IRIX"
|
||||
. if ${ABI} == "64"
|
||||
PLIST.no-nis= yes
|
||||
. else
|
||||
PLIST.nis= yes
|
||||
. endif
|
||||
.else
|
||||
PLIST.dll= yes
|
||||
. if ${OPSYS} != "NetBSD" || exists(/usr/bin/ypcat)
|
||||
. if "${OS_VARIANT}" != "chromeos"
|
||||
PLIST.nis= yes
|
||||
. endif
|
||||
. else
|
||||
PLIST.no-nis= yes
|
||||
. endif
|
||||
.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+= py37
|
||||
REPLACE.py37.old= .*python[^ ]*
|
||||
REPLACE.py37.new= ${PREFIX}/bin/python${PY_VER_SUFFIX}
|
||||
REPLACE_FILES.py37+= Lib/base64.py
|
||||
REPLACE_FILES.py37+= Lib/cProfile.py
|
||||
REPLACE_FILES.py37+= Lib/cgi.py
|
||||
REPLACE_FILES.py37+= Lib/encodings/rot_13.py
|
||||
REPLACE_FILES.py37+= Lib/idlelib/pyshell.py
|
||||
REPLACE_FILES.py37+= Lib/keyword.py
|
||||
REPLACE_FILES.py37+= Lib/lib2to3/pgen2/token.py
|
||||
REPLACE_FILES.py37+= Lib/lib2to3/tests/data/different_encoding.py
|
||||
REPLACE_FILES.py37+= Lib/lib2to3/tests/data/false_encoding.py
|
||||
REPLACE_FILES.py37+= Lib/lib2to3/tests/pytree_idempotency.py
|
||||
REPLACE_FILES.py37+= Lib/pdb.py
|
||||
REPLACE_FILES.py37+= Lib/platform.py
|
||||
REPLACE_FILES.py37+= Lib/profile.py
|
||||
REPLACE_FILES.py37+= Lib/pydoc.py
|
||||
REPLACE_FILES.py37+= Lib/quopri.py
|
||||
REPLACE_FILES.py37+= Lib/smtpd.py
|
||||
REPLACE_FILES.py37+= Lib/smtplib.py
|
||||
REPLACE_FILES.py37+= Lib/symbol.py
|
||||
REPLACE_FILES.py37+= Lib/tabnanny.py
|
||||
REPLACE_FILES.py37+= Lib/tarfile.py
|
||||
REPLACE_FILES.py37+= Lib/test/bisect.py
|
||||
REPLACE_FILES.py37+= Lib/test/crashers/recursive_call.py
|
||||
REPLACE_FILES.py37+= Lib/test/curses_tests.py
|
||||
REPLACE_FILES.py37+= Lib/test/re_tests.py
|
||||
REPLACE_FILES.py37+= Lib/test/regrtest.py
|
||||
REPLACE_FILES.py37+= Lib/timeit.py
|
||||
REPLACE_FILES.py37+= Lib/trace.py
|
||||
REPLACE_FILES.py37+= Lib/turtledemo/__main__.py
|
||||
REPLACE_FILES.py37+= Lib/turtledemo/bytedesign.py
|
||||
REPLACE_FILES.py37+= Lib/turtledemo/clock.py
|
||||
REPLACE_FILES.py37+= Lib/turtledemo/forest.py
|
||||
REPLACE_FILES.py37+= Lib/turtledemo/fractalcurves.py
|
||||
REPLACE_FILES.py37+= Lib/turtledemo/lindenmayer.py
|
||||
REPLACE_FILES.py37+= Lib/turtledemo/minimal_hanoi.py
|
||||
REPLACE_FILES.py37+= Lib/turtledemo/paint.py
|
||||
REPLACE_FILES.py37+= Lib/turtledemo/peace.py
|
||||
REPLACE_FILES.py37+= Lib/turtledemo/penrose.py
|
||||
REPLACE_FILES.py37+= Lib/turtledemo/planet_and_moon.py
|
||||
REPLACE_FILES.py37+= Lib/turtledemo/sorting_animate.py
|
||||
REPLACE_FILES.py37+= Lib/turtledemo/tree.py
|
||||
REPLACE_FILES.py37+= Lib/turtledemo/yinyang.py
|
||||
REPLACE_FILES.py37+= Lib/uu.py
|
||||
REPLACE_FILES.py37+= Lib/webbrowser.py
|
||||
|
||||
SUBST_CLASSES+= findlib
|
||||
SUBST_MESSAGE.findlib= Fixing find_library_file on Darwin.
|
||||
SUBST_STAGE.findlib= pre-configure
|
||||
SUBST_FILES.findlib= Lib/distutils/unixccompiler.py
|
||||
SUBST_SED.findlib= -e 's,/usr/local,${PREFIX},'
|
||||
|
||||
# XXX: It might be needed to add manually more paths like ${PREFIX}/qt5/lib
|
||||
# Testing:
|
||||
# >>> from ctypes.util import find_library
|
||||
# >>> find_library("m")
|
||||
# 'libm.so.0'
|
||||
|
||||
SUBST_CLASSES+= pfindlib
|
||||
SUBST_MESSAGE.pfindlib= Fixing find_library() on POSIX-like (excluding Darwin) systems.
|
||||
SUBST_STAGE.pfindlib= pre-configure
|
||||
SUBST_FILES.pfindlib= Lib/ctypes/util.py
|
||||
SUBST_SED.pfindlib= -e 's!\(-Wl,-t -o\)!${COMPILER_RPATH_FLAG}${PREFIX}/lib -L${PREFIX}/lib \1!'
|
||||
|
||||
.include "options.mk"
|
||||
|
||||
CHECK_INTERPRETER_SKIP= lib/python${PY_VER_SUFFIX}/venv/scripts/posix/pydoc
|
||||
|
||||
# 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.7.sl \
|
||||
${DESTDIR}${PREFIX}/lib/libpython3.7.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"
|
||||
.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"
|
5339
lang/python37/PLIST
Normal file
5339
lang/python37/PLIST
Normal file
File diff suppressed because it is too large
Load diff
2
lang/python37/PLIST.Darwin
Normal file
2
lang/python37/PLIST.Darwin
Normal file
|
@ -0,0 +1,2 @@
|
|||
@comment $NetBSD: PLIST.Darwin,v 1.1 2018/07/03 03:55:40 adam Exp $
|
||||
lib/python${PY_VER_SUFFIX}/lib-dynload/_scproxy.so
|
2
lang/python37/PLIST.FreeBSD
Normal file
2
lang/python37/PLIST.FreeBSD
Normal file
|
@ -0,0 +1,2 @@
|
|||
@comment $NetBSD: PLIST.FreeBSD,v 1.1 2018/07/03 03:55:40 adam Exp $
|
||||
lib/python${PY_VER_SUFFIX}/lib-dynload/ossaudiodev.so
|
66
lang/python37/PLIST.IRIX
Normal file
66
lang/python37/PLIST.IRIX
Normal file
|
@ -0,0 +1,66 @@
|
|||
@comment $NetBSD: PLIST.IRIX,v 1.1 2018/07/03 03:55:40 adam Exp $
|
||||
lib/python${PY_VER_SUFFIX}/plat-${PY_PLATNAME}/AL.py
|
||||
lib/python${PY_VER_SUFFIX}/plat-${PY_PLATNAME}/AL.pyc
|
||||
lib/python${PY_VER_SUFFIX}/plat-${PY_PLATNAME}/AL.pyo
|
||||
lib/python${PY_VER_SUFFIX}/plat-${PY_PLATNAME}/CD.py
|
||||
lib/python${PY_VER_SUFFIX}/plat-${PY_PLATNAME}/CD.pyc
|
||||
lib/python${PY_VER_SUFFIX}/plat-${PY_PLATNAME}/CD.pyo
|
||||
lib/python${PY_VER_SUFFIX}/plat-${PY_PLATNAME}/CL..pyc
|
||||
lib/python${PY_VER_SUFFIX}/plat-${PY_PLATNAME}/CL..pyo
|
||||
lib/python${PY_VER_SUFFIX}/plat-${PY_PLATNAME}/CL.py
|
||||
lib/python${PY_VER_SUFFIX}/plat-${PY_PLATNAME}/DEVICE.py
|
||||
lib/python${PY_VER_SUFFIX}/plat-${PY_PLATNAME}/DEVICE.pyc
|
||||
lib/python${PY_VER_SUFFIX}/plat-${PY_PLATNAME}/DEVICE.pyo
|
||||
lib/python${PY_VER_SUFFIX}/plat-${PY_PLATNAME}/ERRNO.py
|
||||
lib/python${PY_VER_SUFFIX}/plat-${PY_PLATNAME}/ERRNO.pyc
|
||||
lib/python${PY_VER_SUFFIX}/plat-${PY_PLATNAME}/ERRNO.pyo
|
||||
lib/python${PY_VER_SUFFIX}/plat-${PY_PLATNAME}/FILE.py
|
||||
lib/python${PY_VER_SUFFIX}/plat-${PY_PLATNAME}/FILE.pyc
|
||||
lib/python${PY_VER_SUFFIX}/plat-${PY_PLATNAME}/FILE.pyo
|
||||
lib/python${PY_VER_SUFFIX}/plat-${PY_PLATNAME}/FL.py
|
||||
lib/python${PY_VER_SUFFIX}/plat-${PY_PLATNAME}/FL.pyc
|
||||
lib/python${PY_VER_SUFFIX}/plat-${PY_PLATNAME}/FL.pyo
|
||||
lib/python${PY_VER_SUFFIX}/plat-${PY_PLATNAME}/GET.py
|
||||
lib/python${PY_VER_SUFFIX}/plat-${PY_PLATNAME}/GET.pyc
|
||||
lib/python${PY_VER_SUFFIX}/plat-${PY_PLATNAME}/GET.pyo
|
||||
lib/python${PY_VER_SUFFIX}/plat-${PY_PLATNAME}/GL.py
|
||||
lib/python${PY_VER_SUFFIX}/plat-${PY_PLATNAME}/GL.pyc
|
||||
lib/python${PY_VER_SUFFIX}/plat-${PY_PLATNAME}/GL.pyo
|
||||
lib/python${PY_VER_SUFFIX}/plat-${PY_PLATNAME}/GLWS.py
|
||||
lib/python${PY_VER_SUFFIX}/plat-${PY_PLATNAME}/GLWS.pyc
|
||||
lib/python${PY_VER_SUFFIX}/plat-${PY_PLATNAME}/GLWS.pyo
|
||||
lib/python${PY_VER_SUFFIX}/plat-${PY_PLATNAME}/IOCTL.py
|
||||
lib/python${PY_VER_SUFFIX}/plat-${PY_PLATNAME}/IOCTL.pyc
|
||||
lib/python${PY_VER_SUFFIX}/plat-${PY_PLATNAME}/IOCTL.pyo
|
||||
lib/python${PY_VER_SUFFIX}/plat-${PY_PLATNAME}/SV.py
|
||||
lib/python${PY_VER_SUFFIX}/plat-${PY_PLATNAME}/SV.pyc
|
||||
lib/python${PY_VER_SUFFIX}/plat-${PY_PLATNAME}/SV.pyo
|
||||
lib/python${PY_VER_SUFFIX}/plat-${PY_PLATNAME}/WAIT.py
|
||||
lib/python${PY_VER_SUFFIX}/plat-${PY_PLATNAME}/WAIT.pyc
|
||||
lib/python${PY_VER_SUFFIX}/plat-${PY_PLATNAME}/WAIT.pyo
|
||||
lib/python${PY_VER_SUFFIX}/plat-${PY_PLATNAME}/cddb.py
|
||||
lib/python${PY_VER_SUFFIX}/plat-${PY_PLATNAME}/cddb.pyc
|
||||
lib/python${PY_VER_SUFFIX}/plat-${PY_PLATNAME}/cddb.pyo
|
||||
lib/python${PY_VER_SUFFIX}/plat-${PY_PLATNAME}/cdplayer.py
|
||||
lib/python${PY_VER_SUFFIX}/plat-${PY_PLATNAME}/cdplayer.pyc
|
||||
lib/python${PY_VER_SUFFIX}/plat-${PY_PLATNAME}/cdplayer.pyo
|
||||
lib/python${PY_VER_SUFFIX}/plat-${PY_PLATNAME}/flp.doc
|
||||
lib/python${PY_VER_SUFFIX}/plat-${PY_PLATNAME}/flp.py
|
||||
lib/python${PY_VER_SUFFIX}/plat-${PY_PLATNAME}/flp.pyc
|
||||
lib/python${PY_VER_SUFFIX}/plat-${PY_PLATNAME}/flp.pyo
|
||||
lib/python${PY_VER_SUFFIX}/plat-${PY_PLATNAME}/jpeg.py
|
||||
lib/python${PY_VER_SUFFIX}/plat-${PY_PLATNAME}/jpeg.pyc
|
||||
lib/python${PY_VER_SUFFIX}/plat-${PY_PLATNAME}/jpeg.pyo
|
||||
lib/python${PY_VER_SUFFIX}/plat-${PY_PLATNAME}/panel.py
|
||||
lib/python${PY_VER_SUFFIX}/plat-${PY_PLATNAME}/panel.pyc
|
||||
lib/python${PY_VER_SUFFIX}/plat-${PY_PLATNAME}/panel.pyo
|
||||
lib/python${PY_VER_SUFFIX}/plat-${PY_PLATNAME}/panelparser.py
|
||||
lib/python${PY_VER_SUFFIX}/plat-${PY_PLATNAME}/panelparser.pyc
|
||||
lib/python${PY_VER_SUFFIX}/plat-${PY_PLATNAME}/panelparser.pyo
|
||||
lib/python${PY_VER_SUFFIX}/plat-${PY_PLATNAME}/readcd.doc
|
||||
lib/python${PY_VER_SUFFIX}/plat-${PY_PLATNAME}/readcd.py
|
||||
lib/python${PY_VER_SUFFIX}/plat-${PY_PLATNAME}/readcd.pyc
|
||||
lib/python${PY_VER_SUFFIX}/plat-${PY_PLATNAME}/readcd.pyo
|
||||
lib/python${PY_VER_SUFFIX}/plat-${PY_PLATNAME}/torgb.py
|
||||
lib/python${PY_VER_SUFFIX}/plat-${PY_PLATNAME}/torgb.pyc
|
||||
lib/python${PY_VER_SUFFIX}/plat-${PY_PLATNAME}/torgb.pyo
|
3
lang/python37/PLIST.Linux
Normal file
3
lang/python37/PLIST.Linux
Normal file
|
@ -0,0 +1,3 @@
|
|||
@comment $NetBSD: PLIST.Linux,v 1.1 2018/07/03 03:55:40 adam Exp $
|
||||
lib/python${PY_VER_SUFFIX}/lib-dynload/ossaudiodev.so
|
||||
lib/python${PY_VER_SUFFIX}/lib-dynload/spwd.so
|
24
lang/python37/buildlink3.mk
Normal file
24
lang/python37/buildlink3.mk
Normal file
|
@ -0,0 +1,24 @@
|
|||
# $NetBSD: buildlink3.mk,v 1.1 2018/07/03 03:55:40 adam Exp $
|
||||
|
||||
BUILDLINK_TREE+= python37
|
||||
|
||||
.if !defined(PYTHON37_BUILDLINK3_MK)
|
||||
PYTHON37_BUILDLINK3_MK:=
|
||||
|
||||
BUILDLINK_API_DEPENDS.python37+= python37>=3.7.0
|
||||
BUILDLINK_PKGSRCDIR.python37?= ../../lang/python37
|
||||
|
||||
.if defined(BUILDLINK_DEPMETHOD.python)
|
||||
BUILDLINK_DEPMETHOD.python37?= ${BUILDLINK_DEPMETHOD.python}
|
||||
.endif
|
||||
|
||||
BUILDLINK_INCDIRS.python37+= include/python3.7
|
||||
BUILDLINK_LIBDIRS.python37+= lib/python3.7/config
|
||||
BUILDLINK_TRANSFORM+= l:python:python3.7
|
||||
|
||||
.include "../../mk/dlopen.buildlink3.mk"
|
||||
.include "../../mk/pthread.buildlink3.mk"
|
||||
.include "../../devel/gettext-lib/buildlink3.mk"
|
||||
.endif # PYTHON37_BUILDLINK3_MK
|
||||
|
||||
BUILDLINK_TREE+= -python37
|
8
lang/python37/dist.mk
Normal file
8
lang/python37/dist.mk
Normal file
|
@ -0,0 +1,8 @@
|
|||
# $NetBSD: dist.mk,v 1.1 2018/07/03 03:55:40 adam Exp $
|
||||
|
||||
PY_DISTVERSION= 3.7.0
|
||||
DISTNAME= Python-${PY_DISTVERSION}
|
||||
EXTRACT_SUFX= .tar.xz
|
||||
DISTINFO_FILE= ${.CURDIR}/../../lang/python37/distinfo
|
||||
PATCHDIR= ${.CURDIR}/../../lang/python37/patches
|
||||
MASTER_SITES= http://www.python.org/ftp/python/${PY_DISTVERSION}/
|
20
lang/python37/distinfo
Normal file
20
lang/python37/distinfo
Normal file
|
@ -0,0 +1,20 @@
|
|||
$NetBSD: distinfo,v 1.1 2018/07/03 03:55:40 adam Exp $
|
||||
|
||||
SHA1 (Python-3.7.0.tar.xz) = 653cffa5b9f2a28150afe4705600d2e55d89b564
|
||||
RMD160 (Python-3.7.0.tar.xz) = dfd13505dcd274e3307cd5ad3d233952ed90fa90
|
||||
SHA512 (Python-3.7.0.tar.xz) = 8bb11233fb67ee9ab8ed1b72f8fdc62f66e26a6beaaeb92448bce681cf065269833b1658d3ed2459127f25ba43adb0eab73cf27c59834a2a803fb529b4216739
|
||||
Size (Python-3.7.0.tar.xz) = 16922100 bytes
|
||||
SHA1 (patch-Lib_distutils_command_install.py) = 6fc6f5d918b7581fc62cd0fe55857ee932c3a341
|
||||
SHA1 (patch-Lib_distutils_sysconfig.py) = 6822eafb4dfded86d7f7353831816aeb8119e6cf
|
||||
SHA1 (patch-Lib_distutils_unixccompiler.py) = 2e65a8dd5dd3fe25957206c062106fa7a6fc4e69
|
||||
SHA1 (patch-Lib_sysconfig.py) = a4f009ed73ebbd9d9c4bf7e12b7981182ed8fd7c
|
||||
SHA1 (patch-Makefile.pre.in) = c91aac5b238dbfe149be63a2486b6f4c5b959280
|
||||
SHA1 (patch-Modules___uuidmodule.c) = fe66366866a924653b3d97625e8ef20be8766d25
|
||||
SHA1 (patch-Modules_makesetup) = a06786eebffadecedba5e3a50a9785fb47613567
|
||||
SHA1 (patch-Modules_nismodule.c) = 1bafe9b06359586d027a77011b103877590d947d
|
||||
SHA1 (patch-Modules_socketmodule.c) = c0bdb256bccc176c2406feec4080cd91fcb693b2
|
||||
SHA1 (patch-Modules_socketmodule.h) = 13a3290eb72078067060d3e71b7baa08f3eb591c
|
||||
SHA1 (patch-Python_thread__pthread.h) = fb81eaa604b4ed7c1b64c3f4731d58a8aee257be
|
||||
SHA1 (patch-configure) = f807fdef84500f2c0fd2d0069936b31167966077
|
||||
SHA1 (patch-pyconfig.h.in) = 58e2c03489f9b6e4d88f144d8c09773f92eacd61
|
||||
SHA1 (patch-setup.py) = 3edd2ab894f453be19dc4af06f3e78f49e5e2c34
|
34
lang/python37/options.mk
Normal file
34
lang/python37/options.mk
Normal file
|
@ -0,0 +1,34 @@
|
|||
# $NetBSD: options.mk,v 1.1 2018/07/03 03:55:40 adam Exp $
|
||||
|
||||
PKG_OPTIONS_VAR= PKG_OPTIONS.python37
|
||||
PKG_SUPPORTED_OPTIONS= dtrace x11
|
||||
PKG_SUGGESTED_OPTIONS= x11
|
||||
|
||||
.include "../../mk/bsd.prefs.mk"
|
||||
.include "../../mk/bsd.options.mk"
|
||||
|
||||
PLIST_VARS+= dtrace
|
||||
.if !empty(PKG_OPTIONS:Mdtrace)
|
||||
CONFIGURE_ARGS+= --with-dtrace
|
||||
PLIST.dtrace= yes
|
||||
.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+= x11findlib
|
||||
SUBST_MESSAGE.x11findlib= Fixing find_library() for native X11.
|
||||
SUBST_STAGE.x11findlib= pre-configure
|
||||
SUBST_FILES.x11findlib= Lib/ctypes/util.py
|
||||
SUBST_SED.x11findlib= -e 's!\(-Wl,-t -o\)!${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= yes
|
||||
|
||||
SUBST_CLASSES+= cdlopen
|
||||
SUBST_MESSAGE.cdlopen= Handle X11BASE paths in dlopen(3) calls of _ctypes.so
|
||||
SUBST_STAGE.cdlopen= pre-configure
|
||||
SUBST_FILES.cdlopen= setup.py
|
||||
SUBST_SED.cdlopen= -e "s!\(libraries=\[\],\)!\1 runtime_library_dirs=\['${X11BASE}/lib'\],!"
|
||||
.endif
|
12
lang/python37/patches/patch-Lib_distutils_command_install.py
Normal file
12
lang/python37/patches/patch-Lib_distutils_command_install.py
Normal file
|
@ -0,0 +1,12 @@
|
|||
$NetBSD: patch-Lib_distutils_command_install.py,v 1.1 2018/07/03 03:55:40 adam Exp $
|
||||
|
||||
--- Lib/distutils/command/install.py.orig 2016-12-23 02:21:19.000000000 +0000
|
||||
+++ Lib/distutils/command/install.py
|
||||
@@ -652,5 +652,6 @@ class install(Command):
|
||||
('install_headers', has_headers),
|
||||
('install_scripts', has_scripts),
|
||||
('install_data', has_data),
|
||||
- ('install_egg_info', lambda self:True),
|
||||
]
|
||||
+ if not os.environ.get('PKGSRC_PYTHON_NO_EGG'):
|
||||
+ sub_commands += [('install_egg_info', lambda self:True),]
|
28
lang/python37/patches/patch-Lib_distutils_sysconfig.py
Normal file
28
lang/python37/patches/patch-Lib_distutils_sysconfig.py
Normal file
|
@ -0,0 +1,28 @@
|
|||
$NetBSD: patch-Lib_distutils_sysconfig.py,v 1.1 2018/07/03 03:55:40 adam Exp $
|
||||
|
||||
Remove _multiarch from config path (differs across platforms).
|
||||
Simplify _sysconfigdata to include only platform name.
|
||||
|
||||
--- Lib/distutils/sysconfig.py.orig 2016-12-23 02:21:19.000000000 +0000
|
||||
+++ Lib/distutils/sysconfig.py
|
||||
@@ -242,8 +242,6 @@ def get_makefile_filename():
|
||||
return os.path.join(_sys_home or project_base, "Makefile")
|
||||
lib_dir = get_python_lib(plat_specific=0, standard_lib=1)
|
||||
config_file = 'config-{}{}'.format(get_python_version(), build_flags)
|
||||
- if hasattr(sys.implementation, '_multiarch'):
|
||||
- config_file += '-%s' % sys.implementation._multiarch
|
||||
return os.path.join(lib_dir, config_file, 'Makefile')
|
||||
|
||||
|
||||
@@ -419,10 +417,8 @@ def _init_posix():
|
||||
"""Initialize the module as appropriate for POSIX systems."""
|
||||
# _sysconfigdata is generated at build time, see the sysconfig module
|
||||
name = os.environ.get('_PYTHON_SYSCONFIGDATA_NAME',
|
||||
- '_sysconfigdata_{abi}_{platform}_{multiarch}'.format(
|
||||
- abi=sys.abiflags,
|
||||
+ '_sysconfigdata_{platform}'.format(
|
||||
platform=sys.platform,
|
||||
- multiarch=getattr(sys.implementation, '_multiarch', ''),
|
||||
))
|
||||
_temp = __import__(name, globals(), locals(), ['build_time_vars'], 0)
|
||||
build_time_vars = _temp.build_time_vars
|
31
lang/python37/patches/patch-Lib_distutils_unixccompiler.py
Normal file
31
lang/python37/patches/patch-Lib_distutils_unixccompiler.py
Normal file
|
@ -0,0 +1,31 @@
|
|||
$NetBSD: patch-Lib_distutils_unixccompiler.py,v 1.1 2018/07/03 03:55:40 adam Exp $
|
||||
|
||||
Do not force RUNPATH vs RPATH, trust the compiler to know what the
|
||||
platform wants.
|
||||
|
||||
--- Lib/distutils/unixccompiler.py.orig 2018-03-29 11:57:55.000000000 +0000
|
||||
+++ Lib/distutils/unixccompiler.py
|
||||
@@ -234,22 +234,7 @@ class UnixCCompiler(CCompiler):
|
||||
return ["-Wl,+s", "-L" + dir]
|
||||
return ["+s", "-L" + dir]
|
||||
else:
|
||||
- if self._is_gcc(compiler):
|
||||
- # gcc on non-GNU systems does not need -Wl, but can
|
||||
- # use it anyway. Since distutils has always passed in
|
||||
- # -Wl whenever gcc was used in the past it is probably
|
||||
- # safest to keep doing so.
|
||||
- if sysconfig.get_config_var("GNULD") == "yes":
|
||||
- # GNU ld needs an extra option to get a RUNPATH
|
||||
- # instead of just an RPATH.
|
||||
- return "-Wl,--enable-new-dtags,-R" + dir
|
||||
- else:
|
||||
- return "-Wl,-R" + dir
|
||||
- else:
|
||||
- # No idea how --enable-new-dtags would be passed on to
|
||||
- # ld if this system was using GNU ld. Don't know if a
|
||||
- # system like this even exists.
|
||||
- return "-R" + dir
|
||||
+ return "-Wl,-R" + dir
|
||||
|
||||
def library_option(self, lib):
|
||||
return "-l" + lib
|
26
lang/python37/patches/patch-Lib_sysconfig.py
Normal file
26
lang/python37/patches/patch-Lib_sysconfig.py
Normal file
|
@ -0,0 +1,26 @@
|
|||
$NetBSD: patch-Lib_sysconfig.py,v 1.1 2018/07/03 03:55:40 adam Exp $
|
||||
|
||||
Remove _multiarch from config path (differs across platforms).
|
||||
Simplify _sysconfigdata to include only platform name.
|
||||
|
||||
--- Lib/sysconfig.py.orig 2016-12-23 02:21:19.000000000 +0000
|
||||
+++ Lib/sysconfig.py
|
||||
@@ -337,17 +337,13 @@ def get_makefile_filename():
|
||||
config_dir_name = 'config-%s%s' % (_PY_VERSION_SHORT, sys.abiflags)
|
||||
else:
|
||||
config_dir_name = 'config'
|
||||
- if hasattr(sys.implementation, '_multiarch'):
|
||||
- config_dir_name += '-%s' % sys.implementation._multiarch
|
||||
return os.path.join(get_path('stdlib'), config_dir_name, 'Makefile')
|
||||
|
||||
|
||||
def _get_sysconfigdata_name():
|
||||
return os.environ.get('_PYTHON_SYSCONFIGDATA_NAME',
|
||||
- '_sysconfigdata_{abi}_{platform}_{multiarch}'.format(
|
||||
- abi=sys.abiflags,
|
||||
+ '_sysconfigdata_{platform}'.format(
|
||||
platform=sys.platform,
|
||||
- multiarch=getattr(sys.implementation, '_multiarch', ''),
|
||||
))
|
||||
|
||||
|
120
lang/python37/patches/patch-Makefile.pre.in
Normal file
120
lang/python37/patches/patch-Makefile.pre.in
Normal file
|
@ -0,0 +1,120 @@
|
|||
$NetBSD: patch-Makefile.pre.in,v 1.1 2018/07/03 03:55:40 adam Exp $
|
||||
|
||||
Use only one optimisation level; needed for PLIST and setuptools compatibility.
|
||||
Do not build/install libpython3.so.
|
||||
Simplify _sysconfigdata to include only platform name.
|
||||
Swap targets libinstall and libainstall, to byte-compile python-config.py.
|
||||
|
||||
--- Makefile.pre.in.orig 2017-12-19 04:53:56.000000000 +0000
|
||||
+++ Makefile.pre.in
|
||||
@@ -96,7 +96,7 @@ PY_CFLAGS_NODIST=$(CONFIGURE_CFLAGS_NODI
|
||||
# be able to build extension modules using the directories specified in the
|
||||
# environment variables
|
||||
PY_CPPFLAGS= $(BASECPPFLAGS) -I. -I$(srcdir)/Include $(CONFIGURE_CPPFLAGS) $(CPPFLAGS)
|
||||
-PY_LDFLAGS= $(CONFIGURE_LDFLAGS) $(LDFLAGS)
|
||||
+PY_LDFLAGS= -L. $(CONFIGURE_LDFLAGS) $(LDFLAGS)
|
||||
NO_AS_NEEDED= @NO_AS_NEEDED@
|
||||
LDLAST= @LDLAST@
|
||||
SGI_ABI= @SGI_ABI@
|
||||
@@ -207,7 +207,7 @@ DIST= $(DISTFILES) $(DISTDIRS)
|
||||
LIBRARY= @LIBRARY@
|
||||
LDLIBRARY= @LDLIBRARY@
|
||||
BLDLIBRARY= @BLDLIBRARY@
|
||||
-PY3LIBRARY= @PY3LIBRARY@
|
||||
+PY3LIBRARY=
|
||||
DLLLIBRARY= @DLLLIBRARY@
|
||||
LDLIBRARYDIR= @LDLIBRARYDIR@
|
||||
INSTSONAME= @INSTSONAME@
|
||||
@@ -432,7 +432,7 @@ LIBRARY_OBJS= \
|
||||
# On some systems, object files that reference DTrace probes need to be modified
|
||||
# in-place by dtrace(1).
|
||||
DTRACE_DEPS = \
|
||||
- Python/ceval.o
|
||||
+ Python/ceval.o Modules/gcmodule.o
|
||||
# XXX: should gcmodule, etc. be here, too?
|
||||
|
||||
#########################################################################
|
||||
@@ -886,7 +886,6 @@ regen-opcode-targets:
|
||||
$(srcdir)/Python/opcode_targets.h.new
|
||||
$(UPDATE_FILE) $(srcdir)/Python/opcode_targets.h $(srcdir)/Python/opcode_targets.h.new
|
||||
|
||||
-Python/ceval.o: $(srcdir)/Python/opcode_targets.h $(srcdir)/Python/ceval_gil.h
|
||||
|
||||
Python/frozen.o: $(srcdir)/Python/importlib.h $(srcdir)/Python/importlib_external.h
|
||||
|
||||
@@ -895,13 +894,13 @@ Python/frozen.o: $(srcdir)/Python/import
|
||||
# an include guard, so we can't use a pipeline to transform its output.
|
||||
Include/pydtrace_probes.h: $(srcdir)/Include/pydtrace.d
|
||||
$(MKDIR_P) Include
|
||||
- $(DTRACE) $(DFLAGS) -o $@ -h -s $<
|
||||
+ $(DTRACE) $(DFLAGS) -o $@ -h -s $(srcdir)/Include/pydtrace.d
|
||||
: sed in-place edit with POSIX-only tools
|
||||
sed 's/PYTHON_/PyDTrace_/' $@ > $@.tmp
|
||||
mv $@.tmp $@
|
||||
|
||||
Python/pydtrace.o: $(srcdir)/Include/pydtrace.d $(DTRACE_DEPS)
|
||||
- $(DTRACE) $(DFLAGS) -o $@ -G -s $< $(DTRACE_DEPS)
|
||||
+ $(DTRACE) $(DFLAGS) -o $@ -G -s $(srcdir)/Include/pydtrace.d $(DTRACE_DEPS)
|
||||
|
||||
Objects/typeobject.o: Objects/typeslots.inc
|
||||
|
||||
@@ -1102,7 +1101,7 @@ altinstall: commoninstall
|
||||
fi
|
||||
|
||||
commoninstall: check-clean-src @FRAMEWORKALTINSTALLFIRST@ \
|
||||
- altbininstall libinstall inclinstall libainstall \
|
||||
+ altbininstall libainstall inclinstall libinstall \
|
||||
sharedinstall oldsharedinstall altmaninstall \
|
||||
@FRAMEWORKALTINSTALLLAST@
|
||||
|
||||
@@ -1161,7 +1160,8 @@ altbininstall: $(BUILDPYTHON) @FRAMEWORK
|
||||
if test -n "$(PY3LIBRARY)"; then \
|
||||
$(INSTALL_SHARED) $(PY3LIBRARY) $(DESTDIR)$(LIBDIR)/$(PY3LIBRARY); \
|
||||
fi; \
|
||||
- else true; \
|
||||
+ elif test -f $(INSTSONAME); then \
|
||||
+ $(INSTALL_SHARED) $(INSTSONAME) $(DESTDIR)$(LIBDIR); \
|
||||
fi
|
||||
if test "x$(LIPO_32BIT_FLAGS)" != "x" ; then \
|
||||
rm -f $(DESTDIR)$(BINDIR)python$(VERSION)-32$(EXE); \
|
||||
@@ -1338,7 +1338,7 @@ libinstall: build_all $(srcdir)/Modules/
|
||||
esac; \
|
||||
done; \
|
||||
done
|
||||
- $(INSTALL_DATA) `cat pybuilddir.txt`/_sysconfigdata_$(ABIFLAGS)_$(MACHDEP)_$(MULTIARCH).py \
|
||||
+ $(INSTALL_DATA) `cat pybuilddir.txt`/_sysconfigdata_$(MACHDEP).py \
|
||||
$(DESTDIR)$(LIBDEST); \
|
||||
$(INSTALL_DATA) $(srcdir)/LICENSE $(DESTDIR)$(LIBDEST)/LICENSE.txt
|
||||
if test -d $(DESTDIR)$(LIBDEST)/distutils/tests; then \
|
||||
@@ -1356,11 +1356,6 @@ libinstall: build_all $(srcdir)/Modules/
|
||||
-x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \
|
||||
$(DESTDIR)$(LIBDEST)
|
||||
-PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
|
||||
- $(PYTHON_FOR_BUILD) -Wi -OO $(DESTDIR)$(LIBDEST)/compileall.py \
|
||||
- -d $(LIBDEST) -f \
|
||||
- -x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \
|
||||
- $(DESTDIR)$(LIBDEST)
|
||||
- -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
|
||||
$(PYTHON_FOR_BUILD) -Wi $(DESTDIR)$(LIBDEST)/compileall.py \
|
||||
-d $(LIBDEST)/site-packages -f \
|
||||
-x badsyntax $(DESTDIR)$(LIBDEST)/site-packages
|
||||
@@ -1369,10 +1364,6 @@ libinstall: build_all $(srcdir)/Modules/
|
||||
-d $(LIBDEST)/site-packages -f \
|
||||
-x badsyntax $(DESTDIR)$(LIBDEST)/site-packages
|
||||
-PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
|
||||
- $(PYTHON_FOR_BUILD) -Wi -OO $(DESTDIR)$(LIBDEST)/compileall.py \
|
||||
- -d $(LIBDEST)/site-packages -f \
|
||||
- -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages
|
||||
- -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
|
||||
$(PYTHON_FOR_BUILD) -m lib2to3.pgen2.driver $(DESTDIR)$(LIBDEST)/lib2to3/Grammar.txt
|
||||
-PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
|
||||
$(PYTHON_FOR_BUILD) -m lib2to3.pgen2.driver $(DESTDIR)$(LIBDEST)/lib2to3/PatternGrammar.txt
|
||||
@@ -1473,7 +1464,7 @@ sharedinstall: sharedmods
|
||||
--install-scripts=$(BINDIR) \
|
||||
--install-platlib=$(DESTSHARED) \
|
||||
--root=$(DESTDIR)/
|
||||
- -rm $(DESTDIR)$(DESTSHARED)/_sysconfigdata_$(ABIFLAGS)_$(MACHDEP)_$(MULTIARCH).py
|
||||
+ -rm $(DESTDIR)$(DESTSHARED)/_sysconfigdata_$(MACHDEP).py
|
||||
-rm -r $(DESTDIR)$(DESTSHARED)/__pycache__
|
||||
|
||||
# Here are a couple of targets for MacOSX again, to install a full
|
16
lang/python37/patches/patch-Modules___uuidmodule.c
Normal file
16
lang/python37/patches/patch-Modules___uuidmodule.c
Normal file
|
@ -0,0 +1,16 @@
|
|||
$NetBSD: patch-Modules___uuidmodule.c,v 1.1 2018/07/03 03:55:40 adam Exp $
|
||||
|
||||
Do not include uuid.h from both locations.
|
||||
|
||||
--- Modules/_uuidmodule.c.orig 2018-05-07 06:24:32.000000000 +0000
|
||||
+++ Modules/_uuidmodule.c
|
||||
@@ -3,8 +3,7 @@
|
||||
#include "Python.h"
|
||||
#ifdef HAVE_UUID_UUID_H
|
||||
#include <uuid/uuid.h>
|
||||
-#endif
|
||||
-#ifdef HAVE_UUID_H
|
||||
+#elif defined(HAVE_UUID_H)
|
||||
#include <uuid.h>
|
||||
#endif
|
||||
|
15
lang/python37/patches/patch-Modules_makesetup
Normal file
15
lang/python37/patches/patch-Modules_makesetup
Normal file
|
@ -0,0 +1,15 @@
|
|||
$NetBSD: patch-Modules_makesetup,v 1.1 2018/07/03 03:55:40 adam Exp $
|
||||
|
||||
Support -pthread compiler flag.
|
||||
http://bugs.python.org/issue21461
|
||||
|
||||
--- Modules/makesetup.orig 2008-06-11 05:26:20.000000000 +0000
|
||||
+++ Modules/makesetup
|
||||
@@ -166,6 +166,7 @@ sed -e 's/[ ]*#.*//' -e '/^[ ]*$/d' |
|
||||
-rpath) libs="$libs $arg"; skip=libs;;
|
||||
--rpath) libs="$libs $arg"; skip=libs;;
|
||||
-[A-Zl]*) libs="$libs $arg";;
|
||||
+ -pthread) libs="$libs $arg";;
|
||||
*.a) libs="$libs $arg";;
|
||||
*.so) libs="$libs $arg";;
|
||||
*.sl) libs="$libs $arg";;
|
16
lang/python37/patches/patch-Modules_nismodule.c
Normal file
16
lang/python37/patches/patch-Modules_nismodule.c
Normal file
|
@ -0,0 +1,16 @@
|
|||
$NetBSD: patch-Modules_nismodule.c,v 1.1 2018/07/03 03:55:40 adam Exp $
|
||||
|
||||
DragonFlyBSD support
|
||||
http://bugs.python.org/issue21459
|
||||
|
||||
--- Modules/nismodule.c.orig 2010-08-19 09:03:03.000000000 +0000
|
||||
+++ Modules/nismodule.c
|
||||
@@ -85,7 +85,7 @@ nis_mapname (char *map, int *pfix)
|
||||
return map;
|
||||
}
|
||||
|
||||
-#if defined(__APPLE__) || defined(__OpenBSD__) || defined(__FreeBSD__)
|
||||
+#if defined(__APPLE__) || defined(__OpenBSD__) || defined(__FreeBSD__) || defined(__DragonFly__)
|
||||
typedef int (*foreachfunc)(unsigned long, char *, int, char *, int, void *);
|
||||
#else
|
||||
typedef int (*foreachfunc)(int, char *, int, char *, int, char *);
|
55
lang/python37/patches/patch-Modules_socketmodule.c
Normal file
55
lang/python37/patches/patch-Modules_socketmodule.c
Normal file
|
@ -0,0 +1,55 @@
|
|||
$NetBSD: patch-Modules_socketmodule.c,v 1.1 2018/07/03 03:55:40 adam Exp $
|
||||
|
||||
Support NetBSD's socketcan implementation
|
||||
|
||||
--- Modules/socketmodule.c.orig 2018-03-29 11:57:55.000000000 +0000
|
||||
+++ Modules/socketmodule.c
|
||||
@@ -1439,8 +1439,13 @@ makesockaddr(SOCKET_T sockfd, struct soc
|
||||
/* need to look up interface name given index */
|
||||
if (a->can_ifindex) {
|
||||
ifr.ifr_ifindex = a->can_ifindex;
|
||||
+#ifdef __NetBSD__
|
||||
+ if (if_indextoname(a->can_ifindex, ifr.ifr_name) != NULL)
|
||||
+ ifname = ifr.ifr_name;
|
||||
+#else
|
||||
if (ioctl(sockfd, SIOCGIFNAME, &ifr) == 0)
|
||||
ifname = ifr.ifr_name;
|
||||
+#endif /* __NetBSD__ */
|
||||
}
|
||||
|
||||
switch (proto) {
|
||||
@@ -2010,7 +2015,12 @@ getsockaddrarg(PySocketSockObject *s, Py
|
||||
} else if ((size_t)len < sizeof(ifr.ifr_name)) {
|
||||
strncpy(ifr.ifr_name, PyBytes_AS_STRING(interfaceName), sizeof(ifr.ifr_name));
|
||||
ifr.ifr_name[(sizeof(ifr.ifr_name))-1] = '\0';
|
||||
- if (ioctl(s->sock_fd, SIOCGIFINDEX, &ifr) < 0) {
|
||||
+#ifdef __NetBSD__
|
||||
+ if ((ifr.ifr_ifindex = if_nametoindex(ifr.ifr_name)) == 0)
|
||||
+#else
|
||||
+ if (ioctl(s->sock_fd, SIOCGIFINDEX, &ifr) < 0)
|
||||
+#endif
|
||||
+ {
|
||||
s->errorhandler();
|
||||
Py_DECREF(interfaceName);
|
||||
return 0;
|
||||
@@ -7371,6 +7381,20 @@ PyInit__socket(void)
|
||||
PyModule_AddIntConstant(m, "CAN_BCM_RX_TIMEOUT", RX_TIMEOUT);
|
||||
PyModule_AddIntConstant(m, "CAN_BCM_RX_CHANGED", RX_CHANGED);
|
||||
#endif
|
||||
+#ifdef HAVE_NETCAN_CAN_H
|
||||
+ PyModule_AddIntMacro(m, CAN_EFF_FLAG);
|
||||
+ PyModule_AddIntMacro(m, CAN_RTR_FLAG);
|
||||
+ PyModule_AddIntMacro(m, CAN_ERR_FLAG);
|
||||
+
|
||||
+ PyModule_AddIntMacro(m, CAN_SFF_MASK);
|
||||
+ PyModule_AddIntMacro(m, CAN_EFF_MASK);
|
||||
+ PyModule_AddIntMacro(m, CAN_ERR_MASK);
|
||||
+
|
||||
+ PyModule_AddIntMacro(m, CAN_RAW_FILTER);
|
||||
+ /* PyModule_AddIntMacro(m, CAN_RAW_ERR_FILTER); */
|
||||
+ PyModule_AddIntMacro(m, CAN_RAW_LOOPBACK);
|
||||
+ PyModule_AddIntMacro(m, CAN_RAW_RECV_OWN_MSGS);
|
||||
+#endif
|
||||
#ifdef SOL_RDS
|
||||
PyModule_AddIntMacro(m, SOL_RDS);
|
||||
#endif
|
15
lang/python37/patches/patch-Modules_socketmodule.h
Normal file
15
lang/python37/patches/patch-Modules_socketmodule.h
Normal file
|
@ -0,0 +1,15 @@
|
|||
$NetBSD: patch-Modules_socketmodule.h,v 1.1 2018/07/03 03:55:40 adam Exp $
|
||||
|
||||
--- Modules/socketmodule.h.orig 2017-03-21 07:32:38.000000000 +0100
|
||||
+++ Modules/socketmodule.h 2017-05-30 12:36:59.254776235 +0200
|
||||
@@ -91,6 +91,10 @@
|
||||
#include <linux/can/bcm.h>
|
||||
#endif
|
||||
|
||||
+#ifdef HAVE_NETCAN_CAN_H
|
||||
+#include <netcan/can.h>
|
||||
+#endif
|
||||
+
|
||||
#ifdef HAVE_SYS_SYS_DOMAIN_H
|
||||
#include <sys/sys_domain.h>
|
||||
#endif
|
14
lang/python37/patches/patch-Python_thread__pthread.h
Normal file
14
lang/python37/patches/patch-Python_thread__pthread.h
Normal file
|
@ -0,0 +1,14 @@
|
|||
$NetBSD: patch-Python_thread__pthread.h,v 1.1 2018/07/03 03:55:40 adam Exp $
|
||||
|
||||
--- Python/thread_pthread.h.orig 2013-05-15 16:33:00.000000000 +0000
|
||||
+++ Python/thread_pthread.h
|
||||
@@ -50,6 +50,9 @@
|
||||
we need to add 0 to make it work there as well. */
|
||||
#if (_POSIX_SEMAPHORES+0) == -1
|
||||
#define HAVE_BROKEN_POSIX_SEMAPHORES
|
||||
+#elif defined(__NetBSD__)
|
||||
+/* XXX accesses to closed file descriptors, needs debugging */
|
||||
+#define HAVE_BROKEN_POSIX_SEMAPHORES
|
||||
#else
|
||||
#include <semaphore.h>
|
||||
#include <errno.h>
|
145
lang/python37/patches/patch-configure
Normal file
145
lang/python37/patches/patch-configure
Normal file
|
@ -0,0 +1,145 @@
|
|||
$NetBSD: patch-configure,v 1.1 2018/07/03 03:55:40 adam Exp $
|
||||
|
||||
Simplify _sysconfigdata to include only platform name.
|
||||
|
||||
MirBSD support
|
||||
http://bugs.python.org/issue21458
|
||||
|
||||
Changes for consistency across pkgsrc platforms.
|
||||
|
||||
Fix linking on Darwin.
|
||||
|
||||
Use gnu99 instead of c99 to avoid "alloca() undefined" problems on macppc.
|
||||
|
||||
detect netcan/can.h on NetBSD
|
||||
|
||||
--- configure.orig 2018-03-29 11:57:55.000000000 +0000
|
||||
+++ configure
|
||||
@@ -2933,7 +2933,7 @@ $as_echo_n "checking for python interpre
|
||||
fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
|
||||
$as_echo "$interp" >&6; }
|
||||
- PYTHON_FOR_BUILD='_PYTHON_PROJECT_BASE=$(abs_builddir) _PYTHON_HOST_PLATFORM=$(_PYTHON_HOST_PLATFORM) PYTHONPATH=$(shell test -f pybuilddir.txt && echo $(abs_builddir)/`cat pybuilddir.txt`:)$(srcdir)/Lib _PYTHON_SYSCONFIGDATA_NAME=_sysconfigdata_$(ABIFLAGS)_$(MACHDEP)_$(MULTIARCH) '$interp
|
||||
+ PYTHON_FOR_BUILD='_PYTHON_PROJECT_BASE=$(abs_builddir) _PYTHON_HOST_PLATFORM=$(_PYTHON_HOST_PLATFORM) PYTHONPATH=$(shell test -f pybuilddir.txt && echo $(abs_builddir)/`cat pybuilddir.txt`:)$(srcdir)/Lib _PYTHON_SYSCONFIGDATA_NAME=_sysconfigdata_$(MACHDEP) '$interp
|
||||
fi
|
||||
elif test "$cross_compiling" = maybe; then
|
||||
as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5
|
||||
@@ -3324,7 +3324,7 @@ case $ac_sys_system/$ac_sys_release in
|
||||
# Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
|
||||
# In addition, Stefan Krah confirms that issue #1244610 exists through
|
||||
# OpenBSD 4.6, but is fixed in 4.7.
|
||||
- OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
|
||||
+ OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456] | MirBSD/*)
|
||||
define_xopen_source=no
|
||||
# OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
|
||||
# also defined. This can be overridden by defining _BSD_SOURCE
|
||||
@@ -5892,7 +5892,7 @@ $as_echo "#define Py_ENABLE_SHARED 1" >>
|
||||
PY3LIBRARY=libpython3.so
|
||||
fi
|
||||
;;
|
||||
- Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
|
||||
+ Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*|MirBSD*)
|
||||
LDLIBRARY='libpython$(LDVERSION).so'
|
||||
BLDLIBRARY='-L. -lpython$(LDVERSION)'
|
||||
RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
|
||||
@@ -6776,7 +6776,7 @@ UNIVERSAL_ARCH_FLAGS=
|
||||
# tweak BASECFLAGS based on compiler and platform
|
||||
case $GCC in
|
||||
yes)
|
||||
- CFLAGS_NODIST="$CFLAGS_NODIST -std=c99"
|
||||
+ CFLAGS_NODIST="$CFLAGS_NODIST -std=gnu99"
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wextra" >&5
|
||||
$as_echo_n "checking for -Wextra... " >&6; }
|
||||
@@ -8018,7 +8018,7 @@ done
|
||||
|
||||
|
||||
# On Linux, can.h and can/raw.h require sys/socket.h
|
||||
-for ac_header in linux/can.h linux/can/raw.h linux/can/bcm.h
|
||||
+for ac_header in linux/can.h linux/can/raw.h linux/can/bcm.h netcan/can.h
|
||||
do :
|
||||
as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
|
||||
ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
|
||||
@@ -9166,8 +9166,8 @@ then
|
||||
LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
|
||||
else
|
||||
# No framework, use the Python app as bundle-loader
|
||||
- BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
|
||||
- LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
|
||||
+ BLDSHARED="$LDSHARED "'-flat_namespace -undefined suppress -bundle_loader $(BUILDPYTHON)'
|
||||
+ LDSHARED="$LDSHARED "'-flat_namespace -undefined suppress -bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
|
||||
LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
|
||||
fi ;;
|
||||
Darwin/*)
|
||||
@@ -9191,9 +9191,9 @@ then
|
||||
LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
|
||||
else
|
||||
# No framework, use the Python app as bundle-loader
|
||||
- BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
|
||||
- LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
|
||||
- LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
|
||||
+ BLDSHARED="$LDSHARED "'-flat_namespace -undefined suppress -bundle_loader $(BUILDPYTHON)'
|
||||
+ LDSHARED="$LDSHARED "'-flat_namespace -undefined suppress -bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
|
||||
+ LDCXXSHARED="$LDCXXSHARED "'-flat_namespace -undefined suppress -bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
|
||||
fi
|
||||
else
|
||||
# building for OS X 10.3 and later
|
||||
@@ -9229,6 +9229,9 @@ then
|
||||
;;
|
||||
esac
|
||||
fi;;
|
||||
+ MirBSD*)
|
||||
+ LDSHARED='$(CC) -shared $(CCSHARED)'
|
||||
+ LDCXXSHARED='$(CXX) -shared $(CCSHARED)';;
|
||||
NetBSD*|DragonFly*)
|
||||
LDSHARED='$(CC) -shared'
|
||||
LDCXXSHARED='$(CXX) -shared';;
|
||||
@@ -9272,7 +9275,7 @@ then
|
||||
fi;;
|
||||
Linux-android*) ;;
|
||||
Linux*|GNU*) CCSHARED="-fPIC";;
|
||||
- FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
|
||||
+ FreeBSD*|NetBSD*|OpenBSD*|MirBSD*|DragonFly*) CCSHARED="-fPIC";;
|
||||
OpenUNIX*|UnixWare*)
|
||||
if test "$GCC" = "yes"
|
||||
then CCSHARED="-fPIC"
|
||||
@@ -9317,7 +9320,7 @@ then
|
||||
OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
|
||||
SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
|
||||
ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
|
||||
- FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
|
||||
+ FreeBSD*|NetBSD*|OpenBSD*|MirBSD*|DragonFly*)
|
||||
if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
|
||||
then
|
||||
LINKFORSHARED="-Wl,--export-dynamic"
|
||||
@@ -11118,7 +11121,7 @@ if ${ac_cv_dtrace_link+:} false; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
ac_cv_dtrace_link=no
|
||||
- echo 'BEGIN' > conftest.d
|
||||
+ echo 'BEGIN {}' > conftest.d
|
||||
"$DTRACE" -G -s conftest.d -o conftest.o > /dev/null 2>&1 && \
|
||||
ac_cv_dtrace_link=yes
|
||||
|
||||
@@ -14831,8 +14834,6 @@ $as_echo "$SOABI" >&6; }
|
||||
|
||||
|
||||
case $ac_sys_system in
|
||||
- Linux*|GNU*|Darwin)
|
||||
- EXT_SUFFIX=.${SOABI}${SHLIB_SUFFIX};;
|
||||
*)
|
||||
EXT_SUFFIX=${SHLIB_SUFFIX};;
|
||||
esac
|
||||
@@ -14844,11 +14845,7 @@ LDVERSION='$(VERSION)$(ABIFLAGS)'
|
||||
$as_echo "$LDVERSION" >&6; }
|
||||
|
||||
|
||||
-if test x$PLATFORM_TRIPLET = x; then
|
||||
- LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}"
|
||||
-else
|
||||
- LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}-${PLATFORM_TRIPLET}"
|
||||
-fi
|
||||
+LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}"
|
||||
|
||||
|
||||
# Check whether right shifting a negative integer extends the sign bit
|
16
lang/python37/patches/patch-pyconfig.h.in
Normal file
16
lang/python37/patches/patch-pyconfig.h.in
Normal file
|
@ -0,0 +1,16 @@
|
|||
$NetBSD: patch-pyconfig.h.in,v 1.1 2018/07/03 03:55:40 adam Exp $
|
||||
|
||||
detect netcan/can.h on NetBSD
|
||||
|
||||
--- pyconfig.h.in.orig 2017-05-30 12:31:24.586818399 +0200
|
||||
+++ pyconfig.h.in 2017-05-30 12:32:29.367288479 +0200
|
||||
@@ -565,6 +565,9 @@
|
||||
/* Define to 1 if you have the <linux/can/raw.h> header file. */
|
||||
#undef HAVE_LINUX_CAN_RAW_H
|
||||
|
||||
+/* Define to 1 if you have the <netcan/can.h> header file. */
|
||||
+#undef HAVE_NETCAN_CAN_H
|
||||
+
|
||||
/* Define to 1 if you have the <linux/netlink.h> header file. */
|
||||
#undef HAVE_LINUX_NETLINK_H
|
||||
|
141
lang/python37/patches/patch-setup.py
Normal file
141
lang/python37/patches/patch-setup.py
Normal file
|
@ -0,0 +1,141 @@
|
|||
$NetBSD: patch-setup.py,v 1.1 2018/07/03 03:55:40 adam Exp $
|
||||
|
||||
Disable certain modules, so they can be built as separate packages.
|
||||
Do not look for ncursesw.
|
||||
Assume panel_library is correct; this is a fix for ncurses' gnupanel
|
||||
which will get transformed to panel in buildlink.
|
||||
Also look for uuid/uuid.h.
|
||||
|
||||
--- setup.py.orig 2018-05-02 07:41:45.000000000 +0000
|
||||
+++ setup.py
|
||||
@@ -8,6 +8,7 @@ import importlib.util
|
||||
import sysconfig
|
||||
|
||||
from distutils import log
|
||||
+from distutils import text_file
|
||||
from distutils.errors import *
|
||||
from distutils.core import Extension, setup
|
||||
from distutils.command.build_ext import build_ext
|
||||
@@ -43,7 +44,7 @@ host_platform = get_platform()
|
||||
COMPILED_WITH_PYDEBUG = ('--with-pydebug' in sysconfig.get_config_var("CONFIG_ARGS"))
|
||||
|
||||
# This global variable is used to hold the list of modules to be disabled.
|
||||
-disabled_module_list = []
|
||||
+disabled_module_list = ["_curses", "_curses_panel", "_elementtree", "_gdbm", "pyexpat", "readline", "_sqlite3", "_tkinter", "xxlimited"]
|
||||
|
||||
def add_dir_to_list(dirlist, dir):
|
||||
"""Add the directory 'dir' to the list 'dirlist' (after any relative
|
||||
@@ -537,15 +538,15 @@ class PyBuildExt(build_ext):
|
||||
os.unlink(tmpfile)
|
||||
|
||||
def detect_modules(self):
|
||||
- # Ensure that /usr/local is always used, but the local build
|
||||
- # directories (i.e. '.' and 'Include') must be first. See issue
|
||||
- # 10520.
|
||||
- if not cross_compiling:
|
||||
- add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib')
|
||||
- add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
|
||||
- # only change this for cross builds for 3.3, issues on Mageia
|
||||
- if cross_compiling:
|
||||
- self.add_gcc_paths()
|
||||
+ # Add the buildlink directories for pkgsrc
|
||||
+ if os.environ.get('BUILDLINK_DIR'):
|
||||
+ dir = os.environ['BUILDLINK_DIR']
|
||||
+ libdir = dir + '/lib'
|
||||
+ incdir = dir + '/include'
|
||||
+ if libdir not in self.compiler.library_dirs:
|
||||
+ self.compiler.library_dirs.insert(0, libdir)
|
||||
+ if incdir not in self.compiler.include_dirs:
|
||||
+ self.compiler.include_dirs.insert(0, incdir)
|
||||
self.add_multiarch_paths()
|
||||
|
||||
# Add paths specified in the environment variables LDFLAGS and
|
||||
@@ -814,8 +815,6 @@ class PyBuildExt(build_ext):
|
||||
# use the same library for the readline and curses modules.
|
||||
if 'curses' in readline_termcap_library:
|
||||
curses_library = readline_termcap_library
|
||||
- elif self.compiler.find_library_file(lib_dirs, 'ncursesw'):
|
||||
- curses_library = 'ncursesw'
|
||||
elif self.compiler.find_library_file(lib_dirs, 'ncurses'):
|
||||
curses_library = 'ncurses'
|
||||
elif self.compiler.find_library_file(lib_dirs, 'curses'):
|
||||
@@ -1245,6 +1244,30 @@ class PyBuildExt(build_ext):
|
||||
dbm_order = ['gdbm']
|
||||
# The standard Unix dbm module:
|
||||
if host_platform not in ['cygwin']:
|
||||
+
|
||||
+ ## Top half based on find_file
|
||||
+ def find_ndbm_h(dirs):
|
||||
+ ret = None
|
||||
+ if sys.platform == 'darwin':
|
||||
+ sysroot = macosx_sdk_root()
|
||||
+ for dir in dirs:
|
||||
+ f = os.path.join(dir, 'ndbm.h')
|
||||
+ if sys.platform == 'darwin' and is_macosx_sdk_path(dir):
|
||||
+ f = os.path.join(sysroot, dir[1:], 'ndbm.h')
|
||||
+ if not os.path.exists(f): continue
|
||||
+
|
||||
+ ret = 'True'
|
||||
+ input = text_file.TextFile(f)
|
||||
+ while 1:
|
||||
+ line = input.readline()
|
||||
+ if not line: break
|
||||
+ if re.search('This file is part of GDBM', line):
|
||||
+ ret = None
|
||||
+ break
|
||||
+ input.close()
|
||||
+ break
|
||||
+ return ret
|
||||
+
|
||||
config_args = [arg.strip("'")
|
||||
for arg in sysconfig.get_config_var("CONFIG_ARGS").split()]
|
||||
dbm_args = [arg for arg in config_args
|
||||
@@ -1256,7 +1279,7 @@ class PyBuildExt(build_ext):
|
||||
dbmext = None
|
||||
for cand in dbm_order:
|
||||
if cand == "ndbm":
|
||||
- if find_file("ndbm.h", inc_dirs, []) is not None:
|
||||
+ if find_ndbm_h(inc_dirs) is not None:
|
||||
# Some systems have -lndbm, others have -lgdbm_compat,
|
||||
# others don't have either
|
||||
if self.compiler.find_library_file(lib_dirs,
|
||||
@@ -1388,8 +1411,7 @@ class PyBuildExt(build_ext):
|
||||
missing.append('_curses')
|
||||
|
||||
# If the curses module is enabled, check for the panel module
|
||||
- if (module_enabled(exts, '_curses') and
|
||||
- self.compiler.find_library_file(lib_dirs, panel_library)):
|
||||
+ if (module_enabled(exts, '_curses')):
|
||||
exts.append( Extension('_curses_panel', ['_curses_panel.c'],
|
||||
include_dirs=curses_includes,
|
||||
define_macros=curses_defines,
|
||||
@@ -1630,6 +1652,8 @@ class PyBuildExt(build_ext):
|
||||
|
||||
# Build the _uuid module if possible
|
||||
uuid_incs = find_file("uuid.h", inc_dirs, ["/usr/include/uuid"])
|
||||
+ if uuid_incs is None:
|
||||
+ uuid_incs = find_file("uuid/uuid.h", inc_dirs, [])
|
||||
if uuid_incs is not None:
|
||||
if self.compiler.find_library_file(lib_dirs, 'uuid'):
|
||||
uuid_libs = ['uuid']
|
||||
@@ -2019,10 +2043,7 @@ class PyBuildExt(build_ext):
|
||||
depends = ['_decimal/docstrings.h']
|
||||
else:
|
||||
srcdir = sysconfig.get_config_var('srcdir')
|
||||
- include_dirs = [os.path.abspath(os.path.join(srcdir,
|
||||
- 'Modules',
|
||||
- '_decimal',
|
||||
- 'libmpdec'))]
|
||||
+ include_dirs = ['Modules/_decimal/libmpdec']
|
||||
libraries = ['m']
|
||||
sources = [
|
||||
'_decimal/_decimal.c',
|
||||
@@ -2358,7 +2379,7 @@ def main():
|
||||
# If you change the scripts installed here, you also need to
|
||||
# check the PyBuildScripts command above, and change the links
|
||||
# created by the bininstall target in Makefile.pre.in
|
||||
- scripts = ["Tools/scripts/pydoc3", "Tools/scripts/idle3",
|
||||
+ scripts = ["Tools/scripts/pydoc3",
|
||||
"Tools/scripts/2to3", "Tools/scripts/pyvenv"]
|
||||
)
|
||||
|
Loading…
Reference in a new issue