From ac674191e88a3faab97ce56dd43cb6e8cb4bdd19 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Arkadiusz=20Mi=C5=9Bkiewicz?= Date: Sun, 13 Sep 2015 21:28:35 +0200 Subject: [PATCH] - up to 3.5.0 --- python3-ac_fixes.patch | 16 ++++++++++------ python3-lib64.patch | 26 ++++++++++++-------------- python3-no_cmdline_tests.patch | 6 +++--- python3-noarch_to_datadir.patch | 28 ++++++++++++++-------------- python3.spec | 28 ++++++++++++++++++++-------- 5 files changed, 59 insertions(+), 45 deletions(-) diff --git a/python3-ac_fixes.patch b/python3-ac_fixes.patch index a7f5530..e7611ed 100644 --- a/python3-ac_fixes.patch +++ b/python3-ac_fixes.patch @@ -1,11 +1,15 @@ ---- Python-3.2b1/configure.ac.orig 2010-12-12 16:18:42.000000000 +0000 -+++ Python-3.2b1/configure.ac 2010-12-12 16:20:34.000000000 +0000 -@@ -879,13 +879,13 @@ - if test "$Py_DEBUG" = 'true' ; then +--- Python-3.5.0/configure.ac~ 2015-09-13 13:41:26.000000000 +0200 ++++ Python-3.5.0/configure.ac 2015-09-13 20:06:11.597280920 +0200 +@@ -1258,16 +1258,16 @@ then # Optimization messes up debuggers, so turn it off for # debug builds. -- OPT="-g -O0 -Wall $STRICT_PROTO" -+ OPT="-g $CPPFLAGS $CFLAGS -Wall $STRICT_PROTO" + if "$CC" -v --help 2>/dev/null |grep -- -Og > /dev/null; then +- OPT="-g -Og -Wall $STRICT_PROTO" ++ OPT="-g $CPPFLAGS $CFLAGS -Wall $STRICT_PROTO" + else +- OPT="-g -O0 -Wall $STRICT_PROTO" ++ OPT="-g $CPPFLAGS $CFLAGS -Wall $STRICT_PROTO" + fi else - OPT="-g $WRAP -O3 -Wall $STRICT_PROTO" + OPT="-g $WRAP $CPPFLAGS $CFLAGS -Wall $STRICT_PROTO" diff --git a/python3-lib64.patch b/python3-lib64.patch index a6c13e6..50bca29 100644 --- a/python3-lib64.patch +++ b/python3-lib64.patch @@ -1,6 +1,6 @@ --- Python-3.3.1/configure.ac.orig 2013-04-18 16:31:07.244030129 +0200 +++ Python-3.3.1/configure.ac 2013-04-18 17:30:31.800622500 +0200 -@@ -769,6 +768,45 @@ +@@ -769,6 +769,45 @@ MULTIARCH=$($CC --print-multiarch 2>/dev/null) AC_SUBST(MULTIARCH) @@ -46,9 +46,9 @@ AC_SUBST(LIBRARY) AC_MSG_CHECKING(LIBRARY) ---- Python-3.2.1.orig/Include/pythonrun.h 2011-07-09 07:58:46.000000000 +0100 -+++ Python-3.2.1/Include/pythonrun.h 2011-07-12 22:20:12.000000000 +0100 -@@ -175,6 +175,8 @@ +--- Python-3.5.0/Include/pylifecycle.h~ 2015-09-13 13:41:20.000000000 +0200 ++++ Python-3.5.0/Include/pylifecycle.h 2015-09-13 20:08:24.017308537 +0200 +@@ -65,6 +65,8 @@ int _Py_CheckPython3(); /* In their own files */ PyAPI_FUNC(const char *) Py_GetVersion(void); PyAPI_FUNC(const char *) Py_GetPlatform(void); @@ -116,7 +116,7 @@ os.path.join(destination, "include", "python", "foopkg")) --- Python-3.2.1.orig/Lib/site.py 2011-07-09 07:58:49.000000000 +0100 +++ Python-3.2.1/Lib/site.py 2011-07-12 22:20:12.000000000 +0100 -@@ -304,13 +304,16 @@ def getsitepackages(prefixes=None): +@@ -304,12 +304,15 @@ def getsitepackages(prefixes=None): seen.add(prefix) if os.sep == '/': @@ -124,11 +124,9 @@ + sitepackages.append(os.path.join(prefix, sys.lib, "python" + sys.version[:3], "site-packages")) -- sitepackages.append(os.path.join(prefix, "lib", "site-python")) + sitepackages.append(os.path.join(prefix, sys.lib, "site-python")) + if sys.lib != 'lib': + sitepackages.append(os.path.join(prefix, "lib", "python" + sys.version[:3], "site-packages")) -+ sitepackages.append(os.path.join(prefix, "lib", "site-python")) else: sitepackages.append(prefix) - sitepackages.append(os.path.join(prefix, "lib", "site-packages")) @@ -221,12 +219,12 @@ #endif #ifndef LANDMARK -@@ -502,7 +502,7 @@ calculate_path(void) - _pythonpath = _Py_char2wchar(PYTHONPATH, NULL); - _prefix = _Py_char2wchar(PREFIX, NULL); - _exec_prefix = _Py_char2wchar(EXEC_PREFIX, NULL); -- lib_python = _Py_char2wchar("lib/python" VERSION, NULL); -+ lib_python = _Py_char2wchar(LIB_PYTHON VERSION, NULL); +@@ -502,7 +514,7 @@ calculate_path(void) + _pythonpath = Py_DecodeLocale(PYTHONPATH, NULL); + _prefix = Py_DecodeLocale(PREFIX, NULL); + _exec_prefix = Py_DecodeLocale(EXEC_PREFIX, NULL); +- lib_python = Py_DecodeLocale("lib/python" VERSION, NULL); ++ lib_python = Py_DecodeLocale(LIB_PYTHON VERSION, NULL); if (!_pythonpath || !_prefix || !_exec_prefix || !lib_python) { Py_FatalError( @@ -281,7 +279,7 @@ ] inc_dirs = self.compiler.include_dirs + ['/usr/include'] exts = [] -@@ -643,11 +643,11 @@ +@@ -643,11 +642,11 @@ elif curses_library: readline_libs.append(curses_library) elif self.compiler.find_library_file(lib_dirs + diff --git a/python3-no_cmdline_tests.patch b/python3-no_cmdline_tests.patch index ad01727..7a39622 100644 --- a/python3-no_cmdline_tests.patch +++ b/python3-no_cmdline_tests.patch @@ -22,9 +22,9 @@ diff -Nur Python-3.3.1.orig/Lib/test/test_compileall.py Python-3.3.1/Lib/test/te class CommandLineTests(unittest.TestCase): """Test compileall's CLI.""" -diff -Nur Python-3.3.1.orig/Lib/test/test_warnings.py Python-3.3.1/Lib/test/test_warnings.py ---- Python-3.3.1.orig/Lib/test/test_warnings.py 2013-04-06 08:41:46.000000000 +0100 -+++ Python-3.3.1/Lib/test/test_warnings.py 2013-04-07 19:41:25.529164545 +0100 +diff -Nur Python-3.3.1.orig/Lib/test/test_warnings/__init__.py Python-3.3.1/Lib/test/test_warnings/__init__.py +--- Python-3.3.1.orig/Lib/test/test_warnings/__init__.py 2013-04-06 08:41:46.000000000 +0100 ++++ Python-3.3.1/Lib/test/test_warnings/__init__.py 2013-04-07 19:41:25.529164545 +0100 @@ -717,6 +717,7 @@ module = py_warnings diff --git a/python3-noarch_to_datadir.patch b/python3-noarch_to_datadir.patch index 38a2424..63a1f00 100644 --- a/python3-noarch_to_datadir.patch +++ b/python3-noarch_to_datadir.patch @@ -54,15 +54,13 @@ diff -dur Python-3.2.1.orig/Lib/distutils/tests/test_install.py Python-3.2.1/Lib diff -dur Python-3.2.1.orig/Lib/site.py Python-3.2.1/Lib/site.py --- Python-3.2.1.orig/Lib/site.py 2011-07-15 20:16:35.529557475 +0200 +++ Python-3.2.1/Lib/site.py 2011-07-15 20:17:09.134405059 +0200 -@@ -289,9 +289,8 @@ +@@ -289,8 +289,7 @@ "python" + sys.version[:3], "site-packages")) sitepackages.append(os.path.join(prefix, sys.lib, "site-python")) - if sys.lib != 'lib': - sitepackages.append(os.path.join(prefix, "lib", "python" + sys.version[:3], "site-packages")) -- sitepackages.append(os.path.join(prefix, "lib", "site-python")) + sitepackages.append(os.path.join(prefix, "share", "python" + sys.version[:3], "site-packages")) -+ sitepackages.append(os.path.join(prefix, "share", "site-python")) else: sitepackages.append(prefix) sitepackages.append(os.path.join(prefix, sys.lib, "site-packages")) @@ -78,6 +76,17 @@ diff -dur Python-3.2.1.orig/Lib/sysconfig.py Python-3.2.1/Lib/sysconfig.py 'platlib': '{platbase}/' + sys.lib + '/python{py_version_short}/site-packages', 'include': '{base}/include/python{py_version_short}{abiflags}', +--- Python-3.5.0/configure.ac~ 2015-09-13 20:18:04.000000000 +0200 ++++ Python-3.5.0/configure.ac 2015-09-13 20:21:35.887422670 +0200 +@@ -4370,7 +4370,7 @@ AC_MSG_RESULT($LDVERSION) + + dnl define LIBPL after ABIFLAGS and LDVERSION is defined. + AC_SUBST(PY_ENABLE_SHARED) +-LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}" ++LIBPL='$(LIBDIR)/python'"${VERSION}/config-${LDVERSION}" + AC_SUBST(LIBPL) + + # Check whether right shifting a negative integer extends the sign bit diff -dur Python-3.2.1.orig/Makefile.pre.in Python-3.2.1/Makefile.pre.in --- Python-3.2.1.orig/Makefile.pre.in 2011-07-15 20:16:35.532890958 +0200 +++ Python-3.2.1/Makefile.pre.in 2011-07-15 20:17:09.134405059 +0200 @@ -90,15 +99,6 @@ diff -dur Python-3.2.1.orig/Makefile.pre.in Python-3.2.1/Makefile.pre.in ABIFLAGS= @ABIFLAGS@ # Detailed destination directories -@@ -1046,7 +1046,7 @@ - - # Install the library and miscellaneous stuff needed for extending/embedding - # This goes into $(exec_prefix) --LIBPL= $(LIBDEST)/config-$(LDVERSION) -+LIBPL= $(BINLIBDEST)/config-$(LDVERSION) - - # pkgconfig directory - LIBPC= $(LIBDIR)/pkgconfig @@ -1065,8 +1065,8 @@ if test "$(SO)" = .dll; then \ $(INSTALL_DATA) $(LDLIBRARY) $(DESTDIR)$(LIBPL) ; \ @@ -123,7 +123,7 @@ diff -dur Python-3.2.1.orig/Modules/getpath.c Python-3.2.1/Modules/getpath.c #endif #ifndef LANDMARK -@@ -673,13 +673,13 @@ calculate_path(void) +@@ -673,13 +674,13 @@ calculate_path(void) } } @@ -139,7 +139,7 @@ diff -dur Python-3.2.1.orig/Modules/getpath.c Python-3.2.1/Modules/getpath.c } else reduce(prefix); -@@ -691,7 +693,7 @@ +@@ -691,7 +692,7 @@ } else wcsncpy(zip_path, _prefix, MAXPATHLEN); diff --git a/python3.spec b/python3.spec index c4942da..f56dc7f 100644 --- a/python3.spec +++ b/python3.spec @@ -20,7 +20,7 @@ # test_gdb: fails, as the gdb uses old python version %define broken_tests test_httpservers test_distutils test_cmd_line test_pydoc test_telnetlib test_zlib test_gdb test_site -%define py_ver 3.4 +%define py_ver 3.5 %define py_abi %{py_ver}m %define py_prefix %{_prefix} %define py_libdir %{py_prefix}/%{_lib}/python%{py_ver} @@ -37,13 +37,13 @@ Summary(ru.UTF-8): Язык программирования очень высо Summary(tr.UTF-8): X arayüzlü, yüksek düzeyli, kabuk yorumlayıcı dili Summary(uk.UTF-8): Мова програмування дуже високого рівня з X-інтерфейсом Name: python3 -Version: %{py_ver}.3 -Release: 2 +Version: %{py_ver}.0 +Release: 1 Epoch: 1 License: PSF Group: Applications Source0: http://www.python.org/ftp/python/%{version}/Python-%{version}.tar.xz -# Source0-md5: 7d092d1bba6e17f0d9bd21b49e441dd5 +# Source0-md5: d149d2812f10cbe04c042232e7964171 Patch0: %{name}-pythonpath.patch Patch1: %{name}-ac_fixes.patch Patch2: %{name}-lib64.patch @@ -740,14 +740,16 @@ rm -rf $RPM_BUILD_ROOT %defattr(644,root,root,755) /etc/shrc.d/python*-modules* %attr(755,root,root) %{_bindir}/pyvenv -%attr(755,root,root) %{_bindir}/pyvenv-3.4 +%attr(755,root,root) %{_bindir}/pyvenv-3.5 %{py_scriptdir}/__future__.py %{py_scriptdir}/__phello__.foo.py %{py_scriptdir}/_bootlocale.py %{py_scriptdir}/_compat_pickle.py +%{py_scriptdir}/_compression.py %{py_scriptdir}/_dummy_thread.py %{py_scriptdir}/_markupbase.py %{py_scriptdir}/_osx_support.py +%{py_scriptdir}/_pydecimal.py %{py_scriptdir}/_pyio.py %{py_scriptdir}/_strptime.py %{py_scriptdir}/_threading_local.py @@ -833,6 +835,7 @@ rm -rf $RPM_BUILD_ROOT %{py_scriptdir}/random.py %{py_scriptdir}/rlcompleter.py %{py_scriptdir}/runpy.py +%{py_scriptdir}/signal.py %{py_scriptdir}/sched.py %{py_scriptdir}/selectors.py %{py_scriptdir}/shelve.py @@ -863,20 +866,24 @@ rm -rf $RPM_BUILD_ROOT %{py_scriptdir}/tracemalloc.py %{py_scriptdir}/tty.py %{py_scriptdir}/turtle.py +%{py_scriptdir}/typing.py %{py_scriptdir}/uu.py %{py_scriptdir}/uuid.py %{py_scriptdir}/warnings.py %{py_scriptdir}/wave.py %{py_scriptdir}/webbrowser.py %{py_scriptdir}/xdrlib.py +%{py_scriptdir}/zipapp.py %{py_scriptdir}/zipfile.py %{py_scriptdir}/__pycache__/__future__.cpython-*.py[co] %{py_scriptdir}/__pycache__/__phello__.foo.cpython-*.py[co] %{py_scriptdir}/__pycache__/_bootlocale.cpython-*.py[co] %{py_scriptdir}/__pycache__/_compat_pickle.cpython-*.py[co] +%{py_scriptdir}/__pycache__/_compression.cpython-*.py[co] %{py_scriptdir}/__pycache__/_dummy_thread.cpython-*.py[co] %{py_scriptdir}/__pycache__/_markupbase.cpython-*.py[co] %{py_scriptdir}/__pycache__/_osx_support.cpython-*.py[co] +%{py_scriptdir}/__pycache__/_pydecimal.cpython-*.py[co] %{py_scriptdir}/__pycache__/_pyio.cpython-*.py[co] %{py_scriptdir}/__pycache__/_strptime.cpython-*.py[co] %{py_scriptdir}/__pycache__/_threading_local.cpython-*.py[co] @@ -967,6 +974,7 @@ rm -rf $RPM_BUILD_ROOT %{py_scriptdir}/__pycache__/shelve.cpython-*.py[co] %{py_scriptdir}/__pycache__/shlex.cpython-*.py[co] %{py_scriptdir}/__pycache__/shutil.cpython-*.py[co] +%{py_scriptdir}/__pycache__/signal.cpython-*.py[co] %{py_scriptdir}/__pycache__/smtpd.cpython-*.py[co] %{py_scriptdir}/__pycache__/smtplib.cpython-*.py[co] %{py_scriptdir}/__pycache__/sndhdr.cpython-*.py[co] @@ -992,12 +1000,14 @@ rm -rf $RPM_BUILD_ROOT %{py_scriptdir}/__pycache__/tracemalloc.cpython-*.py[co] %{py_scriptdir}/__pycache__/tty.cpython-*.py[co] %{py_scriptdir}/__pycache__/turtle.cpython-*.py[co] +%{py_scriptdir}/__pycache__/typing.cpython-*.py[co] %{py_scriptdir}/__pycache__/uu.cpython-*.py[co] %{py_scriptdir}/__pycache__/uuid.cpython-*.py[co] %{py_scriptdir}/__pycache__/warnings.cpython-*.py[co] %{py_scriptdir}/__pycache__/wave.cpython-*.py[co] %{py_scriptdir}/__pycache__/webbrowser.cpython-*.py[co] %{py_scriptdir}/__pycache__/xdrlib.cpython-*.py[co] +%{py_scriptdir}/__pycache__/zipapp.cpython-*.py[co] %{py_scriptdir}/__pycache__/zipfile.cpython-*.py[co] # @@ -1042,6 +1052,7 @@ rm -rf $RPM_BUILD_ROOT %attr(755,root,root) %{py_dyndir}/_testbuffer.cpython-*.so %attr(755,root,root) %{py_dyndir}/_testcapi.cpython-*.so %attr(755,root,root) %{py_dyndir}/_testimportmultiple.cpython-*.so +%attr(755,root,root) %{py_dyndir}/_testmultiphase.cpython-*.so # for openssl < 0.9.8 package sha256 and sha512 modules %if "%{pld_release}" != "ac" @@ -1066,7 +1077,6 @@ rm -rf $RPM_BUILD_ROOT %attr(755,root,root) %{py_dyndir}/select.cpython-*.so %attr(755,root,root) %{py_dyndir}/syslog.cpython-*.so %attr(755,root,root) %{py_dyndir}/termios.cpython-*.so -%attr(755,root,root) %{py_dyndir}/time.cpython-*.so %attr(755,root,root) %{py_dyndir}/spwd.cpython-*.so %attr(755,root,root) %{py_dyndir}/unicodedata.cpython-*.so %attr(755,root,root) %{py_dyndir}/zlib.cpython-*.so @@ -1165,6 +1175,8 @@ rm -rf $RPM_BUILD_ROOT %dir %{py_scriptdir}/venv/scripts %dir %{py_scriptdir}/venv/scripts/posix %{py_scriptdir}/venv/scripts/posix/activate +%{py_scriptdir}/venv/scripts/posix/activate.csh +%{py_scriptdir}/venv/scripts/posix/activate.fish %dir %{py_scriptdir}/wsgiref %{py_scriptdir}/wsgiref/__pycache__ @@ -1198,7 +1210,7 @@ rm -rf $RPM_BUILD_ROOT %files -n pydoc3 %defattr(644,root,root,755) %attr(755,root,root) %{_bindir}/pydoc3 -%attr(755,root,root) %{_bindir}/pydoc3.4 +%attr(755,root,root) %{_bindir}/pydoc3.5 %{py_scriptdir}/pydoc.py %{py_scriptdir}/__pycache__/pydoc.cpython-*.py[co] %dir %{py_scriptdir}/pydoc_data @@ -1209,7 +1221,7 @@ rm -rf $RPM_BUILD_ROOT %files -n idle3 %defattr(644,root,root,755) %attr(755,root,root) %{_bindir}/idle3 -%attr(755,root,root) %{_bindir}/idle3.4 +%attr(755,root,root) %{_bindir}/idle3.5 %dir %{py_scriptdir}/idlelib/Icons %{py_scriptdir}/idlelib/__pycache__ %{py_scriptdir}/idlelib/*.py -- 2.44.0