Kaydet (Commit) 147cb6a2 authored tarafından David Ostrovsky's avatar David Ostrovsky Kaydeden (comit) Michael Stahl

Bump python to 3.5

3.5 release is needed for MSVC 14.0 (aka VS 2015) support. Python 3.5
removed build toolchain support for MSVC 2013. Because we still need
to support it, we duplicate the Python directory in externals and
copy old patches and dispatch to this directory for MSVC 2013. Once
the support for MSVC 2013 is dropped on master, this directory can be
removed again.

Change-Id: Idf7bc351239582f583ecbdb53c923cbdcf968089
Reviewed-on: https://gerrit.libreoffice.org/17352Reviewed-by: 's avatarMichael Stahl <mstahl@redhat.com>
Tested-by: 's avatarMichael Stahl <mstahl@redhat.com>
üst 1a4fc613
...@@ -8055,8 +8055,15 @@ int main(int argc, char **argv) { ...@@ -8055,8 +8055,15 @@ int main(int argc, char **argv) {
internal) internal)
SYSTEM_PYTHON= SYSTEM_PYTHON=
PYTHON_VERSION_MAJOR=3 PYTHON_VERSION_MAJOR=3
PYTHON_VERSION_MINOR=3 # On windows we are supporting two different python versions: 3.3 and 3.5.
PYTHON_VERSION=${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}.5 # We msut do it as long as we support MSVC 2013. Python 3.3 can be removed
# when MSVC 2013 support was dropped.
if test "$COM" = "MSC" -a $VCVER = 120; then
PYTHON_VERSION_MINOR=3
else
PYTHON_VERSION_MINOR=5
fi
PYTHON_VERSION=${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}.0
AC_DEFINE_UNQUOTED([PYTHON_VERSION_STRING], [L"${PYTHON_VERSION}"]) AC_DEFINE_UNQUOTED([PYTHON_VERSION_STRING], [L"${PYTHON_VERSION}"])
BUILD_TYPE="$BUILD_TYPE PYTHON" BUILD_TYPE="$BUILD_TYPE PYTHON"
# Embedded Python dies without Home set # Embedded Python dies without Home set
......
...@@ -123,8 +123,15 @@ export PNG_TARBALL := libpng-1.5.18.tar.gz ...@@ -123,8 +123,15 @@ export PNG_TARBALL := libpng-1.5.18.tar.gz
export POPPLER_MD5SUM := 35c0660065d023365e9854c13e289d12 export POPPLER_MD5SUM := 35c0660065d023365e9854c13e289d12
export POPPLER_TARBALL := poppler-0.26.4.tar.gz export POPPLER_TARBALL := poppler-0.26.4.tar.gz
export POSTGRESQL_TARBALL := c0b4799ea9850eae3ead14f0a60e9418-postgresql-9.2.1.tar.bz2 export POSTGRESQL_TARBALL := c0b4799ea9850eae3ead14f0a60e9418-postgresql-9.2.1.tar.bz2
ifeq ($(PYTHON_VERSION_MINOR),3)
export PYTHON_MD5SUM := 803a75927f8f241ca78633890c798021 export PYTHON_MD5SUM := 803a75927f8f241ca78633890c798021
export PYTHON_TARBALL := Python-3.3.5.tgz export PYTHON_TARBALL := Python-3.3.5.tgz
else
export PYTHON_MD5SUM := a56c0c0b45d75a0ec9c6dee933c41c36
export PYTHON_TARBALL := Python-3.5.0.tgz
endif
export RAPTOR_TARBALL := 4ceb9316488b0ea01acf011023cf7fff-raptor2-2.0.9.tar.gz export RAPTOR_TARBALL := 4ceb9316488b0ea01acf011023cf7fff-raptor2-2.0.9.tar.gz
export RASQAL_TARBALL := b12c5f9cfdb6b04efce5a4a186b8416b-rasqal-0.9.30.tar.gz export RASQAL_TARBALL := b12c5f9cfdb6b04efce5a4a186b8416b-rasqal-0.9.30.tar.gz
export REDLAND_TARBALL := 32f8e1417a64d3c6f2c727f9053f55ea-redland-1.0.16.tar.gz export REDLAND_TARBALL := 32f8e1417a64d3c6f2c727f9053f55ea-redland-1.0.16.tar.gz
......
...@@ -85,7 +85,7 @@ $(eval $(call gb_Module_add_moduledirs,external,\ ...@@ -85,7 +85,7 @@ $(eval $(call gb_Module_add_moduledirs,external,\
$(call gb_Helper_optional,PAGEMAKER,libpagemaker) \ $(call gb_Helper_optional,PAGEMAKER,libpagemaker) \
$(call gb_Helper_optional,POPPLER,poppler) \ $(call gb_Helper_optional,POPPLER,poppler) \
$(call gb_Helper_optional,POSTGRESQL,postgresql) \ $(call gb_Helper_optional,POSTGRESQL,postgresql) \
$(call gb_Helper_optional,PYTHON,python3) \ $(call gb_Helper_optional,PYTHON,$(if $(filter $(PYTHON_VERSION_MINOR),3),python33,python3)) \
$(call gb_Helper_optional,REDLAND,redland) \ $(call gb_Helper_optional,REDLAND,redland) \
$(call gb_Helper_optional,REVENGE,librevenge) \ $(call gb_Helper_optional,REVENGE,librevenge) \
$(call gb_Helper_optional,RHINO,rhino) \ $(call gb_Helper_optional,RHINO,rhino) \
......
...@@ -136,8 +136,7 @@ $(call gb_ExternalProject_get_state_target,python3,fixinstallnames) : $(call gb_ ...@@ -136,8 +136,7 @@ $(call gb_ExternalProject_get_state_target,python3,fixinstallnames) : $(call gb_
$(call gb_ExternalProject_get_state_target,python3,executables) : $(call gb_ExternalProject_get_state_target,python3,build) $(call gb_ExternalProject_get_state_target,python3,executables) : $(call gb_ExternalProject_get_state_target,python3,build)
cd $(python3_fw_prefix)/Versions/$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/bin ; \ cd $(python3_fw_prefix)/Versions/$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/bin ; \
for file in python$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR) \ for file in python$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR) \
python$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m \ python$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m ; do \
pythonw$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR) ; do \
$(INSTALL_NAME_TOOL) -change \ $(INSTALL_NAME_TOOL) -change \
$(python3_fw_prefix)/Versions/$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/LibreOfficePython \ $(python3_fw_prefix)/Versions/$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/LibreOfficePython \
@executable_path/../LibreOfficePython $$file ; done @executable_path/../LibreOfficePython $$file ; done
......
...@@ -17,24 +17,20 @@ $(eval $(call gb_UnpackedTarball_fix_end_of_line,python3,\ ...@@ -17,24 +17,20 @@ $(eval $(call gb_UnpackedTarball_fix_end_of_line,python3,\
$(eval $(call gb_UnpackedTarball_add_patches,python3,\ $(eval $(call gb_UnpackedTarball_add_patches,python3,\
external/python3/i100492-freebsd.patch.1 \ external/python3/i100492-freebsd.patch.1 \
external/python3/python-3.3.0-i42553.patch.2 \
external/python3/python-3.3.3-aix.patch.1 \ external/python3/python-3.3.3-aix.patch.1 \
external/python3/python-3.3.0-darwin.patch.1 \ external/python3/python-3.3.0-darwin.patch.1 \
external/python3/python-3.3.0-msvc2012.patch.1 \
external/python3/python-3.3.0-msvc-disable.patch.1 \ external/python3/python-3.3.0-msvc-disable.patch.1 \
external/python3/python-3.3.0-msvc-x64.patch.1 \
external/python3/python-3.3.0-ssl.patch.1 \ external/python3/python-3.3.0-ssl.patch.1 \
external/python3/python-3.3.0-gcc-4.8.patch.1 \ external/python3/python-3.3.3-py17797.patch.1 \
external/python3/python-3.3.0-i42553.patch.2 \
external/python3/python-3.3.0-pythreadstate.patch.1 \ external/python3/python-3.3.0-pythreadstate.patch.1 \
external/python3/python-3.3.0-clang.patch.1 \ external/python3/python-3.3.0-clang.patch.1 \
external/python3/python-3.3.3-py17797.patch.1 \
external/python3/python-3.3.3-msvc2012-winxp.patch.1 \
external/python3/python-3.3.5-pyexpat-symbols.patch.1 \ external/python3/python-3.3.5-pyexpat-symbols.patch.1 \
external/python3/python-3.3.5-vs2013.patch.1 \ external/python3/python-3.3.5-vs2013.patch.1 \
external/python3/python-3.3.5-darwin-gnu-xargs.patch.1 \
external/python3/python-msvc-disable-sse2.patch.1 \
external/python3/python-lsan.patch.0 \ external/python3/python-lsan.patch.0 \
external/python3/ubsan.patch.0 \ external/python3/ubsan.patch.0 \
external/python3/python-3.5.tweak.strip.soabi.patch \
external/python3/python-3.5.0-tcltk.disable.patch \
)) ))
ifneq ($(filter DRAGONFLY FREEBSD LINUX NETBSD OPENBSD SOLARIS,$(OS)),) ifneq ($(filter DRAGONFLY FREEBSD LINUX NETBSD OPENBSD SOLARIS,$(OS)),)
......
FreeBSD porting fixes, patch by maho@openoffice.org FreeBSD porting fixes, patch by maho@openoffice.org
--- Python-3.3.0/configure 2012-11-28 09:00:41.094955090 +0000 --- python3.orig/Lib/test/test_threading.py 2015-07-05 18:50:07.000000000 +0200
+++ Python-3.3.0/configure 2012-11-28 09:01:13.033329526 +0000 +++ python3/Lib/test/test_threading.py 2015-07-26 17:03:55.935367820 +0200
@@ -5545,11 +5545,6 @@ @@ -24,8 +24,8 @@
LDLIBRARY='libpython$(LDVERSION).so' # #12316 and #11870), and fork() from a worker thread is known to trigger
BLDLIBRARY='-L. -lpython$(LDVERSION)' # problems with some operating systems (issue #3863): skip problematic tests
RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH} # on platforms known to behave badly.
- case $ac_sys_system in -platforms_to_skip = ('freebsd4', 'freebsd5', 'freebsd6', 'netbsd5',
- FreeBSD*) - 'hp-ux11')
- SOVERSION=`echo $SOVERSION|cut -d "." -f 1` +platforms_to_skip = ('freebsd4', 'freebsd5', 'freebsd6', 'freebsd7', 'netbsd5',
- ;; + 'os2emx', 'hp-ux11')
- esac
INSTSONAME="$LDLIBRARY".$SOVERSION
if test "$with_pydebug" != yes
then
--- Python-3.3.0/Lib/test/test_threading.py 2012-11-28 09:00:41.292957412 +0000
+++ Python-3.3.0/Lib/test/test_threading.py 2012-11-28 09:01:13.017329339 +0000
@@ -451,7 +451,7 @@
# #12316 and #11870), and fork() from a worker thread is known to trigger
# problems with some operating systems (issue #3863): skip problematic tests
# on platforms known to behave badly.
- platforms_to_skip = ('freebsd4', 'freebsd5', 'freebsd6', 'netbsd5',
+ platforms_to_skip = ('freebsd4', 'freebsd5', 'freebsd6', 'freebsd7', 'netbsd5',
'os2emx', 'hp-ux11')
def _run_and_join(self, script):
# A trivial mutable counter.
--- Python-3.3.0/Python/thread_pthread.h 2012-11-28 09:00:41.097955124 +0000 --- Python-3.3.0/Python/thread_pthread.h 2012-11-28 09:00:41.097955124 +0000
+++ Python-3.3.0/Python/thread_pthread.h 2012-11-28 09:01:13.018329351 +0000 +++ Python-3.3.0/Python/thread_pthread.h 2012-11-28 09:01:13.018329351 +0000
@@ -42,6 +42,10 @@ @@ -42,6 +42,10 @@
......
...@@ -2,14 +2,14 @@ ...@@ -2,14 +2,14 @@
LO needs to build both against MacOSX SDK and not produce universal binaries. LO needs to build both against MacOSX SDK and not produce universal binaries.
diff -ru python3.old_/configure python3/configure diff -ru python3.orig/configure python3/configure
--- python3.old_/configure 2012-09-29 10:00:50.000000000 +0200 --- python3.orig/configure 2015-07-26 17:36:11.808497783 +0200
+++ python3/configure 2012-11-13 16:37:26.030013256 +0100 +++ python3/configure 2015-07-26 17:38:49.016508337 +0200
@@ -6353,7 +6353,19 @@ @@ -6794,7 +6794,20 @@
if test "${enable_universalsdk}"; then then
UNIVERSAL_ARCH_FLAGS="" case "$UNIVERSAL_ARCHS" in
if test "$UNIVERSAL_ARCHS" = "32-bit" ; then 32-bit)
- UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386" - UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
+ # LO does not use Universal Binaries (but the only way to set a SDK + # LO does not use Universal Binaries (but the only way to set a SDK
+ # here implies that, so de-universalize here...) + # here implies that, so de-universalize here...)
+ case `/usr/bin/arch` in + case `/usr/bin/arch` in
...@@ -23,36 +23,16 @@ diff -ru python3.old_/configure python3/configure ...@@ -23,36 +23,16 @@ diff -ru python3.old_/configure python3/configure
+ as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5 + as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
+ ;; + ;;
+ esac + esac
ARCH_RUN_32BIT="" +
LIPO_32BIT_FLAGS="" LIPO_32BIT_FLAGS=""
elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then ARCH_RUN_32BIT=""
;;
On OS X avoid /usr/local/lib and include like the plague, we don't Only in python3: .#configure
want to accidentally get some MacPorts etc stuff. Only in python3: #configure#
diff -ru python3.orig/Mac/Makefile.in python3/Mac/Makefile.in
On OS X, always run the compiler (which is Clang, not gcc) to find out --- python3.orig/Mac/Makefile.in 2015-07-05 18:50:07.000000000 +0200
what the include paths are. On a clean modern installation, there is +++ python3/Mac/Makefile.in 2015-07-26 17:40:14.860514100 +0200
no /usr/include. @@ -43,7 +43,7 @@
--- python3/setup.py
+++ python3/setup.py
@@ -460,11 +460,11 @@
# 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:
+ if not cross_compiling and host_platform != 'darwin':
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:
+ if cross_compiling or host_platform == 'darwin':
self.add_gcc_paths()
self.add_multiarch_paths()
--- python3/Mac/Makefile.in.orig 2013-09-13 20:16:50.558137603 +0200
+++ python3/Mac/Makefile.in 2013-09-13 21:57:14.790962423 +0200
@@ -39,7 +39,7 @@
INSTALL_SCRIPT= @INSTALL_SCRIPT@ INSTALL_SCRIPT= @INSTALL_SCRIPT@
INSTALL_DATA=@INSTALL_DATA@ INSTALL_DATA=@INSTALL_DATA@
LN=@LN@ LN=@LN@
...@@ -61,8 +41,21 @@ no /usr/include. ...@@ -61,8 +41,21 @@ no /usr/include.
CPMAC=CpMac CPMAC=CpMac
APPTEMPLATE=$(srcdir)/Resources/app APPTEMPLATE=$(srcdir)/Resources/app
--- python3/Mac/Resources/framework/Info.plist.in diff -ru python3.orig/Mac/Resources/app/Info.plist.in python3/Mac/Resources/app/Info.plist.in
+++ python3/Mac/Resources/framework/Info.plist.in --- python3.orig/Mac/Resources/app/Info.plist.in 2015-07-05 18:50:07.000000000 +0200
+++ python3/Mac/Resources/app/Info.plist.in 2015-07-26 17:42:00.974521224 +0200
@@ -18,7 +18,7 @@
</dict>
</array>
<key>CFBundleExecutable</key>
- <string>Python</string>
+ <string>LibreOfficePython</string>
<key>CFBundleGetInfoString</key>
<string>%version%, (c) 2001-2015 Python Software Foundation.</string>
<key>CFBundleHelpBookFolder</key>
diff -ru python3.orig/Mac/Resources/framework/Info.plist.in python3/Mac/Resources/framework/Info.plist.in
--- python3.orig/Mac/Resources/framework/Info.plist.in 2015-07-05 18:50:07.000000000 +0200
+++ python3/Mac/Resources/framework/Info.plist.in 2015-07-26 17:41:15.996518204 +0200
@@ -5,7 +5,7 @@ @@ -5,7 +5,7 @@
<key>CFBundleDevelopmentRegion</key> <key>CFBundleDevelopmentRegion</key>
<string>English</string> <string>English</string>
...@@ -72,14 +65,19 @@ no /usr/include. ...@@ -72,14 +65,19 @@ no /usr/include.
<key>CFBundleGetInfoString</key> <key>CFBundleGetInfoString</key>
<string>Python Runtime and Library</string> <string>Python Runtime and Library</string>
<key>CFBundleIdentifier</key> <key>CFBundleIdentifier</key>
--- python3/Mac/Resources/app/Info.plist.in diff -ru python3.orig/setup.py python3/setup.py
+++ python3/Mac/Resources/app/Info.plist.in --- python3.orig/setup.py 2015-07-26 17:36:11.804497783 +0200
@@ -18,7 +18,7 @@ +++ python3/setup.py 2015-07-26 17:39:48.599512337 +0200
</dict> @@ -468,11 +468,11 @@
</array> # Ensure that /usr/local is always used, but the local build
<key>CFBundleExecutable</key> # directories (i.e. '.' and 'Include') must be first. See issue
- <string>Python</string> # 10520.
+ <string>LibreOfficePython</string> - if not cross_compiling:
<key>CFBundleGetInfoString</key> + if not cross_compiling and host_platform != 'darwin':
<string>%version%, (c) 2004-2014 Python Software Foundation.</string> add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib')
<key>CFBundleHelpBookFolder</key> 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:
+ if cross_compiling or host_platform == 'darwin':
self.add_gcc_paths()
self.add_multiarch_paths()
--- Python-3.3.0/Include/modsupport.h 2012-09-29 10:00:26.000000000 +0200 diff -ru python3.orig/Include/modsupport.h python3/Include/modsupport.h
+++ Python-3.3.0/Include/modsupport.h 2013-03-08 10:46:28.671938738 +0100 --- python3.orig/Include/modsupport.h 2015-07-05 18:50:06.000000000 +0200
+++ python3/Include/modsupport.h 2015-07-26 18:21:30.717680314 +0200
@@ -26,7 +26,11 @@ @@ -26,7 +26,11 @@
/* Due to a glitch in 3.2, the _SizeT versions weren't exported from the DLL. */ /* Due to a glitch in 3.2, the _SizeT versions weren't exported from the DLL. */
#if !defined(PY_SSIZE_T_CLEAN) || !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x03030000 #if !defined(PY_SSIZE_T_CLEAN) || !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x03030000
PyAPI_FUNC(int) PyArg_Parse(PyObject *, const char *, ...); PyAPI_FUNC(int) PyArg_Parse(PyObject *, const char *, ...);
-PyAPI_FUNC(int) PyArg_ParseTuple(PyObject *, const char *, ...) Py_FORMAT_PARSETUPLE(PyArg_ParseTuple, 2, 3); -PyAPI_FUNC(int) PyArg_ParseTuple(PyObject *, const char *, ...);
+PyAPI_FUNC(int) PyArg_ParseTuple(PyObject *, const char *, ...) +PyAPI_FUNC(int) PyArg_ParseTuple(PyObject *, const char *, ...)
+#ifdef PY_SSIZE_T_CLEAN +#ifdef PY_SSIZE_T_CLEAN
+ Py_FORMAT_PARSETUPLE(PyArg_ParseTuple, 2, 3) + Py_FORMAT_PARSETUPLE(PyArg_ParseTuple, 2, 3)
......
Disable some stuff LO does not need, especially stuff with external dependencies Disable some stuff LO does not need, especially stuff with external dependencies
diff -ru python3/PCbuild/pcbuild.sln python3.new/PCbuild/pcbuild.sln diff -ru python3.orig/PCbuild/pcbuild.sln python3/PCbuild/pcbuild.sln
--- python3/PCbuild/pcbuild.sln 2012-09-29 10:00:48.000000000 +0200 --- python3.orig/PCbuild/pcbuild.sln 2015-07-26 17:43:52.262528695 +0200
+++ python3.new/PCbuild/pcbuild.sln 2012-11-12 22:13:49.445159668 +0100 +++ python3/PCbuild/pcbuild.sln 2015-07-26 18:00:18.438594901 +0200
@@ -12,10 +12,6 @@ @@ -12,8 +12,6 @@
EndProject EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pythoncore", "pythoncore.vcxproj", "{CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}" Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pythoncore", "pythoncore.vcxproj", "{CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}"
EndProject EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pythonw", "pythonw.vcxproj", "{F4229CC3-873C-49AE-9729-DD308ED4CD4A}" -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pythonw", "pythonw.vcxproj", "{F4229CC3-873C-49AE-9729-DD308ED4CD4A}"
-EndProject -EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "w9xpopen", "w9xpopen.vcxproj", "{E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}"
-EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "make_buildinfo", "make_buildinfo.vcxproj", "{C73F0EC1-358B-4177-940F-0846AC8B04CD}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "winsound", "winsound.vcxproj", "{28B5D777-DDF2-4B6B-B34F-31D938813856}" Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "winsound", "winsound.vcxproj", "{28B5D777-DDF2-4B6B-B34F-31D938813856}"
@@ -32,30 +28,16 @@ EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_decimal", "_decimal.vcxproj", "{0E9791DB-593A-465F-98BC-681011311617}"
@@ -28,32 +26,18 @@
EndProject EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_socket", "_socket.vcxproj", "{86937F53-C189-40EF-8CE8-8759D8E7D480}" Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_socket", "_socket.vcxproj", "{86937F53-C189-40EF-8CE8-8759D8E7D480}"
EndProject EndProject
...@@ -24,6 +22,8 @@ diff -ru python3/PCbuild/pcbuild.sln python3.new/PCbuild/pcbuild.sln ...@@ -24,6 +22,8 @@ diff -ru python3/PCbuild/pcbuild.sln python3.new/PCbuild/pcbuild.sln
EndProject EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_testcapi", "_testcapi.vcxproj", "{6901D91C-6E48-4BB7-9FEC-700C8131DF1D}" Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_testcapi", "_testcapi.vcxproj", "{6901D91C-6E48-4BB7-9FEC-700C8131DF1D}"
EndProject EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_testimportmultiple", "_testimportmultiple.vcxproj", "{36D0C52C-DF4E-45D0-8BC7-E294C3ABC781}"
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_tkinter", "_tkinter.vcxproj", "{4946ECAC-2E69-4BF8-A90A-F5136F5094DF}" -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_tkinter", "_tkinter.vcxproj", "{4946ECAC-2E69-4BF8-A90A-F5136F5094DF}"
-EndProject -EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_bz2", "_bz2.vcxproj", "{73FCD2BD-F133-46B7-8EC1-144CD82A59D5}" -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_bz2", "_bz2.vcxproj", "{73FCD2BD-F133-46B7-8EC1-144CD82A59D5}"
...@@ -36,7 +36,7 @@ diff -ru python3/PCbuild/pcbuild.sln python3.new/PCbuild/pcbuild.sln ...@@ -36,7 +36,7 @@ diff -ru python3/PCbuild/pcbuild.sln python3.new/PCbuild/pcbuild.sln
EndProject EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pyexpat", "pyexpat.vcxproj", "{D06B6426-4762-44CC-8BAD-D79052507F2F}" Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pyexpat", "pyexpat.vcxproj", "{D06B6426-4762-44CC-8BAD-D79052507F2F}"
EndProject EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "bdist_wininst", "bdist_wininst.vcxproj", "{EB1C19C1-1F18-421E-9735-CAEE69DC6A3C}" -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "bdist_wininst", "..\PC\bdist_wininst\bdist_wininst.vcxproj", "{EB1C19C1-1F18-421E-9735-CAEE69DC6A3C}"
-EndProject -EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_hashlib", "_hashlib.vcxproj", "{447F05A8-F581-4CAC-A466-5AC7936E207E}" -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_hashlib", "_hashlib.vcxproj", "{447F05A8-F581-4CAC-A466-5AC7936E207E}"
-EndProject -EndProject
...@@ -44,4 +44,4 @@ diff -ru python3/PCbuild/pcbuild.sln python3.new/PCbuild/pcbuild.sln ...@@ -44,4 +44,4 @@ diff -ru python3/PCbuild/pcbuild.sln python3.new/PCbuild/pcbuild.sln
-EndProject -EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_multiprocessing", "_multiprocessing.vcxproj", "{9E48B300-37D1-11DD-8C41-005056C00008}" Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_multiprocessing", "_multiprocessing.vcxproj", "{9E48B300-37D1-11DD-8C41-005056C00008}"
EndProject EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ssl", "ssl.vcxproj", "{E5B04CC0-EB4C-42AB-B4DC-18EF95F864B0}" Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "python3dll", "python3dll.vcxproj", "{885D4898-D08D-4091-9C40-C700CFE3FC5A}"
build with GCC on AIX build with GCC on AIX
--- Python-3.3.3/configure 2012-11-28 09:05:45.990529603 +0000 diff -ru python3.orig/configure python3/configure
+++ Python-3.3.3/configure 2012-11-28 09:06:23.037963934 +0000 --- python3.orig/configure 2015-07-26 17:10:18.218393484 +0200
@@ -3426,8 +3426,6 @@ +++ python3/configure 2015-07-26 17:29:44.460471779 +0200
@@ -3534,8 +3534,6 @@
else else
case $ac_sys_system in case $ac_sys_system in
...@@ -11,7 +12,7 @@ build with GCC on AIX ...@@ -11,7 +12,7 @@ build with GCC on AIX
*) without_gcc=no;; *) without_gcc=no;;
esac esac
fi fi
@@ -5541,10 +5539,18 @@ @@ -5787,10 +5785,18 @@
PY3LIBRARY=libpython3.so PY3LIBRARY=libpython3.so
fi fi
;; ;;
...@@ -19,7 +20,7 @@ build with GCC on AIX ...@@ -19,7 +20,7 @@ build with GCC on AIX
+ Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*|AIX*) + Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*|AIX*)
LDLIBRARY='libpython$(LDVERSION).so' LDLIBRARY='libpython$(LDVERSION).so'
- BLDLIBRARY='-L. -lpython$(LDVERSION)' - BLDLIBRARY='-L. -lpython$(LDVERSION)'
- RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH} - RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
+ case $ac_sys_system in + case $ac_sys_system in
+ AIX*) + AIX*)
+ BLDLIBRARY='-Wl,-brtl -L. -lpython$(LDVERSION)' + BLDLIBRARY='-Wl,-brtl -L. -lpython$(LDVERSION)'
...@@ -33,7 +34,7 @@ build with GCC on AIX ...@@ -33,7 +34,7 @@ build with GCC on AIX
INSTSONAME="$LDLIBRARY".$SOVERSION INSTSONAME="$LDLIBRARY".$SOVERSION
if test "$with_pydebug" != yes if test "$with_pydebug" != yes
then then
@@ -8301,8 +8307,13 @@ @@ -8789,8 +8795,13 @@
then then
case $ac_sys_system/$ac_sys_release in case $ac_sys_system/$ac_sys_release in
AIX*) AIX*)
...@@ -49,9 +50,10 @@ build with GCC on AIX ...@@ -49,9 +50,10 @@ build with GCC on AIX
;; ;;
IRIX/5*) LDSHARED="ld -shared";; IRIX/5*) LDSHARED="ld -shared";;
IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";; IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
--- Python-3.3.3/configure.ac 2012-11-28 09:05:45.990529603 +0000 diff -ru python3.orig/configure.ac python3/configure.ac
+++ Python-3.3.3/configure.ac 2012-11-28 09:06:23.038963946 +0000 --- python3.orig/configure.ac 2015-07-05 18:50:08.000000000 +0200
@@ -545,8 +545,6 @@ +++ python3/configure.ac 2015-07-26 17:32:10.445481579 +0200
@@ -587,8 +587,6 @@
without_gcc=$withval;; without_gcc=$withval;;
esac], [ esac], [
case $ac_sys_system in case $ac_sys_system in
...@@ -60,15 +62,15 @@ build with GCC on AIX ...@@ -60,15 +62,15 @@ build with GCC on AIX
*) without_gcc=no;; *) without_gcc=no;;
esac]) esac])
AC_MSG_RESULT($without_gcc) AC_MSG_RESULT($without_gcc)
@@ -910,10 +908,18 @@ @@ -1090,10 +1088,18 @@
PY3LIBRARY=libpython3.so PY3LIBRARY=libpython3.so
fi fi
;; ;;
- Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*) - Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
+ Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*|AIX*) + Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*|AIX*)Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
LDLIBRARY='libpython$(LDVERSION).so' LDLIBRARY='libpython$(LDVERSION).so'
- BLDLIBRARY='-L. -lpython$(LDVERSION)' - BLDLIBRARY='-L. -lpython$(LDVERSION)'
- RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH} - RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
+ case $ac_sys_system in + case $ac_sys_system in
+ AIX*) + AIX*)
+ BLDLIBRARY='-Wl,-brtl -L. -lpython$(LDVERSION)' + BLDLIBRARY='-Wl,-brtl -L. -lpython$(LDVERSION)'
...@@ -79,10 +81,10 @@ build with GCC on AIX ...@@ -79,10 +81,10 @@ build with GCC on AIX
+ RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH} + RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
+ ;; + ;;
+ esac + esac
case $ac_sys_system in INSTSONAME="$LDLIBRARY".$SOVERSION
FreeBSD*) if test "$with_pydebug" != yes
SOVERSION=`echo $SOVERSION|cut -d "." -f 1` then
@@ -1866,8 +1872,13 @@ @@ -2164,8 +2170,13 @@
then then
case $ac_sys_system/$ac_sys_release in case $ac_sys_system/$ac_sys_release in
AIX*) AIX*)
...@@ -98,9 +100,10 @@ build with GCC on AIX ...@@ -98,9 +100,10 @@ build with GCC on AIX
;; ;;
IRIX/5*) LDSHARED="ld -shared";; IRIX/5*) LDSHARED="ld -shared";;
IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";; IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
--- Python-3.3.3/Makefile.pre.in 2012-11-28 09:05:45.861528086 +0000 diff -ru python3.orig/Makefile.pre.in python3/Makefile.pre.in
+++ Python-3.3.3/Makefile.pre.in 2012-11-28 09:06:23.046964040 +0000 --- python3.orig/Makefile.pre.in 2015-07-05 18:50:07.000000000 +0200
@@ -493,14 +493,20 @@ +++ python3/Makefile.pre.in 2015-07-26 17:34:00.386488960 +0200
@@ -598,14 +598,20 @@
libpython$(LDVERSION).so: $(LIBRARY_OBJS) libpython$(LDVERSION).so: $(LIBRARY_OBJS)
if test $(INSTSONAME) != $(LDLIBRARY); then \ if test $(INSTSONAME) != $(LDLIBRARY); then \
...@@ -123,7 +126,7 @@ build with GCC on AIX ...@@ -123,7 +126,7 @@ build with GCC on AIX
libpython$(LDVERSION).dylib: $(LIBRARY_OBJS) libpython$(LDVERSION).dylib: $(LIBRARY_OBJS)
$(CC) -dynamiclib -Wl,-single_module $(PY_LDFLAGS) -undefined dynamic_lookup -Wl,-install_name,$(prefix)/lib/libpython$(LDVERSION).dylib -Wl,-compatibility_version,$(VERSION) -Wl,-current_version,$(VERSION) -o $@ $(LIBRARY_OBJS) $(SHLIBS) $(LIBC) $(LIBM) $(LDLAST); \ $(CC) -dynamiclib -Wl,-single_module $(PY_LDFLAGS) -undefined dynamic_lookup -Wl,-install_name,$(prefix)/lib/libpython$(LDVERSION).dylib -Wl,-compatibility_version,$(VERSION) -Wl,-current_version,$(VERSION) -o $@ $(LIBRARY_OBJS) $(SHLIBS) $(LIBC) $(LIBM) $(LDLAST); \
@@ -1106,6 +1112,8 @@ @@ -1299,6 +1305,8 @@
export PATH; PATH="`pwd`:$$PATH"; \ export PATH; PATH="`pwd`:$$PATH"; \
export PYTHONPATH; PYTHONPATH="`pwd`/Lib"; \ export PYTHONPATH; PYTHONPATH="`pwd`/Lib"; \
export DYLD_FRAMEWORK_PATH; DYLD_FRAMEWORK_PATH="`pwd`"; \ export DYLD_FRAMEWORK_PATH; DYLD_FRAMEWORK_PATH="`pwd`"; \
...@@ -132,9 +135,10 @@ build with GCC on AIX ...@@ -132,9 +135,10 @@ build with GCC on AIX
export EXE; EXE="$(BUILDEXE)"; \ export EXE; EXE="$(BUILDEXE)"; \
if [ -n "$(MULTIARCH)" ]; then export MULTIARCH; MULTIARCH=$(MULTIARCH); fi; \ if [ -n "$(MULTIARCH)" ]; then export MULTIARCH; MULTIARCH=$(MULTIARCH); fi; \
export PYTHON_FOR_BUILD; \ export PYTHON_FOR_BUILD; \
--- Python-3.3.3/Modules/Setup.dist 2012-11-28 09:05:45.935528957 +0000 diff -ru python3.orig/Modules/Setup.dist python3/Modules/Setup.dist
+++ Python-3.3.3/Modules/Setup.dist 2012-11-28 09:06:23.052964111 +0000 --- python3.orig/Modules/Setup.dist 2015-07-05 18:50:07.000000000 +0200
@@ -177,7 +177,7 @@ +++ python3/Modules/Setup.dist 2015-07-26 17:34:27.951490811 +0200
@@ -181,7 +181,7 @@
#_bisect _bisectmodule.c # Bisection algorithms #_bisect _bisectmodule.c # Bisection algorithms
#_heapq _heapqmodule.c # Heap queue algorithm #_heapq _heapqmodule.c # Heap queue algorithm
......
set RPATH (only to be used on ELF platforms) set RPATH (only to be used on ELF platforms)
--- python3/Makefile.pre.in 2013-04-19 15:08:43.637715422 +0200 diff -ru python3.orig/Makefile.pre.in python3/Makefile.pre.in
+++ python3/Makefile.pre.in 2013-04-19 15:07:32.685711138 +0200 --- python3.orig/Makefile.pre.in 2015-07-26 20:29:07.126194320 +0200
@@ -464,7 +464,7 @@ +++ python3/Makefile.pre.in 2015-07-26 20:37:21.814227530 +0200
@@ -550,7 +550,7 @@
# Build the interpreter # Build the interpreter
$(BUILDPYTHON): Modules/python.o $(LIBRARY) $(LDLIBRARY) $(PY3LIBRARY) $(BUILDPYTHON): Programs/python.o $(LIBRARY) $(LDLIBRARY) $(PY3LIBRARY)
- $(LINKCC) $(PY_LDFLAGS) $(LINKFORSHARED) -o $@ Modules/python.o $(BLDLIBRARY) $(LIBS) $(MODLIBS) $(SYSLIBS) $(LDLAST) - $(LINKCC) $(PY_LDFLAGS) $(LINKFORSHARED) -o $@ Programs/python.o $(BLDLIBRARY) $(LIBS) $(MODLIBS) $(SYSLIBS) $(LDLAST)
+ $(LINKCC) $(PY_LDFLAGS) $(LINKFORSHARED) -o $@ Modules/python.o $(BLDLIBRARY) $(LIBS) $(MODLIBS) $(SYSLIBS) $(LDLAST) -Wl,-rpath,\$$ORIGIN + $(LINKCC) $(PY_LDFLAGS) $(LINKFORSHARED) -o $@ Programs/python.o $(BLDLIBRARY) $(LIBS) $(MODLIBS) $(SYSLIBS) $(LDLAST) -Wl,-rpath,\$$ORIGIN
platform: $(BUILDPYTHON) pybuilddir.txt platform: $(BUILDPYTHON) pybuilddir.txt
$(RUNSHARED) $(PYTHON_FOR_BUILD) -c 'import sys ; from sysconfig import get_platform ; print(get_platform()+"-"+sys.version[0:3])' >platform $(RUNSHARED) $(PYTHON_FOR_BUILD) -c 'import sys ; from sysconfig import get_platform ; print(get_platform()+"-"+sys.version[0:3])' >platform
http://bugs.python.org/issue17797 http://bugs.python.org/issue17797
http://connect.microsoft.com/VisualStudio/feedback/details/785119/ http://connect.microsoft.com/VisualStudio/feedback/details/785119/
Visual Studio 2012 changed return value for fileno function that breaks Visual Studio 2013 changed return value for fileno function that breaks
when python tries to check/setup stdin/out/err when python tries to check/setup stdin/out/err
GetStdHandle on Windows XP behaves contrary to the documentation... GetStdHandle on Windows XP behaves contrary to the documentation...
MSVC 14.0 fixed this bug.
diff --git a/Python/pythonrun.c b/Python/pythonrun.c diff -ru python3.orig/Python/pylifecycle.c python3/Python/pylifecycle.c
index 91d56b7..d28ffc7 100644 --- python3.orig/Python/pylifecycle.c 2015-07-05 18:50:08.000000000 +0200
--- a/Python/pythonrun.c +++ python3/Python/pylifecycle.c 2015-07-26 20:01:23.563082638 +0200
+++ b/Python/pythonrun.c @@ -1065,15 +1065,30 @@
@@ -1015,13 +1015,28 @@ error:
static int static int
is_valid_fd(int fd) is_valid_fd(int fd)
{ {
- int dummy_fd; - int dummy_fd;
if (fd < 0 || !_PyVerify_fd(fd)) if (fd < 0 || !_PyVerify_fd(fd))
return 0; return 0;
- _Py_BEGIN_SUPPRESS_IPH
- dummy_fd = dup(fd); - dummy_fd = dup(fd);
- if (dummy_fd < 0) - if (dummy_fd >= 0)
- return 0; - close(dummy_fd);
- close(dummy_fd); - _Py_END_SUPPRESS_IPH
- return dummy_fd >= 0;
+ +
+#if defined(MS_WINDOWS) && defined(HAVE_FSTAT) +#if defined(MS_WINDOWS) && defined(HAVE_FSTAT) && defined(_MSC_VER) && (_MSC_VER >= 1700 && _MSC_VER < 1900)
+ /* dup (DuplicateHandle) doesn't say fd is a valid *file* handle. + /* dup (DuplicateHandle) doesn't say fd is a valid *file* handle.
+ * It could be a current thread pseudo-handle. + * It could be a current thread pseudo-handle.
+ */ + */
...@@ -29,17 +31,19 @@ index 91d56b7..d28ffc7 100644 ...@@ -29,17 +31,19 @@ index 91d56b7..d28ffc7 100644
+ struct stat buf; + struct stat buf;
+ if (fstat(fd, &buf) < 0 && (errno == EBADF || errno == ENOENT)) + if (fstat(fd, &buf) < 0 && (errno == EBADF || errno == ENOENT))
+ return 0; + return 0;
+ else
+ return 1;
+ } + }
+#else +#else
+ { + {
+ int dummy_fd; + int dummy_fd = dup(fd);
+ dummy_fd = dup(fd); + _Py_BEGIN_SUPPRESS_IPH
+ if (dummy_fd < 0) + if (dummy_fd >= 0)
+ return 0; + close(dummy_fd);
+ close(dummy_fd); + _Py_END_SUPPRESS_IPH
+ return dummy_fd >= 0;
+ } + }
+#endif +#endif
+
return 1;
} }
/* Initialize sys.stdin, stdout, stderr and builtins.open */
diff -ru python3.orig/PCbuild/pcbuild.sln python3/PCbuild/pcbuild.sln
--- foo/python3.orig/PCbuild/pcbuild.sln 2015-08-22 19:12:48.508338400 +0200
+++ foo/python3/PCbuild/pcbuild.sln 2015-08-22 19:15:50.130169800 +0200
@@ -58,12 +58,6 @@
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_testmultiphase", "_testmultiphase.vcxproj", "{16BFE6F0-22EF-40B5-B831-7E937119EF10}"
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tcl", "tcl.vcxproj", "{B5FD6F1D-129E-4BFF-9340-03606FAC7283}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tix", "tix.vcxproj", "{C5A3E7FB-9695-4B2E-960B-1D9F43F1E555}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tk", "tk.vcxproj", "{7E85ECCF-A72C-4DA4-9E52-884508E80BA1}"
-EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
diff -ru python3.orig/configure python3/configure
--- misc/python3.orig/configure 2015-07-26 21:14:31.127377193 +0200
+++ misc/python3/configure 2015-07-26 21:21:34.975405648 +0200
@@ -14388,7 +14388,7 @@
$as_echo "$ABIFLAGS" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
$as_echo_n "checking SOABI... " >&6; }
-SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET}
+SOABI='cpython-'`echo $VERSION$ABIFLAGS`
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
$as_echo "$SOABI" >&6; }
--- Modules/_ctypes/libffi/src/x86/ffi64.c diff -ru python3.orig/Modules/_ctypes/libffi/src/x86/ffi64.c python3/Modules/_ctypes/libffi/src/x86/ffi64.c
+++ Modules/_ctypes/libffi/src/x86/ffi64.c --- Modules/_ctypes/libffi/src/x86/ffi64.c 2015-07-05 18:50:07.000000000 +0200
@@ -545,11 +545,15 @@ +++ Modules/_ctypes/libffi/src/x86/ffi64.c 2015-07-26 20:18:56.457153323 +0200
@@ -548,11 +548,15 @@
tramp = (volatile unsigned short *) &closure->tramp[0]; tramp = (volatile unsigned short *) &closure->tramp[0];
tramp[0] = 0xbb49; /* mov <code>, %r11 */ tramp[0] = 0xbb49; /* mov <code>, %r11 */
...@@ -20,19 +21,9 @@ ...@@ -20,19 +21,9 @@
/* Set the carry bit iff the function uses any sse registers. /* Set the carry bit iff the function uses any sse registers.
This is clc or stc, together with the first byte of the jmp. */ This is clc or stc, together with the first byte of the jmp. */
--- Objects/bytearrayobject.c diff -ru python3.orig/Objects/listobject.c python3/Objects/listobject.c
+++ Objects/bytearrayobject.c --- Objects/listobject.c 2015-07-05 18:50:08.000000000 +0200
@@ -294,7 +294,7 @@ +++ Objects/listobject.c 2015-07-26 20:22:30.539167695 +0200
PyBuffer_Release(&vo);
return NULL;
}
- memcpy(self->ob_bytes + mysize, vo.buf, vo.len);
+ if (vo.len != 0) memcpy(self->ob_bytes + mysize, vo.buf, vo.len);
PyBuffer_Release(&vo);
Py_INCREF(self);
return (PyObject *)self;
--- Objects/listobject.c
+++ Objects/listobject.c
@@ -641,7 +641,7 @@ @@ -641,7 +641,7 @@
goto Error; goto Error;
} }
...@@ -41,32 +32,12 @@ ...@@ -41,32 +32,12 @@
+ if (s != 0) memcpy(recycle, &item[ilow], s); + if (s != 0) memcpy(recycle, &item[ilow], s);
if (d < 0) { /* Delete -d items */ if (d < 0) { /* Delete -d items */
memmove(&item[ihigh+d], &item[ihigh], Py_ssize_t tail;
@@ -2036,7 +2036,7 @@
if (keys != NULL) {
for (i = 0; i < saved_ob_size; i++)
Py_DECREF(keys[i]);
- if (keys != &ms.temparray[saved_ob_size+1])
+ if (keys != ((char *) ms.temparray) + (saved_ob_size+1) * sizeof (PyObject *))
PyMem_FREE(keys);
}
--- Objects/longobject.c
+++ Objects/longobject.c
@@ -36,7 +36,7 @@
static PyObject *
get_small_int(sdigit ival)
{
- PyObject *v = (PyObject*)(small_ints + ival + NSMALLNEGINTS);
+ PyObject *v = (PyObject*)(small_ints + (ival + NSMALLNEGINTS));
Py_INCREF(v);
#ifdef COUNT_ALLOCS
if (ival >= 0)
--- Modules/_ctypes/_ctypes.c --- Modules/_ctypes/_ctypes.c
+++ Modules/_ctypes/_ctypes.c +++ Modules/_ctypes/_ctypes.c
@@ -1328,8 +1328,10 @@ @@ -1358,8 +1358,10 @@
if (stgdict->shape == NULL)
goto error; goto error;
}
stgdict->shape[0] = length; stgdict->shape[0] = length;
- memmove(&stgdict->shape[1], itemdict->shape, - memmove(&stgdict->shape[1], itemdict->shape,
- sizeof(Py_ssize_t) * (stgdict->ndim - 1)); - sizeof(Py_ssize_t) * (stgdict->ndim - 1));
......
This diff is collapsed.
# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
#
# This file is part of the LibreOffice project.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
$(eval $(call gb_ExternalProject_ExternalProject,python3))
$(eval $(call gb_ExternalProject_use_externals,python3,\
expat \
openssl \
zlib \
))
$(eval $(call gb_ExternalProject_register_targets,python3,\
build \
$(if $(filter MACOSX,$(OS)),\
fixscripts \
fixinstallnames \
executables \
) \
))
ifeq ($(OS)$(COM),WNTMSC)
# TODO: using Debug configuration and related mangling of pyconfig.h
# at least for MSVC 2008 it is necessary to clear MAKEFLAGS because
# nmake is invoked
$(call gb_ExternalProject_get_state_target,python3,build) :
$(call gb_ExternalProject_run,build,\
MAKEFLAGS= MSBuild.exe pcbuild.sln /t:Build \
/p:Configuration=$(if $(MSVC_USE_DEBUG_RUNTIME),Debug,Release) \
/p:Platform=$(if $(filter INTEL,$(CPUNAME)),Win32,x64) \
$(if $(filter 120,$(VCVER)),/p:PlatformToolset=v120 \
/p:VisualStudioVersion=12.0 /ToolsVersion:12.0) \
,PCBuild)
else
# this was added in 2004, hopefully is obsolete now (and why only intel anyway)? $(if $(filter SOLARIS-INTEL,$(OS)$(CPUNAME)),--disable-ipv6)
# --with-system-expat: this should find the one in the solver (or system)
# create a symlink "LO_lib" because the .so are in a directory with platform
# specific name like build/lib.linux-x86_64-3.3
python3_cflags = $(ZLIB_CFLAGS)
ifneq (,$(ENABLE_VALGRIND))
python3_cflags += $(VALGRIND_CFLAGS)
endif
$(call gb_ExternalProject_get_state_target,python3,build) :
$(call gb_ExternalProject_run,build,\
./configure \
$(if $(CROSS_COMPILING),--build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM)) \
$(if $(ENABLE_VALGRIND),--with-valgrind) \
--prefix=/python-inst \
$(if $(filter MACOSX,$(OS)),,--with-system-expat) \
$(if $(filter AIX,$(OS)), \
--disable-ipv6 --with-threads OPT="-g0 -fwrapv -O3 -Wall", \
$(if $(gb_Module_CURRENTMODULE_DEBUG_ENABLED), \
OPT="$(gb_COMPILERNOOPTFLAGS) $(gb_DEBUG_CFLAGS)")) \
$(if $(filter WNT-GCC,$(OS)-$(COM)),--with-threads ac_cv_printf_zd_format=no) \
$(if $(filter MACOSX,$(OS)), \
$(if $(filter INTEL,$(CPUNAME)),--enable-universalsdk=$(MACOSX_SDK_PATH) \
--with-universal-archs=intel \
) \
--enable-framework=/@__________________________________________________OOO --with-framework-name=LibreOfficePython, \
--enable-shared \
) \
CC="$(strip $(CC) \
$(if $(SYSTEM_OPENSSL),,-I$(call gb_UnpackedTarball_get_dir,openssl)/include \
$(if $(DISABLE_OPENSSL),,-I$(call gb_UnpackedTarball_get_dir,openssl)/include)) \
$(if $(SYSTEM_EXPAT),,-I$(call gb_UnpackedTarball_get_dir,expat)/lib) \
$(if $(SYSBASE), -I$(SYSBASE)/usr/include) \
)" \
$(if $(python3_cflags),CFLAGS='$(python3_cflags)') \
$(if $(filter -fsanitize=%,$(CC)),LINKCC="$(CXX)") \
LDFLAGS="$(strip $(LDFLAGS) \
$(if $(SYSTEM_OPENSSL),,-L$(call gb_UnpackedTarball_get_dir,openssl)) \
$(if $(SYSTEM_EXPAT),,-L$(gb_StaticLibrary_WORKDIR)) \
$(if $(SYSBASE), -L$(SYSBASE)/usr/lib) \
$(if $(filter WNT-GCC,$(OS)-$(COM)), -shared-libgcc \
$(if $(MINGW_SHARED_GCCLIB),-Wl$(COMMA)--enable-runtime-pseudo-reloc-v2 -Wl$(COMMA)--export-all-symbols)) \
$(gb_LTOFLAGS) \
)" \
&& MAKEFLAGS= $(MAKE) \
$(if $(filter MACOSX,$(OS)),DESTDIR=$(EXTERNAL_WORKDIR)/python-inst install) \
&& ln -s build/lib.* LO_lib \
)
endif
ifeq ($(OS),MACOSX)
python3_fw_prefix=$(call gb_UnpackedTarball_get_dir,python3)/python-inst/@__________________________________________________OOO/LibreOfficePython.framework
# rule to allow relocating the whole framework, removing reference to buildinstallation directory
$(call gb_ExternalProject_get_state_target,python3,fixscripts) : $(call gb_ExternalProject_get_state_target,python3,build)
$(call gb_Output_announce,python3 - remove reference to installroot from scripts,build,CUS,5)
$(COMMAND_ECHO)for file in \
$(python3_fw_prefix)/Versions/$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/bin/2to3 \
$(python3_fw_prefix)/Versions/$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/bin/2to3-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR) \
$(python3_fw_prefix)/Versions/$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/bin/idle$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR) \
$(python3_fw_prefix)/Versions/$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/bin/pydoc$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR) \
$(python3_fw_prefix)/Versions/$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/bin/python$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)-config \
$(python3_fw_prefix)/Versions/$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/bin/python$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m-config \
$(python3_fw_prefix)/Versions/$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/bin/pyvenv-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR) ; do \
{ rm "$$file" && $(gb_AWK) '\
BEGIN {print "#!/bin/bash\n\
origpath=$$(pwd)\n\
bindir=$$(cd $$(dirname \"$$0\") ; pwd)\n\
cd \"$$origpath\"\n\
\"$$bindir/../Resources/Python.app/Contents/MacOS/LibreOfficePython\" - $$@ <<EOF"} \
FNR==1{next} \
{print} \
END {print "EOF"}' > "$$file" ; } < "$$file" ; chmod +x "$$file" ; done
touch $@
$(call gb_ExternalProject_get_state_target,python3,fixinstallnames) : $(call gb_ExternalProject_get_state_target,python3,build)
$(INSTALL_NAME_TOOL) -change \
$(python3_fw_prefix)/Versions/$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/LibreOfficePython \
@executable_path/../../../../LibreOfficePython \
$(python3_fw_prefix)/Versions/$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/Resources/Python.app/Contents/MacOS/LibreOfficePython
for file in $(shell find $(python3_fw_prefix)/Versions/$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/lib/python$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/lib-dynload -name "*.so") ; do \
$(INSTALL_NAME_TOOL) -change \
$(python3_fw_prefix)/Versions/$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/LibreOfficePython \
@loader_path/../../../LibreOfficePython $$file ; done
touch $@
# also delete binaries that are symlinked in scp2
$(call gb_ExternalProject_get_state_target,python3,executables) : $(call gb_ExternalProject_get_state_target,python3,build)
cd $(python3_fw_prefix)/Versions/$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/bin ; \
for file in python$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR) \
python$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m \
pythonw$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR) ; do \
$(INSTALL_NAME_TOOL) -change \
$(python3_fw_prefix)/Versions/$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/LibreOfficePython \
@executable_path/../LibreOfficePython $$file ; done
touch $@
endif
# vim: set noet sw=4 ts=4:
# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
#
# This file is part of the LibreOffice project.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
$(eval $(call gb_GeneratedPackage_GeneratedPackage,python3,$(call gb_UnpackedTarball_get_dir,python3)/python-inst/@__________________________________________________OOO))
$(eval $(call gb_GeneratedPackage_use_unpacked,python3,python3))
$(eval $(call gb_GeneratedPackage_use_external_project,python3,python3))
$(eval $(call gb_GeneratedPackage_add_dir,python3,$(INSTROOT)/Frameworks/LibreOfficePython.framework,LibreOfficePython.framework))
# vim: set noet sw=4 ts=4:
# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
module_directory:=$(dir $(realpath $(firstword $(MAKEFILE_LIST))))
include $(module_directory)/../../solenv/gbuild/partial_build.mk
# vim: set noet sw=4 ts=4:
# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
#
# This file is part of the LibreOffice project.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
$(eval $(call gb_Module_Module,python3))
ifneq ($(DISABLE_PYTHON),TRUE)
ifeq ($(SYSTEM_PYTHON),)
$(eval $(call gb_Module_add_targets,python3,\
UnpackedTarball_python3 \
ExternalProject_python3 \
$(if $(filter MACOSX,$(OS)),GeneratedPackage_python3,ExternalPackage_python3) \
))
endif
endif
# vim: set noet sw=4 ts=4:
CPython implementation of Python 3 from http://www.python.org
# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
#
# This file is part of the LibreOffice project.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
$(eval $(call gb_UnpackedTarball_UnpackedTarball,python3))
$(eval $(call gb_UnpackedTarball_set_tarball,python3,$(PYTHON_TARBALL),,python3))
$(eval $(call gb_UnpackedTarball_fix_end_of_line,python3,\
PCbuild/pcbuild.sln \
))
$(eval $(call gb_UnpackedTarball_add_patches,python3,\
external/python33/i100492-freebsd.patch.1 \
external/python33/python-3.3.0-i42553.patch.2 \
external/python33/python-3.3.3-aix.patch.1 \
external/python33/python-3.3.0-darwin.patch.1 \
external/python33/python-3.3.0-msvc2012.patch.1 \
external/python33/python-3.3.0-msvc-disable.patch.1 \
external/python33/python-3.3.0-msvc-x64.patch.1 \
external/python33/python-3.3.0-ssl.patch.1 \
external/python33/python-3.3.0-gcc-4.8.patch.1 \
external/python33/python-3.3.0-pythreadstate.patch.1 \
external/python33/python-3.3.0-clang.patch.1 \
external/python33/python-3.3.3-py17797.patch.1 \
external/python33/python-3.3.3-msvc2012-winxp.patch.1 \
external/python33/python-3.3.5-pyexpat-symbols.patch.1 \
external/python33/python-3.3.5-vs2013.patch.1 \
external/python33/python-3.3.5-darwin-gnu-xargs.patch.1 \
external/python33/python-msvc-disable-sse2.patch.1 \
external/python33/python-lsan.patch.0 \
external/python33/ubsan.patch.0 \
))
ifneq ($(filter DRAGONFLY FREEBSD LINUX NETBSD OPENBSD SOLARIS,$(OS)),)
$(eval $(call gb_UnpackedTarball_add_patches,python3,\
external/python33/python-3.3.3-elf-rpath.patch.1 \
))
endif
ifneq ($(ENABLE_RUNTIME_OPTIMIZATIONS),TRUE)
$(eval $(call gb_UnpackedTarball_add_patches,python3,\
external/python33/python-3.3.3-disable-obmalloc.patch.0 \
))
endif
ifeq ($(OS)-$(COM),WNT-MSC)
ifneq ($(filter 120,$(VCVER)),)
$(eval $(call gb_UnpackedTarball_add_patches,python3,\
external/python33/python-vc2013.patch.1 \
))
endif
endif
# vim: set noet sw=4 ts=4:
FreeBSD porting fixes, patch by maho@openoffice.org
--- Python-3.3.0/configure 2012-11-28 09:00:41.094955090 +0000
+++ Python-3.3.0/configure 2012-11-28 09:01:13.033329526 +0000
@@ -5545,11 +5545,6 @@
LDLIBRARY='libpython$(LDVERSION).so'
BLDLIBRARY='-L. -lpython$(LDVERSION)'
RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
- case $ac_sys_system in
- FreeBSD*)
- SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
- ;;
- esac
INSTSONAME="$LDLIBRARY".$SOVERSION
if test "$with_pydebug" != yes
then
--- Python-3.3.0/Lib/test/test_threading.py 2012-11-28 09:00:41.292957412 +0000
+++ Python-3.3.0/Lib/test/test_threading.py 2012-11-28 09:01:13.017329339 +0000
@@ -451,7 +451,7 @@
# #12316 and #11870), and fork() from a worker thread is known to trigger
# problems with some operating systems (issue #3863): skip problematic tests
# on platforms known to behave badly.
- platforms_to_skip = ('freebsd4', 'freebsd5', 'freebsd6', 'netbsd5',
+ platforms_to_skip = ('freebsd4', 'freebsd5', 'freebsd6', 'freebsd7', 'netbsd5',
'os2emx', 'hp-ux11')
def _run_and_join(self, script):
--- Python-3.3.0/Python/thread_pthread.h 2012-11-28 09:00:41.097955124 +0000
+++ Python-3.3.0/Python/thread_pthread.h 2012-11-28 09:01:13.018329351 +0000
@@ -42,6 +42,10 @@
#endif
#endif
+#ifdef __FreeBSD__
+#include <osreldate.h>
+#endif
+
/* The POSIX spec says that implementations supporting the sem_*
family of functions must indicate this by defining
_POSIX_SEMAPHORES. */
@@ -60,7 +64,6 @@
in default setting. So the process scope is preferred to get
enough number of threads to work. */
#ifdef __FreeBSD__
-#include <osreldate.h>
#if __FreeBSD_version >= 500000 && __FreeBSD_version < 504101
#undef PTHREAD_SYSTEM_SCHED_SUPPORTED
#endif
@@ -186,6 +189,9 @@
{
pthread_t th;
int status;
+#ifdef __FreeBSD__
+ sigset_t set, oset;
+#endif
#if defined(THREAD_STACK_SIZE) || defined(PTHREAD_SYSTEM_SCHED_SUPPORTED)
pthread_attr_t attrs;
#endif
@@ -214,7 +220,10 @@
#if defined(PTHREAD_SYSTEM_SCHED_SUPPORTED)
pthread_attr_setscope(&attrs, PTHREAD_SCOPE_SYSTEM);
#endif
-
+#ifdef __FreeBSD__
+ sigfillset(&set);
+ SET_THREAD_SIGMASK(SIG_BLOCK, &set, &oset);
+#endif
status = pthread_create(&th,
#if defined(THREAD_STACK_SIZE) || defined(PTHREAD_SYSTEM_SCHED_SUPPORTED)
&attrs,
@@ -225,6 +234,9 @@
(void *)arg
);
+#ifdef __FreeBSD__
+ SET_THREAD_SIGMASK(SIG_SETMASK, &oset, NULL);
+#endif
#if defined(THREAD_STACK_SIZE) || defined(PTHREAD_SYSTEM_SCHED_SUPPORTED)
pthread_attr_destroy(&attrs);
#endif
-*- Mode: diff -*-
--- python3/setup.py
+++ python3/setup.py
@@ -436,7 +436,7 @@
if ret >> 8 == 0:
with open(tmpfile) as fp:
for line in fp.readlines():
- if line.startswith("gcc version"):
+ if line.startswith("gcc version") or line.startswith("clang -cc1 version"):
is_gcc = True
elif line.startswith("#include <...>"):
in_incdirs = True
-*- Mode: diff -*-
LO needs to build both against MacOSX SDK and not produce universal binaries.
diff -ru python3.old_/configure python3/configure
--- python3.old_/configure 2012-09-29 10:00:50.000000000 +0200
+++ python3/configure 2012-11-13 16:37:26.030013256 +0100
@@ -6353,7 +6353,19 @@
if test "${enable_universalsdk}"; then
UNIVERSAL_ARCH_FLAGS=""
if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
- UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
+ # LO does not use Universal Binaries (but the only way to set a SDK
+ # here implies that, so de-universalize here...)
+ case `/usr/bin/arch` in
+ i386)
+ UNIVERSAL_ARCH_FLAGS="-arch i386"
+ ;;
+ ppc)
+ UNIVERSAL_ARCH_FLAGS=""
+ ;;
+ *)
+ as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
+ ;;
+ esac
ARCH_RUN_32BIT=""
LIPO_32BIT_FLAGS=""
elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
On OS X avoid /usr/local/lib and include like the plague, we don't
want to accidentally get some MacPorts etc stuff.
On OS X, always run the compiler (which is Clang, not gcc) to find out
what the include paths are. On a clean modern installation, there is
no /usr/include.
--- python3/setup.py
+++ python3/setup.py
@@ -460,11 +460,11 @@
# 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:
+ if not cross_compiling and host_platform != 'darwin':
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:
+ if cross_compiling or host_platform == 'darwin':
self.add_gcc_paths()
self.add_multiarch_paths()
--- python3/Mac/Makefile.in.orig 2013-09-13 20:16:50.558137603 +0200
+++ python3/Mac/Makefile.in 2013-09-13 21:57:14.790962423 +0200
@@ -39,7 +39,7 @@
INSTALL_SCRIPT= @INSTALL_SCRIPT@
INSTALL_DATA=@INSTALL_DATA@
LN=@LN@
-STRIPFLAG=-s
+STRIPFLAG=
CPMAC=CpMac
APPTEMPLATE=$(srcdir)/Resources/app
--- python3/Mac/Resources/framework/Info.plist.in
+++ python3/Mac/Resources/framework/Info.plist.in
@@ -5,7 +5,7 @@
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleExecutable</key>
- <string>Python</string>
+ <string>@PYTHONFRAMEWORK@</string>
<key>CFBundleGetInfoString</key>
<string>Python Runtime and Library</string>
<key>CFBundleIdentifier</key>
--- python3/Mac/Resources/app/Info.plist.in
+++ python3/Mac/Resources/app/Info.plist.in
@@ -18,7 +18,7 @@
</dict>
</array>
<key>CFBundleExecutable</key>
- <string>Python</string>
+ <string>LibreOfficePython</string>
<key>CFBundleGetInfoString</key>
<string>%version%, (c) 2004-2014 Python Software Foundation.</string>
<key>CFBundleHelpBookFolder</key>
--- Python-3.3.0/Include/modsupport.h 2012-09-29 10:00:26.000000000 +0200
+++ Python-3.3.0/Include/modsupport.h 2013-03-08 10:46:28.671938738 +0100
@@ -26,7 +26,11 @@
/* Due to a glitch in 3.2, the _SizeT versions weren't exported from the DLL. */
#if !defined(PY_SSIZE_T_CLEAN) || !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x03030000
PyAPI_FUNC(int) PyArg_Parse(PyObject *, const char *, ...);
-PyAPI_FUNC(int) PyArg_ParseTuple(PyObject *, const char *, ...) Py_FORMAT_PARSETUPLE(PyArg_ParseTuple, 2, 3);
+PyAPI_FUNC(int) PyArg_ParseTuple(PyObject *, const char *, ...)
+#ifdef PY_SSIZE_T_CLEAN
+ Py_FORMAT_PARSETUPLE(PyArg_ParseTuple, 2, 3)
+#endif
+ ;
PyAPI_FUNC(int) PyArg_ParseTupleAndKeywords(PyObject *, PyObject *,
const char *, char **, ...);
PyAPI_FUNC(int) PyArg_ValidateKeywordArguments(PyObject *);
definition of gethostbyname conflicts with system /usr/include/unistd.h,
available since at least Solaris 2.6 according to python-Bugs-837046
Author: taniguchi@openoffice.org
--- misc/Python-2.6.1/Include/pyport.h 2008-06-11 09:41:16.000000000 +0200
+++ misc/build/Python-2.6.1/Include/pyport.h 2011-06-06 17:31:17.000000000 +0200
@@ -449,11 +449,6 @@
in platform-specific #ifdefs.
**************************************************************************/
-#ifdef SOLARIS
-/* Unchecked */
-extern int gethostname(char *, int);
-#endif
-
#ifdef HAVE__GETPTY
#include <sys/types.h> /* we need to import mode_t */
extern char * _getpty(int *, int, mode_t, int);
Disable some stuff LO does not need, especially stuff with external dependencies
diff -ru python3/PCbuild/pcbuild.sln python3.new/PCbuild/pcbuild.sln
--- python3/PCbuild/pcbuild.sln 2012-09-29 10:00:48.000000000 +0200
+++ python3.new/PCbuild/pcbuild.sln 2012-11-12 22:13:49.445159668 +0100
@@ -12,10 +12,6 @@
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pythoncore", "pythoncore.vcxproj", "{CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}"
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pythonw", "pythonw.vcxproj", "{F4229CC3-873C-49AE-9729-DD308ED4CD4A}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "w9xpopen", "w9xpopen.vcxproj", "{E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}"
-EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "make_buildinfo", "make_buildinfo.vcxproj", "{C73F0EC1-358B-4177-940F-0846AC8B04CD}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "winsound", "winsound.vcxproj", "{28B5D777-DDF2-4B6B-B34F-31D938813856}"
@@ -32,30 +28,16 @@
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_socket", "_socket.vcxproj", "{86937F53-C189-40EF-8CE8-8759D8E7D480}"
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_sqlite3", "_sqlite3.vcxproj", "{13CECB97-4119-4316-9D42-8534019A5A44}"
-EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_ssl", "_ssl.vcxproj", "{C6E20F84-3247-4AD6-B051-B073268F73BA}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_testcapi", "_testcapi.vcxproj", "{6901D91C-6E48-4BB7-9FEC-700C8131DF1D}"
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_tkinter", "_tkinter.vcxproj", "{4946ECAC-2E69-4BF8-A90A-F5136F5094DF}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_bz2", "_bz2.vcxproj", "{73FCD2BD-F133-46B7-8EC1-144CD82A59D5}"
-EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "select", "select.vcxproj", "{18CAE28C-B454-46C1-87A0-493D91D97F03}"
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_lzma", "_lzma.vcxproj", "{F9D71780-F393-11E0-BE50-0800200C9A66}"
-EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "unicodedata", "unicodedata.vcxproj", "{ECC7CEAC-A5E5-458E-BB9E-2413CC847881}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pyexpat", "pyexpat.vcxproj", "{D06B6426-4762-44CC-8BAD-D79052507F2F}"
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "bdist_wininst", "bdist_wininst.vcxproj", "{EB1C19C1-1F18-421E-9735-CAEE69DC6A3C}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_hashlib", "_hashlib.vcxproj", "{447F05A8-F581-4CAC-A466-5AC7936E207E}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sqlite3", "sqlite3.vcxproj", "{A1A295E5-463C-437F-81CA-1F32367685DA}"
-EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_multiprocessing", "_multiprocessing.vcxproj", "{9E48B300-37D1-11DD-8C41-005056C00008}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ssl", "ssl.vcxproj", "{E5B04CC0-EB4C-42AB-B4DC-18EF95F864B0}"
This diff is collapsed.
Adapt VC10/MSVC2010 stuff for VC11/MSVC2012 (apparently builds with both then)
diff -ru python3.old_/PCbuild/_msi.vcxproj python3/PCbuild/_msi.vcxproj
--- python3.old_/PCbuild/_msi.vcxproj 2012-09-29 10:00:48.000000000 +0200
+++ python3/PCbuild/_msi.vcxproj 2012-11-13 15:52:40.656101165 +0100
@@ -151,7 +151,7 @@
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Link>
- <AdditionalDependencies>fci.lib;msi.lib;rpcrt4.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalDependencies>cabinet.lib;msi.lib;rpcrt4.lib;%(AdditionalDependencies)</AdditionalDependencies>
<BaseAddress>0x1D160000</BaseAddress>
</Link>
</ItemDefinitionGroup>
@@ -160,13 +160,13 @@
<TargetEnvironment>X64</TargetEnvironment>
</Midl>
<Link>
- <AdditionalDependencies>fci.lib;msi.lib;rpcrt4.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalDependencies>cabinet.lib;msi.lib;rpcrt4.lib;%(AdditionalDependencies)</AdditionalDependencies>
<BaseAddress>0x1D160000</BaseAddress>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Link>
- <AdditionalDependencies>fci.lib;msi.lib;rpcrt4.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalDependencies>cabinet.lib;msi.lib;rpcrt4.lib;%(AdditionalDependencies)</AdditionalDependencies>
<BaseAddress>0x1D160000</BaseAddress>
</Link>
</ItemDefinitionGroup>
@@ -175,13 +175,13 @@
<TargetEnvironment>X64</TargetEnvironment>
</Midl>
<Link>
- <AdditionalDependencies>fci.lib;msi.lib;rpcrt4.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalDependencies>cabinet.lib;msi.lib;rpcrt4.lib;%(AdditionalDependencies)</AdditionalDependencies>
<BaseAddress>0x1D160000</BaseAddress>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'">
<Link>
- <AdditionalDependencies>fci.lib;msi.lib;rpcrt4.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalDependencies>cabinet.lib;msi.lib;rpcrt4.lib;%(AdditionalDependencies)</AdditionalDependencies>
<BaseAddress>0x1D160000</BaseAddress>
</Link>
</ItemDefinitionGroup>
@@ -190,14 +190,14 @@
<TargetEnvironment>X64</TargetEnvironment>
</Midl>
<Link>
- <AdditionalDependencies>fci.lib;msi.lib;rpcrt4.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalDependencies>cabinet.lib;msi.lib;rpcrt4.lib;%(AdditionalDependencies)</AdditionalDependencies>
<BaseAddress>0x1D160000</BaseAddress>
<TargetMachine>MachineX64</TargetMachine>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'">
<Link>
- <AdditionalDependencies>fci.lib;msi.lib;rpcrt4.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalDependencies>cabinet.lib;msi.lib;rpcrt4.lib;%(AdditionalDependencies)</AdditionalDependencies>
<BaseAddress>0x1D160000</BaseAddress>
</Link>
</ItemDefinitionGroup>
@@ -206,7 +206,7 @@
<TargetEnvironment>X64</TargetEnvironment>
</Midl>
<Link>
- <AdditionalDependencies>fci.lib;msi.lib;rpcrt4.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalDependencies>cabinet.lib;msi.lib;rpcrt4.lib;%(AdditionalDependencies)</AdditionalDependencies>
<BaseAddress>0x1D160000</BaseAddress>
<TargetMachine>MachineX64</TargetMachine>
</Link>
disable a check in PyThreadState_Swap that is hopefully not a "real" problem
--- python3/Python/pystate.c 2013-04-17 22:45:00.799800000 +0200
+++ python3/Python/pystate.c 2013-04-17 22:46:53.743800000 +0200
@@ -437,7 +437,9 @@
to be used for a thread. Check this the best we can in debug
builds.
*/
-#if defined(Py_DEBUG) && defined(WITH_THREAD)
+#if defined(Py_DEBUG) && defined(WITH_THREAD) && 0
+ /* disable this for LO - it is triggered by nested PyThreadAttach
+ which do not appear to be a real problem */
if (newts) {
/* This can be called from PyEval_RestoreThread(). Similar
to it, we need to ensure errno doesn't change.
This diff is collapsed.
build with GCC on AIX
--- Python-3.3.3/configure 2012-11-28 09:05:45.990529603 +0000
+++ Python-3.3.3/configure 2012-11-28 09:06:23.037963934 +0000
@@ -3426,8 +3426,6 @@
else
case $ac_sys_system in
- AIX*) CC=${CC:-xlc_r}
- without_gcc=;;
*) without_gcc=no;;
esac
fi
@@ -5541,10 +5539,18 @@
PY3LIBRARY=libpython3.so
fi
;;
- Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
+ Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*|AIX*)
LDLIBRARY='libpython$(LDVERSION).so'
- BLDLIBRARY='-L. -lpython$(LDVERSION)'
- RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
+ case $ac_sys_system in
+ AIX*)
+ BLDLIBRARY='-Wl,-brtl -L. -lpython$(LDVERSION)'
+ RUNSHARED=LIBPATH=`pwd`:${LIBPATH}
+ ;;
+ *)
+ BLDLIBRARY='-L. -lpython$(LDVERSION)'
+ RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
+ ;;
+ esac
INSTSONAME="$LDLIBRARY".$SOVERSION
if test "$with_pydebug" != yes
then
@@ -8301,8 +8307,13 @@
then
case $ac_sys_system/$ac_sys_release in
AIX*)
- BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:\$(srcdir)/Modules/python.exp"
- LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
+ if test "$GCC" = "yes"; then
+ LDSHARED='$(CC) -shared'
+ BLDSHARED='$(CC) -Wl,-brtl -shared'
+ else
+ BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:\$(srcdir)/Modules/python.exp"
+ LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
+ fi
;;
IRIX/5*) LDSHARED="ld -shared";;
IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
--- Python-3.3.3/configure.ac 2012-11-28 09:05:45.990529603 +0000
+++ Python-3.3.3/configure.ac 2012-11-28 09:06:23.038963946 +0000
@@ -545,8 +545,6 @@
without_gcc=$withval;;
esac], [
case $ac_sys_system in
- AIX*) CC=${CC:-xlc_r}
- without_gcc=;;
*) without_gcc=no;;
esac])
AC_MSG_RESULT($without_gcc)
@@ -910,10 +908,18 @@
PY3LIBRARY=libpython3.so
fi
;;
- Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
+ Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*|AIX*)
LDLIBRARY='libpython$(LDVERSION).so'
- BLDLIBRARY='-L. -lpython$(LDVERSION)'
- RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
+ case $ac_sys_system in
+ AIX*)
+ BLDLIBRARY='-Wl,-brtl -L. -lpython$(LDVERSION)'
+ RUNSHARED=LIBPATH=`pwd`:${LIBPATH}
+ ;;
+ *)
+ BLDLIBRARY='-L. -lpython$(LDVERSION)'
+ RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
+ ;;
+ esac
case $ac_sys_system in
FreeBSD*)
SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
@@ -1866,8 +1872,13 @@
then
case $ac_sys_system/$ac_sys_release in
AIX*)
- BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:\$(srcdir)/Modules/python.exp"
- LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
+ if test "$GCC" = "yes"; then
+ LDSHARED='$(CC) -shared'
+ BLDSHARED='$(CC) -Wl,-brtl -shared'
+ else
+ BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:\$(srcdir)/Modules/python.exp"
+ LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
+ fi
;;
IRIX/5*) LDSHARED="ld -shared";;
IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
--- Python-3.3.3/Makefile.pre.in 2012-11-28 09:05:45.861528086 +0000
+++ Python-3.3.3/Makefile.pre.in 2012-11-28 09:06:23.046964040 +0000
@@ -493,14 +493,20 @@
libpython$(LDVERSION).so: $(LIBRARY_OBJS)
if test $(INSTSONAME) != $(LDLIBRARY); then \
- $(BLDSHARED) -Wl,-h$(INSTSONAME) -o $(INSTSONAME) $(LIBRARY_OBJS) $(MODLIBS) $(SHLIBS) $(LIBC) $(LIBM) $(LDLAST); \
+ if [ "`echo $(MACHDEP) | sed 's/^\(...\).*/\1/'`" != "aix" ]; then \
+ SONAME="-Wl,-h$(INSTSONAME)"; \
+ fi; \
+ $(BLDSHARED) $(SONAME) -o $(INSTSONAME) $(LIBRARY_OBJS) $(MODLIBS) $(SHLIBS) $(LIBC) $(LIBM) $(LDLAST); \
$(LN) -f $(INSTSONAME) $@; \
else \
$(BLDSHARED) -o $@ $(LIBRARY_OBJS) $(MODLIBS) $(SHLIBS) $(LIBC) $(LIBM) $(LDLAST); \
fi
libpython3.so: libpython$(LDVERSION).so
- $(BLDSHARED) $(NO_AS_NEEDED) -o $@ -Wl,-h$@ $^
+ if [ "`echo $(MACHDEP) | sed 's/^\(...\).*/\1/'`" != "aix" ]; then \
+ SONAME="-Wl,-h$@"; \
+ fi; \
+ $(BLDSHARED) $(NO_AS_NEEDED) -o $@ $(SONAME) $^
libpython$(LDVERSION).dylib: $(LIBRARY_OBJS)
$(CC) -dynamiclib -Wl,-single_module $(PY_LDFLAGS) -undefined dynamic_lookup -Wl,-install_name,$(prefix)/lib/libpython$(LDVERSION).dylib -Wl,-compatibility_version,$(VERSION) -Wl,-current_version,$(VERSION) -o $@ $(LIBRARY_OBJS) $(SHLIBS) $(LIBC) $(LIBM) $(LDLAST); \
@@ -1106,6 +1112,8 @@
export PATH; PATH="`pwd`:$$PATH"; \
export PYTHONPATH; PYTHONPATH="`pwd`/Lib"; \
export DYLD_FRAMEWORK_PATH; DYLD_FRAMEWORK_PATH="`pwd`"; \
+ export LD_LIBRARY_PATH; LD_LIBRARY_PATH="`pwd`${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}"; \
+ export LIBPATH; LIBPATH="`pwd`${LIBPATH:+:$LIBPATH}"; \
export EXE; EXE="$(BUILDEXE)"; \
if [ -n "$(MULTIARCH)" ]; then export MULTIARCH; MULTIARCH=$(MULTIARCH); fi; \
export PYTHON_FOR_BUILD; \
--- Python-3.3.3/Modules/Setup.dist 2012-11-28 09:05:45.935528957 +0000
+++ Python-3.3.3/Modules/Setup.dist 2012-11-28 09:06:23.052964111 +0000
@@ -177,7 +177,7 @@
#_bisect _bisectmodule.c # Bisection algorithms
#_heapq _heapqmodule.c # Heap queue algorithm
-#unicodedata unicodedata.c # static Unicode character database
+unicodedata unicodedata.c # static Unicode character database
# Modules with some UNIX dependencies -- on by default:
--- Objects/obmalloc.c
+++ Objects/obmalloc.c
@@ -9,8 +9,8 @@
#endif
#endif
+#define WITH_VALGRIND
#ifdef WITH_VALGRIND
-#include <valgrind/valgrind.h>
/* If we're using GCC, use __builtin_expect() to reduce overhead of
the valgrind checks */
@@ -771,7 +771,7 @@
#ifdef WITH_VALGRIND
if (UNLIKELY(running_on_valgrind == -1))
- running_on_valgrind = RUNNING_ON_VALGRIND;
+ running_on_valgrind = 1;
if (UNLIKELY(running_on_valgrind))
goto redirect;
#endif
set RPATH (only to be used on ELF platforms)
--- python3/Makefile.pre.in 2013-04-19 15:08:43.637715422 +0200
+++ python3/Makefile.pre.in 2013-04-19 15:07:32.685711138 +0200
@@ -464,7 +464,7 @@
# Build the interpreter
$(BUILDPYTHON): Modules/python.o $(LIBRARY) $(LDLIBRARY) $(PY3LIBRARY)
- $(LINKCC) $(PY_LDFLAGS) $(LINKFORSHARED) -o $@ Modules/python.o $(BLDLIBRARY) $(LIBS) $(MODLIBS) $(SYSLIBS) $(LDLAST)
+ $(LINKCC) $(PY_LDFLAGS) $(LINKFORSHARED) -o $@ Modules/python.o $(BLDLIBRARY) $(LIBS) $(MODLIBS) $(SYSLIBS) $(LDLAST) -Wl,-rpath,\$$ORIGIN
platform: $(BUILDPYTHON) pybuilddir.txt
$(RUNSHARED) $(PYTHON_FOR_BUILD) -c 'import sys ; from sysconfig import get_platform ; print(get_platform()+"-"+sys.version[0:3])' >platform
without explicit subsystem set, the linker tries to open a file
with the name of the comptibility version
(fatal error LNK1181: cannot open input file ",5.01")
diff -ur python3.org/PCbuild/_ctypes.vcxproj python3/PCbuild/_ctypes.vcxproj
--- python3.org/PCbuild/_ctypes.vcxproj 2014-05-19 19:06:01.274114800 +0200
+++ python3/PCbuild/_ctypes.vcxproj 2014-05-19 19:07:13.649079800 +0200
@@ -174,7 +174,7 @@
</ClCompile>
<Link>
<AdditionalOptions>/EXPORT:DllGetClassObject,PRIVATE /EXPORT:DllCanUnloadNow,PRIVATE %(AdditionalOptions)</AdditionalOptions>
- <SubSystem>NotSet</SubSystem>
+ <SubSystem>Console</SubSystem>
<BaseAddress>0x1D1A0000</BaseAddress>
</Link>
</ItemDefinitionGroup>
@@ -187,7 +187,7 @@
</ClCompile>
<Link>
<AdditionalOptions>/EXPORT:DllGetClassObject,PRIVATE /EXPORT:DllCanUnloadNow,PRIVATE %(AdditionalOptions)</AdditionalOptions>
- <SubSystem>NotSet</SubSystem>
+ <SubSystem>Console</SubSystem>
<BaseAddress>0x1D1A0000</BaseAddress>
</Link>
</ItemDefinitionGroup>
@@ -197,7 +197,7 @@
</ClCompile>
<Link>
<AdditionalOptions>/EXPORT:DllGetClassObject,PRIVATE /EXPORT:DllCanUnloadNow,PRIVATE %(AdditionalOptions)</AdditionalOptions>
- <SubSystem>NotSet</SubSystem>
+ <SubSystem>Console</SubSystem>
<BaseAddress>0x1D1A0000</BaseAddress>
</Link>
</ItemDefinitionGroup>
@@ -210,7 +210,7 @@
</ClCompile>
<Link>
<AdditionalOptions>/EXPORT:DllGetClassObject,PRIVATE /EXPORT:DllCanUnloadNow,PRIVATE %(AdditionalOptions)</AdditionalOptions>
- <SubSystem>NotSet</SubSystem>
+ <SubSystem>Console</SubSystem>
<BaseAddress>0x1D1A0000</BaseAddress>
<TargetMachine>MachineX64</TargetMachine>
</Link>
@@ -221,7 +221,7 @@
</ClCompile>
<Link>
<AdditionalOptions>/EXPORT:DllGetClassObject,PRIVATE /EXPORT:DllCanUnloadNow,PRIVATE %(AdditionalOptions)</AdditionalOptions>
- <SubSystem>NotSet</SubSystem>
+ <SubSystem>Console</SubSystem>
<BaseAddress>0x1D1A0000</BaseAddress>
</Link>
</ItemDefinitionGroup>
@@ -234,7 +234,7 @@
</ClCompile>
<Link>
<AdditionalOptions>/EXPORT:DllGetClassObject,PRIVATE /EXPORT:DllCanUnloadNow,PRIVATE %(AdditionalOptions)</AdditionalOptions>
- <SubSystem>NotSet</SubSystem>
+ <SubSystem>Console</SubSystem>
<BaseAddress>0x1D1A0000</BaseAddress>
<TargetMachine>MachineX64</TargetMachine>
</Link>
diff -ur python3.org/PCbuild/_decimal.vcxproj python3/PCbuild/_decimal.vcxproj
--- python3.org/PCbuild/_decimal.vcxproj 2014-05-19 19:06:01.274114800 +0200
+++ python3/PCbuild/_decimal.vcxproj 2014-05-19 19:07:13.649079800 +0200
@@ -176,7 +176,7 @@
<AdditionalIncludeDirectories>..\Modules\_decimal;..\Modules\_decimal\libmpdec;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
<Link>
- <SubSystem>NotSet</SubSystem>
+ <SubSystem>Console</SubSystem>
<BaseAddress>0x1D1A0000</BaseAddress>
</Link>
</ItemDefinitionGroup>
@@ -189,7 +189,7 @@
<AdditionalIncludeDirectories>..\Modules\_decimal;..\Modules\_decimal\libmpdec;..\Include;..\PC;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
<Link>
- <SubSystem>NotSet</SubSystem>
+ <SubSystem>Console</SubSystem>
<BaseAddress>0x1D1A0000</BaseAddress>
</Link>
</ItemDefinitionGroup>
@@ -199,7 +199,7 @@
<AdditionalIncludeDirectories>..\Modules\_decimal;..\Modules\_decimal\libmpdec;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
<Link>
- <SubSystem>NotSet</SubSystem>
+ <SubSystem>Console</SubSystem>
<BaseAddress>0x1D1A0000</BaseAddress>
</Link>
</ItemDefinitionGroup>
@@ -212,7 +212,7 @@
<AdditionalIncludeDirectories>..\Modules\_decimal;..\Modules\_decimal\libmpdec;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
<Link>
- <SubSystem>NotSet</SubSystem>
+ <SubSystem>Console</SubSystem>
<BaseAddress>0x1D1A0000</BaseAddress>
<TargetMachine>MachineX64</TargetMachine>
</Link>
@@ -223,7 +223,7 @@
<AdditionalIncludeDirectories>..\Modules\_decimal;..\Modules\_decimal\libmpdec;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
<Link>
- <SubSystem>NotSet</SubSystem>
+ <SubSystem>Console</SubSystem>
<BaseAddress>0x1D1A0000</BaseAddress>
</Link>
</ItemDefinitionGroup>
@@ -236,7 +236,7 @@
<AdditionalIncludeDirectories>..\Modules\_decimal;..\Modules\_decimal\libmpdec;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
<Link>
- <SubSystem>NotSet</SubSystem>
+ <SubSystem>Console</SubSystem>
<BaseAddress>0x1D1A0000</BaseAddress>
<TargetMachine>MachineX64</TargetMachine>
</Link>
http://bugs.python.org/issue17797
http://connect.microsoft.com/VisualStudio/feedback/details/785119/
Visual Studio 2012 changed return value for fileno function that breaks
when python tries to check/setup stdin/out/err
GetStdHandle on Windows XP behaves contrary to the documentation...
diff --git a/Python/pythonrun.c b/Python/pythonrun.c
index 91d56b7..d28ffc7 100644
--- a/Python/pythonrun.c
+++ b/Python/pythonrun.c
@@ -1015,13 +1015,28 @@ error:
static int
is_valid_fd(int fd)
{
- int dummy_fd;
if (fd < 0 || !_PyVerify_fd(fd))
return 0;
- dummy_fd = dup(fd);
- if (dummy_fd < 0)
- return 0;
- close(dummy_fd);
+
+#if defined(MS_WINDOWS) && defined(HAVE_FSTAT)
+ /* dup (DuplicateHandle) doesn't say fd is a valid *file* handle.
+ * It could be a current thread pseudo-handle.
+ */
+ {
+ struct stat buf;
+ if (fstat(fd, &buf) < 0 && (errno == EBADF || errno == ENOENT))
+ return 0;
+ }
+#else
+ {
+ int dummy_fd;
+ dummy_fd = dup(fd);
+ if (dummy_fd < 0)
+ return 0;
+ close(dummy_fd);
+ }
+#endif
+
return 1;
}
diff -ur python3.org/Mac/PythonLauncher/Makefile.in python3/Mac/PythonLauncher/Makefile.in
--- python3.org/Mac/PythonLauncher/Makefile.in 2015-06-06 08:47:38.000000000 +0300
+++ python3/Mac/PythonLauncher/Makefile.in 2015-06-06 08:48:18.000000000 +0300
@@ -53,7 +53,7 @@
--resource=$(srcdir)/factorySettings.plist \
--plist Info.plist \
build
- find "Python Launcher.app" -name '.svn' -print0 | xargs -0 rm -r
+ find "Python Launcher.app" -name '.svn' -print0 | xargs -0 rm -rf
FileSettings.o: $(srcdir)/FileSettings.m
HACK: Fix build breakage on MacOS:
*** WARNING: renaming "pyexpat" since importing it failed: dlopen(build/lib.macosx-10.6-i386-3.3/pyexpat.so, 2): Symbol not found: _XML_ErrorString
This reverts c242a8f30806 from the python hg repo:
restore namespacing of pyexpat symbols (closes #19186)
See http://bugs.python.org/issue19186#msg214069
The recommendation to include Modules/inc at first broke the Linux build...
So do it this way, as it was before. Needs some realignment later.
--- python3/Modules/expat/expat_external.h
+++ python3/Modules/expat/expat_external.h
@@ -7,10 +7,6 @@
/* External API definitions */
-/* Namespace external symbols to allow multiple libexpat version to
- co-exist. */
-#include "pyexpatns.h"
-
#if defined(_MSC_EXTENSIONS) && !defined(__BEOS__) && !defined(__CYGWIN__)
#define XML_USE_MSC_EXTENSIONS 1
#endif
-*- Mode:Diff -*-
--- python3/PC/pyconfig.h
+++ python3/PC/pyconfig.h
@@ -602,6 +602,10 @@
/* Define if you have readlink. */
/* #undef HAVE_READLINK */
+#if defined(_MSC_VER) && _MSC_VER >= 1800
+#define HAVE_ROUND
+#endif
+
/* Define if you have select. */
/* #undef HAVE_SELECT */
--- configure
+++ configure
@@ -11821,6 +11821,7 @@
break;
}
}
+ freeaddrinfo(aitop);
}
if (!(inet4 == 0 || inet4 == 2))
@@ -11828,8 +11829,6 @@
if (!(inet6 == 0 || inet6 == 2))
goto bad;
- if (aitop)
- freeaddrinfo(aitop);
return 0;
bad:
fdo#82430 disable SSE2 default of MSVC2012
--- python3/PCbuild/release.props.old 2014-10-01 23:47:33.348095403 +0200
+++ python3/PCbuild/release.props 2014-10-01 23:48:05.051092945 +0200
@@ -9,6 +9,7 @@
<ItemDefinitionGroup>
<ClCompile>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <EnableEnhancedInstructionSet>StreamingSIMDExtensions</EnableEnhancedInstructionSet>
</ClCompile>
</ItemDefinitionGroup>
<ItemGroup>
--- python3/PCbuild/make_buildinfo.c.orig 2014-11-03 00:48:58.841000000 +0100
+++ python3/PCbuild/make_buildinfo.c 2014-11-03 00:49:16.266200000 +0100
@@ -109,7 +109,7 @@
int main(int argc, char*argv[])
{
- char command[CMD_SIZE] = "cl.exe -c -D_WIN32 -DUSE_DL_EXPORT -D_WINDOWS -DWIN32 -D_WINDLL ";
+ char command[CMD_SIZE] = "cl.exe -arch:SSE -c -D_WIN32 -DUSE_DL_EXPORT -D_WINDOWS -DWIN32 -D_WINDLL ";
char tmppath[CMD_SIZE] = "";
int do_unlink, result;
char *tmpdir = NULL;
This diff is collapsed.
--- Modules/_ctypes/libffi/src/x86/ffi64.c
+++ Modules/_ctypes/libffi/src/x86/ffi64.c
@@ -545,11 +545,15 @@
tramp = (volatile unsigned short *) &closure->tramp[0];
tramp[0] = 0xbb49; /* mov <code>, %r11 */
- *((unsigned long long * volatile) &tramp[1])
- = (unsigned long) ffi_closure_unix64;
+ tramp[1] = (unsigned long) ffi_closure_unix64;
+ tramp[2] = ((unsigned long) ffi_closure_unix64) >> 16;
+ tramp[3] = ((unsigned long) ffi_closure_unix64) >> 32;
+ tramp[4] = ((unsigned long) ffi_closure_unix64) >> 48;
tramp[5] = 0xba49; /* mov <data>, %r10 */
- *((unsigned long long * volatile) &tramp[6])
- = (unsigned long) codeloc;
+ tramp[6] = (unsigned long) codeloc;
+ tramp[7] = ((unsigned long) codeloc) >> 16;
+ tramp[8] = ((unsigned long) codeloc) >> 32;
+ tramp[9] = ((unsigned long) codeloc) >> 48;
/* Set the carry bit iff the function uses any sse registers.
This is clc or stc, together with the first byte of the jmp. */
--- Objects/bytearrayobject.c
+++ Objects/bytearrayobject.c
@@ -294,7 +294,7 @@
PyBuffer_Release(&vo);
return NULL;
}
- memcpy(self->ob_bytes + mysize, vo.buf, vo.len);
+ if (vo.len != 0) memcpy(self->ob_bytes + mysize, vo.buf, vo.len);
PyBuffer_Release(&vo);
Py_INCREF(self);
return (PyObject *)self;
--- Objects/listobject.c
+++ Objects/listobject.c
@@ -641,7 +641,7 @@
goto Error;
}
}
- memcpy(recycle, &item[ilow], s);
+ if (s != 0) memcpy(recycle, &item[ilow], s);
if (d < 0) { /* Delete -d items */
memmove(&item[ihigh+d], &item[ihigh],
@@ -2036,7 +2036,7 @@
if (keys != NULL) {
for (i = 0; i < saved_ob_size; i++)
Py_DECREF(keys[i]);
- if (keys != &ms.temparray[saved_ob_size+1])
+ if (keys != ((char *) ms.temparray) + (saved_ob_size+1) * sizeof (PyObject *))
PyMem_FREE(keys);
}
--- Objects/longobject.c
+++ Objects/longobject.c
@@ -36,7 +36,7 @@
static PyObject *
get_small_int(sdigit ival)
{
- PyObject *v = (PyObject*)(small_ints + ival + NSMALLNEGINTS);
+ PyObject *v = (PyObject*)(small_ints + (ival + NSMALLNEGINTS));
Py_INCREF(v);
#ifdef COUNT_ALLOCS
if (ival >= 0)
--- Modules/_ctypes/_ctypes.c
+++ Modules/_ctypes/_ctypes.c
@@ -1328,8 +1328,10 @@
if (stgdict->shape == NULL)
goto error;
stgdict->shape[0] = length;
- memmove(&stgdict->shape[1], itemdict->shape,
- sizeof(Py_ssize_t) * (stgdict->ndim - 1));
+ if (itemdict->shape) {
+ memmove(&stgdict->shape[1], itemdict->shape,
+ sizeof(Py_ssize_t) * (stgdict->ndim - 1));
+ }
itemsize = itemdict->size;
if (length * itemsize < 0) {
...@@ -1610,6 +1610,10 @@ static PyNumberMethods PyUNONumberMethods[] = ...@@ -1610,6 +1610,10 @@ static PyNumberMethods PyUNONumberMethods[] =
nullptr, /* nb_inplace_true_divide */ nullptr, /* nb_inplace_true_divide */
nullptr, /* nb_index */ nullptr, /* nb_index */
#if PY_MAJOR_VERSION == 3 && PY_MINOR_VERSION >= 5
nullptr, /* nb_matrix_multiply */
nullptr, /* nb_inplace_matrix_multiply */
#endif
}; };
static PySequenceMethods PyUNOSequenceMethods[] = static PySequenceMethods PyUNOSequenceMethods[] =
......
Markdown is supported
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