Commit 919858b2 authored by wen's avatar wen
Browse files

- Repocopy lang/python37 --> python38 and update to 3.8.0

PR:		241416
Submitted by:	wen@(myself)
Reviewed by:	koobs@, amdmi3@
parent 0ac41e37
......@@ -250,7 +250,7 @@ _INCLUDE_USES_PYTHON_MK= 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= 2.7 3.6 3.7 3.5 # preferred first
_PYTHON_VERSIONS= 2.7 3.6 3.7 3.8 3.5 # preferred first
_PYTHON_PORTBRANCH= 2.7 # ${_PYTHON_VERSIONS:[1]}
_PYTHON_BASECMD= ${LOCALBASE}/bin/python
_PYTHON_RELPORTDIR= lang/python
......
......@@ -84,11 +84,11 @@ PERL5_DEFAULT:= ${_PERL5_FROM_BIN:R}
PGSQL_DEFAULT?= 11
# Possible values: 7.1, 7.2, 7.3, 7.4
PHP_DEFAULT?= 7.2
# Possible values: 2.7, 3.5, 3.6, 3.7
# Possible values: 2.7, 3.5, 3.6, 3.7, 3.8
PYTHON_DEFAULT?= 3.6
# Possible values: 2.7
PYTHON2_DEFAULT?= 2.7
# Possible values: 3.5, 3.6, 3.7
# Possible values: 3.5, 3.6, 3.7, 3.8
PYTHON3_DEFAULT?= 3.6
# Possible values: 2.4, 2.5, 2.6
RUBY_DEFAULT?= 2.6
......
......@@ -308,6 +308,7 @@
SUBDIR += python35
SUBDIR += python36
SUBDIR += python37
SUBDIR += python38
SUBDIR += qmasm
SUBDIR += qscheme
SUBDIR += quickjs
......
TIMESTAMP = 1572675622
TIMESTAMP = 1572737182
SHA256 (python/python-2.7.17-docs-html.tar.bz2) = d7388cfcf28591e5ab09932f70d180b1288130942779ead1fb40f750d72c18eb
SIZE (python/python-2.7.17-docs-html.tar.bz2) = 4605137
SHA256 (python/python-2.7.17-docs-pdf-a4.tar.bz2) = b4e09d093f03dd879ad207a9043212d6adb9a40e90540f1526315c361faf2219
......@@ -31,3 +31,11 @@ SHA256 (python/python-3.7.5-docs-pdf-letter.tar.bz2) = 216b6964f143d1f59388ae0f8
SIZE (python/python-3.7.5-docs-pdf-letter.tar.bz2) = 14251191
SHA256 (python/python-3.7.5-docs-text.tar.bz2) = 8a5d58b790ec95c4c72d341efe88244abe0f3b0c6e3f96cd0127b08f3cf413be
SIZE (python/python-3.7.5-docs-text.tar.bz2) = 2280802
SHA256 (python/python-3.8.0-docs-html.tar.bz2) = 858d717dfe117c94bd608c97a45a3d6b8319066b3c70f32eb15e5aaeccedcfac
SIZE (python/python-3.8.0-docs-html.tar.bz2) = 6509794
SHA256 (python/python-3.8.0-docs-pdf-a4.tar.bz2) = e5f1159701f2a1f40bc533f742fe3fe26acc9f7d05898e1dc36e0e0efd090d3d
SIZE (python/python-3.8.0-docs-pdf-a4.tar.bz2) = 14558628
SHA256 (python/python-3.8.0-docs-pdf-letter.tar.bz2) = bd1a523d772324847f9d9a6d014ea39be545996396c8d07d206bab400fac66dc
SIZE (python/python-3.8.0-docs-pdf-letter.tar.bz2) = 14664721
SHA256 (python/python-3.8.0-docs-text.tar.bz2) = 69aae3316f8bd570e6bd03e9a035fd6b5d9d686e78e126cdf5f869feeded8579
SIZE (python/python-3.8.0-docs-text.tar.bz2) = 2383969
# Created by: Kubilay Kocak <koobs@FreeBSD.org>
# $FreeBSD$
PORTNAME= python
PORTVERSION= ${PYTHON_PORTVERSION}
CATEGORIES= lang python
MASTER_SITES= PYTHON/ftp/python/${PORTVERSION}
PKGNAMESUFFIX= ${PYTHON_SUFFIX}
DISTNAME= Python-${PORTVERSION}
DIST_SUBDIR= python
MAINTAINER= python@FreeBSD.org
COMMENT= Interpreted object-oriented programming language
LICENSE= PSFL
USES= cpe ncurses pathfix pkgconfig readline:port shebangfix ssl tar:xz
PATHFIX_MAKEFILEIN= Makefile.pre.in
USE_LDCONFIG= yes
GNU_CONFIGURE= yes
python_CMD= ${PREFIX}/bin/python${PYTHON_PORTVERSION:R}
SHEBANG_FILES= Lib/*.py Lib/*/*.py Lib/*/*/*.py Lib/*/*/*/*.py
SHEBANG_FILES+= Lib/test/ziptestdata/exe_with_z64 \
Lib/test/ziptestdata/exe_with_zip \
Lib/test/ziptestdata/header.sh
# Duplicate python.mk variables. TODO: Let lang/python?? ports use python.mk bits.
PYTHON_VER= ${PYTHON_PORTVERSION:R}
PYTHON_VERSION= python${PYTHON_VER}
PYTHON_SUFFIX= ${PYTHON_VER:S/.//g}
DISABLED_EXTENSIONS= _sqlite3 _tkinter _gdbm
CONFIGURE_ARGS+= --enable-shared --without-ensurepip
CONFIGURE_ENV+= OPT="" DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS}" # 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}
MAKE_ARGS+= INSTALL_SHARED="${INSTALL_LIB}" # Strip shared library
SUB_FILES= pkg-message
SUB_LIST= PYTHON_SUFFIX=${PYTHON_SUFFIX}
PLIST_SUB= ABI=${ABIFLAGS} \
XY=${PYTHON_SUFFIX} \
XYDOT=${PYTHON_VER} \
XYZDOT=${PORTVERSION} \
OSMAJOR=${OSVERSION:C/([0-9]*)[0-9]{5}/\1/} # For plat-freebsd* in pkg-plist. https://bugs.python.org/issue19554
OPTIONS_DEFINE= DEBUG IPV6 LIBFFI NLS PYMALLOC
OPTIONS_DEFAULT= LIBFFI PYMALLOC
OPTIONS_RADIO= HASH
OPTIONS_RADIO_HASH= FNV SIPHASH
OPTIONS_SUB= yes
LIBFFI_DESC= Use libffi from ports instead of bundled version
NLS_DESC= Enable gettext support for the locale module
PYMALLOC_DESC= Enable specialized mallocs
HASH_DESC= Hash Algorithm (PEP-456)
FNV_DESC= Modified Fowler-Noll-Vo Algorithm
SIPHASH_DESC= SipHash24 Algorithm
FNV_CONFIGURE_ON= --with-hash-algorithm=fnv
SIPHASH_CONFIGURE_ON= --with-hash-algorithm=siphash24
DEBUG_CONFIGURE_WITH= pydebug
IPV6_CONFIGURE_ENABLE= ipv6
LIBFFI_CONFIGURE_ON= --with-system-ffi
LIBFFI_LIB_DEPENDS= libffi.so:devel/libffi
# Use CPPFLAGS over CFLAGS due to -I ordering, causing elementtree and pyexpat
# to break in Python 2.7, or preprocessor complaints in Python >= 3.3
# Upstream Issue: https://bugs.python.org/issue6299
NLS_USES= gettext
NLS_CPPFLAGS= -I${LOCALBASE}/include
NLS_LIBS= -L${LOCALBASE}/lib -lintl
NLS_CONFIGURE_ENV_OFF= ac_cv_lib_intl_textdomain=no ac_cv_header_libintl_h=no
PYMALLOC_CONFIGURE_WITH= pymalloc
.include "${.CURDIR}/Makefile.version"
.include <bsd.port.options.mk>
.if ${PORT_OPTIONS:MDEBUG}
ABIFLAGS:= d${ABIFLAGS}
.endif
.if !empty(ABIFLAGS)
PLIST_FILES+= bin/python${PYTHON_VER}${ABIFLAGS} \
bin/python${PYTHON_VER}${ABIFLAGS}-config \
libdata/pkgconfig/python-${PYTHON_VER}${ABIFLAGS}.pc
.endif
# https://bugs.python.org/issue22521
# https://bugs.python.org/issue23042
.if ${ARCH} == i386 && !${PORT_OPTIONS:MLIBFFI}
BROKEN= You must use libffi from ports on i386. Enable the LIBFFI option
.endif
.if ${ARCH} == sparc64
CFLAGS+= -DPYTHON_DEFAULT_RECURSION_LIMIT=900
.endif
# See https://bugs.freebsd.org/115940 and https://bugs.freebsd.org/193650
.if !exists(/usr/bin/ypcat) || defined(WITHOUT_NIS)
PLIST_SUB+= NO_NIS="@comment "
DISABLED_EXTENSIONS+= nis
.else
PLIST_SUB+= NO_NIS=""
.endif
post-patch:
# disable the detection of includes and library from e2fsprogs-libuuid,
# which introduces hidden dependency and breaks build
@${REINPLACE_CMD} -e 's|uuid/uuid.h|ignore_&|' ${WRKSRC}/configure
@${REINPLACE_CMD} -e '/find_library_file/ s|uuid|ignore_&|' ${WRKSRC}/setup.py
post-install:
.if ! ${PORT_OPTIONS:MDEBUG}
${RM} ${STAGEDIR}${PREFIX}/lib/libpython3.so # Upstream Issue: https://bugs.python.org/issue17975
.endif
# This code block exists for the qemu-user enabled cross build environment.
# When using this environment in poudriere, CC is not set to the default
# of /usr/bin/cc and a cross-compile toolchain is used. We need to hand
# edit this so that the run time configuration for python matches what the
# FreeBSD base system provides. sbruno 02Aug2017
.if ${CC} == /nxb-bin/usr/bin/cc
@${REINPLACE_CMD} -e 's=/nxb-bin==' \
${STAGEDIR}${PREFIX}/lib/python${PYTHON_VER}/_sysconfigdata_m_freebsd${OSREL:R}_.py
@${REINPLACE_CMD} -e 's=/nxb-bin==' \
${STAGEDIR}${PREFIX}/lib/python${PYTHON_VER}/config-${PYTHON_VER}m/Makefile
.endif
for i in ${STAGEDIR}${PREFIX}/lib/python${PYTHON_VER}/lib-dynload/*.so; do \
${STRIP_CMD} $$i; done # Strip shared extensions
${INSTALL_DATA} ${WRKSRC}/Tools/gdb/libpython.py \
${STAGEDIR}${PREFIX}/lib/libpython${PYTHON_VER}${ABIFLAGS}.so.1.0-gdb.py
.include <bsd.port.mk>
# Mk/Uses/python.mk includes this file, don't remove it!
# $FreeBSD$
# Do not forget to update python documentation (lang/python-doc-*)
# Run "make -C lang/python-doc-html makesum"
PYTHON_PORTVERSION= 3.8.0
TIMESTAMP = 1571750915
SHA256 (python/Python-3.8.0.tar.xz) = b356244e13fb5491da890b35b13b2118c3122977c2cd825e3eb6e7d462030d84
SIZE (python/Python-3.8.0.tar.xz) = 17829824
From 9934ce31b8447667f71c211e559a8de71e8263db Mon Sep 17 00:00:00 2001
From: Brendan Molloy <brendan@bbqsrc.net>
Date: Mon, 4 Jan 2016 23:14:06 +1100
Subject: [PATCH] Check bytecode file actually exists and tests
Should solve issue 20397, where using the --record argument results
in files that failed to generate bytecode files are added to the
record file nonetheless.
---
Lib/distutils/command/install_lib.py | 17 +++++++++++++----
Lib/distutils/tests/test_install_lib.py | 8 ++++++--
2 files changed, 19 insertions(+), 6 deletions(-)
--- Lib/distutils/command/install_lib.py.orig 2015-12-07 01:39:07 UTC
+++ Lib/distutils/command/install_lib.py
@@ -164,12 +164,21 @@ class install_lib(Command):
ext = os.path.splitext(os.path.normcase(py_file))[1]
if ext != PYTHON_SOURCE_EXTENSION:
continue
+
if self.compile:
- bytecode_files.append(importlib.util.cache_from_source(
- py_file, optimization=''))
+ candidate = importlib.util.cache_from_source(
+ py_file, optimization='')
+
+ if os.path.isfile(candidate):
+ bytecode_files.append(candidate)
+
if self.optimize > 0:
- bytecode_files.append(importlib.util.cache_from_source(
- py_file, optimization=self.optimize))
+ candidate = importlib.util.cache_from_source(
+ py_file, optimization=self.optimize)
+
+ if os.path.isfile(candidate):
+ bytecode_files.append(candidate)
+
return bytecode_files
From 9934ce31b8447667f71c211e559a8de71e8263db Mon Sep 17 00:00:00 2001
From: Brendan Molloy <brendan@bbqsrc.net>
Date: Mon, 4 Jan 2016 23:14:06 +1100
Subject: [PATCH] Check bytecode file actually exists and tests
Should solve issue 20397, where using the --record argument results
in files that failed to generate bytecode files are added to the
record file nonetheless.
---
Lib/distutils/command/install_lib.py | 17 +++++++++++++----
Lib/distutils/tests/test_install_lib.py | 8 ++++++--
2 files changed, 19 insertions(+), 6 deletions(-)
--- Lib/distutils/tests/test_install_lib.py.orig 2015-12-07 01:39:07 UTC
+++ Lib/distutils/tests/test_install_lib.py
@@ -64,11 +64,15 @@ class InstallLibTestCase(support.Tempdir
cmd.distribution.ext_modules = [Extension('foo', ['xxx'])]
cmd.distribution.packages = ['spam']
cmd.distribution.script_name = 'setup.py'
+
+ # Create rubbish, uncompilable file
+ f = os.path.join(project_dir, 'spam', 'rubbish.py')
+ self.write_file(f, 'rubbish()')
# get_outputs should return 4 elements: spam/__init__.py and .pyc,
- # foo.import-tag-abiflags.so / foo.pyd
+ # foo.import-tag-abiflags.so / foo.pyd and rubbish.py (no .pyc)
outputs = cmd.get_outputs()
- self.assertEqual(len(outputs), 4, outputs)
+ self.assertEqual(len(outputs), 5, outputs)
def test_get_inputs(self):
project_dir, dist = self.create_dist()
# Description: Remove duplicate CFLAGS, CPPFLAGS, LDFLAGS by stripping CONFIGURE_*
# Submitted by: koobs (r326729)
# TODO: Upstream
--- Makefile.pre.in.orig 2019-10-19 23:59:05 UTC
+++ Makefile.pre.in
@@ -80,7 +80,6 @@ MAKESETUP= $(srcdir)/Modules/makesetup
OPT= @OPT@
BASECFLAGS= @BASECFLAGS@
BASECPPFLAGS= @BASECPPFLAGS@
-CONFIGURE_CFLAGS= @CFLAGS@
# CFLAGS_NODIST is used for building the interpreter and stdlib C extensions.
# Use it when a compiler flag should _not_ be part of the distutils CFLAGS
# once Python is installed (Issue #21121).
@@ -89,18 +88,16 @@ CONFIGURE_CFLAGS_NODIST=@CFLAGS_NODIST@
# Use it when a linker flag should _not_ be part of the distutils LDFLAGS
# once Python is installed (bpo-35257)
CONFIGURE_LDFLAGS_NODIST=@LDFLAGS_NODIST@
-CONFIGURE_CPPFLAGS= @CPPFLAGS@
-CONFIGURE_LDFLAGS= @LDFLAGS@
# Avoid assigning CFLAGS, LDFLAGS, etc. so users can use them on the
# command line to append to these values without stomping the pre-set
# values.
-PY_CFLAGS= $(BASECFLAGS) $(OPT) $(CONFIGURE_CFLAGS) $(CFLAGS) $(EXTRA_CFLAGS)
+PY_CFLAGS= $(BASECFLAGS) $(OPT) $(CFLAGS) $(EXTRA_CFLAGS)
PY_CFLAGS_NODIST=$(CONFIGURE_CFLAGS_NODIST) $(CFLAGS_NODIST) -I$(srcdir)/Include/internal
# Both CPPFLAGS and LDFLAGS need to contain the shell's value for setup.py to
# 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_CPPFLAGS= $(BASECPPFLAGS) -I. -I$(srcdir)/Include $(CPPFLAGS)
+PY_LDFLAGS= $(LDFLAGS)
PY_LDFLAGS_NODIST=$(CONFIGURE_LDFLAGS_NODIST) $(LDFLAGS_NODIST)
NO_AS_NEEDED= @NO_AS_NEEDED@
SGI_ABI= @SGI_ABI@
--- Misc/python-config.sh.in.orig 2018-07-13 21:07:16 UTC
+++ Misc/python-config.sh.in
@@ -15,7 +15,7 @@ fi
# Returns the actual prefix where this script was installed to.
installed_prefix ()
{
- RESULT=$(dirname $(cd $(dirname "$1") && pwd -P))
+ RESULT=$(dirname $(cd $(dirname $(realpath "$1")) && pwd -P))
if which readlink >/dev/null 2>&1 ; then
if readlink -f "$RESULT" >/dev/null 2>&1; then
RESULT=$(readlink -f "$RESULT")
[
{ type: install
message: <<EOM
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
}
]
Python is an interpreted object-oriented programming language, and is
often compared to Tcl, Perl or Scheme.
WWW: https://www.python.org/
This diff is collapsed.
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment