python3: update to 3.6.2

This commit is contained in:
Alessio Sergi 2017-08-28 01:12:36 +02:00
parent 38436e32e5
commit 859db38261
4 changed files with 101 additions and 50 deletions

View File

@ -1632,8 +1632,8 @@ libefiboot.so.1 libefivar-31_1
libportaudio.so.2 portaudio-19.20140130_1
libportaudiocpp.so.0 portaudio-cpp-19.20140130_1
libdar.so.5000 libdar-2.4.14_1
libpython3.so python3-3.5.2_1
libpython3.5m.so.1.0 python3-3.5.2_1
libpython3.so python3-3.6.2_1
libpython3.6m.so.1.0 python3-3.6.2_1
libbrscandec2.so.1 brother-brscan3-0.2.11_2
libpyglib-2.0-python.so.0 python-gobject2-2.28.6_11
libxmlrpc_server_abyss.so.3 xmlrpc-c-1.25.28_1

View File

@ -9,15 +9,6 @@
def get_platform():
# cross build
@@ -486,7 +486,7 @@ class PyBuildExt(build_ext):
for directory in reversed(options.dirs):
add_dir_to_list(dir_list, directory)
- if os.path.normpath(sys.base_prefix) != '/usr' \
+ if os.path.normpath(sys.base_prefix) != '/usr' and not cross_compiling \
and not sysconfig.get_config_var('PYTHONFRAMEWORK'):
# OSX note: Don't add LIBDIR and INCLUDEDIR to building a framework
# (PYTHONFRAMEWORK is set) to avoid # linking problems when
@@ -549,6 +549,11 @@ class PyBuildExt(build_ext):
if host_platform == 'darwin':
math_libs = []
@ -46,9 +37,9 @@
res = os.system(cmd)
if res or not os.path.exists(ffi_configfile):
--- Makefile.pre.in.orig 2015-09-13 13:41:23.000000000 +0200
+++ Makefile.pre.in 2015-09-14 17:56:11.792632577 +0200
@@ -1011,8 +1013,6 @@
--- Makefile.pre.in.orig 2017-07-08 05:33:27.000000000 +0200
+++ Makefile.pre.in 2017-08-27 19:49:11.114893045 +0200
@@ -1055,8 +1055,6 @@
upgrade) ensurepip="--upgrade" ;; \
install|*) ensurepip="" ;; \
esac; \
@ -57,7 +48,7 @@
fi
altinstall: commoninstall
@@ -1021,8 +1021,6 @@
@@ -1065,8 +1063,6 @@
upgrade) ensurepip="--altinstall --upgrade" ;; \
install|*) ensurepip="--altinstall" ;; \
esac; \
@ -66,7 +57,7 @@
fi
commoninstall: @FRAMEWORKALTINSTALLFIRST@ \
@@ -1400,11 +1398,12 @@
@@ -1434,11 +1430,12 @@
# Install the dynamically loadable modules
# This goes into $(exec_prefix)
sharedinstall: sharedmods
@ -79,6 +70,6 @@
+ --install-scripts=$(DESTDIR)$(BINDIR) \
+ --install-platlib=$(DESTDIR)$(DESTSHARED) \
+ --root=/
-rm $(DESTDIR)$(DESTSHARED)/_sysconfigdata.py
-rm $(DESTDIR)$(DESTSHARED)/_sysconfigdata_$(ABIFLAGS)_$(MACHDEP)_$(MULTIARCH).py
-rm -r $(DESTDIR)$(DESTSHARED)/__pycache__

View File

@ -0,0 +1,62 @@
From 3cc711822edfabd05f5d06201eca922df8c132cc Mon Sep 17 00:00:00 2001
From: xdegaye <xdegaye@gmail.com>
Date: Mon, 22 May 2017 11:15:08 +0200
Subject: [PATCH] bpo-29619: Do not use HAVE_LARGEFILE_SUPPORT for type
conversions (GH-1666)
Use only the LongLong form for the conversions
(cherry picked from commit 50e86033de85294d87b7e942701d456342abde8e)
---
Modules/posixmodule.c | 23 +++++------------------
1 file changed, 5 insertions(+), 18 deletions(-)
diff --git Modules/posixmodule.c.orig Modules/posixmodule.c
index 97b57198cd4..111e4c9fde5 100644
--- Modules/posixmodule.c.orig
+++ Modules/posixmodule.c
@@ -1934,14 +1934,8 @@ _pystat_fromstructstat(STRUCT_STAT *st)
return NULL;
PyStructSequence_SET_ITEM(v, 0, PyLong_FromLong((long)st->st_mode));
-#if defined(HAVE_LARGEFILE_SUPPORT) || defined(MS_WINDOWS)
Py_BUILD_ASSERT(sizeof(unsigned long long) >= sizeof(st->st_ino));
- PyStructSequence_SET_ITEM(v, 1,
- PyLong_FromUnsignedLongLong(st->st_ino));
-#else
- Py_BUILD_ASSERT(sizeof(unsigned long) >= sizeof(st->st_ino));
- PyStructSequence_SET_ITEM(v, 1, PyLong_FromUnsignedLong(st->st_ino));
-#endif
+ PyStructSequence_SET_ITEM(v, 1, PyLong_FromUnsignedLongLong(st->st_ino));
#ifdef MS_WINDOWS
PyStructSequence_SET_ITEM(v, 2, PyLong_FromUnsignedLong(st->st_dev));
#else
@@ -1955,12 +1949,8 @@ _pystat_fromstructstat(STRUCT_STAT *st)
PyStructSequence_SET_ITEM(v, 4, _PyLong_FromUid(st->st_uid));
PyStructSequence_SET_ITEM(v, 5, _PyLong_FromGid(st->st_gid));
#endif
-#ifdef HAVE_LARGEFILE_SUPPORT
- PyStructSequence_SET_ITEM(v, 6,
- PyLong_FromLongLong((long long)st->st_size));
-#else
- PyStructSequence_SET_ITEM(v, 6, PyLong_FromLong(st->st_size));
-#endif
+ Py_BUILD_ASSERT(sizeof(long long) >= sizeof(st->st_size));
+ PyStructSequence_SET_ITEM(v, 6, PyLong_FromLongLong(st->st_size));
#if defined(HAVE_STAT_TV_NSEC)
ansec = st->st_atim.tv_nsec;
@@ -11484,11 +11474,8 @@ DirEntry_inode(DirEntry *self)
Py_BUILD_ASSERT(sizeof(unsigned long long) >= sizeof(self->win32_file_index));
return PyLong_FromUnsignedLongLong(self->win32_file_index);
#else /* POSIX */
-#ifdef HAVE_LARGEFILE_SUPPORT
- return PyLong_FromLongLong((long long)self->d_ino);
-#else
- return PyLong_FromLong((long)self->d_ino);
-#endif
+ Py_BUILD_ASSERT(sizeof(unsigned long long) >= sizeof(self->d_ino));
+ return PyLong_FromUnsignedLongLong(self->d_ino);
#endif
}

View File

@ -1,36 +1,36 @@
# Template file for 'python3'
pkgname=python3
version=3.5.4
revision=2
version=3.6.2
revision=1
wrksrc="Python-${version}"
short_desc="Interpreted, interactive, object-oriented programming language (${version%.*} series)"
maintainer="Juan RP <xtraeme@voidlinux.eu>"
homepage="https://www.python.org"
license="PSF"
distfiles="https://www.python.org/ftp/python/${version}/Python-${version}.tar.xz"
checksum=94d93bfabb3b109f8a10365a325f920f9ec98c6e2380bf228f9700a14054c84c
checksum=9229773be41ed144370f47f0f626a1579931f5a390f1e8e3853174d52edd64a9
replaces="python3.4>=0 python3.5>=0"
pycompile_dirs="usr/lib/python3.5"
pycompile_dirs="usr/lib/python${version%.*}"
makedepends="libffi-devel readline-devel gdbm-devel libressl-devel expat-devel
sqlite-devel bzip2-devel zlib-devel liblzma-devel tcl-devel tk-devel libX11-devel"
depends="ca-certificates"
alternatives="
python:idle:/usr/bin/idle3.5
python:2to3:/usr/bin/2to3-3.5
python:pydoc:/usr/bin/pydoc3.5
python:python:/usr/bin/python3.5
python:python.1:/usr/share/man/man1/python3.5.1
python3:idle3:/usr/bin/idle3.5
python3:2to3:/usr/bin/2to3-3.5
python3:pydoc3:/usr/bin/pydoc3.5
python3:python3:/usr/bin/python3.5
python3:pyvenv3:/usr/bin/pyvenv-3.5
python3:python3-config:/usr/bin/python3.5-config
python3:libpython3.so:/usr/lib/libpython3.5m.so
python3:python3.pc:/usr/lib/pkgconfig/python-3.5.pc
python3:python3.1:/usr/share/man/man1/python3.5.1"
python:idle:/usr/bin/idle${version%.*}
python:2to3:/usr/bin/2to3-${version%.*}
python:pydoc:/usr/bin/pydoc${version%.*}
python:python:/usr/bin/python${version%.*}
python:python.1:/usr/share/man/man1/python${version%.*}.1
python3:idle3:/usr/bin/idle${version%.*}
python3:2to3:/usr/bin/2to3-${version%.*}
python3:pydoc3:/usr/bin/pydoc${version%.*}
python3:python3:/usr/bin/python${version%.*}
python3:pyvenv3:/usr/bin/pyvenv-${version%.*}
python3:python3-config:/usr/bin/python${version%.*}-config
python3:libpython3.so:/usr/lib/libpython${version%.*}m.so
python3:python3.pc:/usr/lib/pkgconfig/python-${version%.*}.pc
python3:python3.1:/usr/share/man/man1/python${version%.*}.1"
pre_configure() {
# Ensure that internal copies of zlib, expat and libffi are not used
@ -53,9 +53,9 @@ do_configure() {
_args="--build=${XBPS_MACHINE%%-musl}"
fi
./configure ${configure_args} ${_args} \
--enable-shared --enable-ipv6 --with-threads --enable-unicode=ucs4 \
--with-computed-gotos --with-system-expat --with-system-ffi \
--without-ensurepip
--enable-shared --enable-ipv6 --enable-loadable-sqlite-extensions \
--with-threads --with-computed-gotos --with-dbmliborder=gdbm:ndbm \
--with-system-expat --with-system-ffi --without-ensurepip
}
do_build() {
export PATH="$PATH:$wrksrc/hostpython"
@ -74,26 +74,23 @@ do_install() {
rm -f ${DESTDIR}/usr/lib/libpython3.so
rm -f ${DESTDIR}/usr/lib/pkgconfig/python3.pc
ln -sf ../../libpython${version%.*}m.so \
${DESTDIR}/usr/lib/python${version%.*}/config-${version%.*}m/libpython${version%.*}m.so
# Remove test module and tests that fail to be byte-compiled.
rm -rf ${DESTDIR}/usr/lib/python${version%.*}/test
rm -rf ${DESTDIR}/usr/lib/python${version%.*}/lib2to3/tests
# Remove references to hardening -specs.
sed -e 's|\(-specs=.*hardened-ld\)||g' -e 's|\(-specs=.*hardened-cc1\)||g' -i \
${DESTDIR}/usr/lib/python${version%.*}/_sysconfigdata.py \
${DESTDIR}/usr/lib/python${version%.*}/config-${version%.*}m/Makefile \
${DESTDIR}/usr/lib/python${version%.*}/_sysconfigdata_m_*.py \
${DESTDIR}/usr/lib/python${version%.*}/config-${version%.*}m-*/Makefile \
${DESTDIR}/usr/bin/python${version%.*}*-config
# Remove references to the install(1) wrapper.
sed -e "s,${XBPS_WRAPPERDIR},/usr/bin,g" -i \
${DESTDIR}/usr/lib/python${version%.*}/_sysconfigdata.py \
${DESTDIR}/usr/lib/python${version%.*}/config-${version%.*}m/Makefile
${DESTDIR}/usr/lib/python${version%.*}/_sysconfigdata_m_*.py \
${DESTDIR}/usr/lib/python${version%.*}/config-${version%.*}m-*/Makefile
if [ "$CROSS_BUILD" ]; then
# Remove references to cross toolchain.
sed -i "s/$XBPS_CROSS_TRIPLET-//g" \
${DESTDIR}/usr/lib/python${version%.*}/_sysconfigdata.py \
${DESTDIR}/usr/lib/python${version%.*}/config-${version%.*}m/Makefile
${DESTDIR}/usr/lib/python${version%.*}/_sysconfigdata_m_*.py \
${DESTDIR}/usr/lib/python${version%.*}/config-${version%.*}m-*/Makefile
fi
}
@ -105,7 +102,8 @@ python3-devel_package() {
vmove usr/bin/python*-config
vmove usr/lib/pkgconfig
vmove usr/include
vmove usr/lib/python${version%.*}/config-${version%.*}m/libpython${version%.*}m.a
mv ${DESTDIR}/usr/lib/python${version%.*}/config-${version%.*}m-*/libpython${version%.*}m.a \
${PKGDESTDIR}/usr/lib
mkdir -p ${DESTDIR}/usr/include/python${version%.*}m
mv ${PKGDESTDIR}/usr/include/python${version%.*}m/pyconfig.h \
${DESTDIR}/usr/include/python${version%.*}m
@ -113,7 +111,7 @@ python3-devel_package() {
}
python3-tkinter_package() {
replaces="python3.4-tkinter>=0 python3.5-tkinter>=0"
pycompile_dirs="usr/lib/python3.5"
pycompile_dirs="usr/lib/python${version%.*}"
depends="${sourcepkg}-${version}_${revision}"
short_desc+=" - GUI toolkit for Python3"
pkg_install() {
@ -125,7 +123,7 @@ python3-tkinter_package() {
}
idle-python3_package() {
replaces="idle-python3.4>=0 idle-python3.5>=0"
pycompile_dirs="usr/lib/python3.5/idlelib"
pycompile_dirs="usr/lib/python${version%.*}/idlelib"
depends="${sourcepkg}-${version}_${revision} python3-tkinter"
short_desc+=" - IDE for Python3 using Tkinter"
pkg_install() {