From: Arkadiusz Miśkiewicz Date: Wed, 16 Oct 2019 09:15:07 +0000 (+0200) Subject: - update to 3.8.0 X-Git-Tag: auto/th/python3-3.8.0-1~1 X-Git-Url: http://git.pld-linux.org/?p=packages%2Fpython3.git;a=commitdiff_plain;h=3e35963a43b07457bfd48aafb12cc1b0656eae77 - update to 3.8.0 m suffix dropped upstream; test_embed broken in similar way as https://bugs.python.org/issue35313 --- diff --git a/python-distro.patch b/python-distro.patch deleted file mode 100644 index a052d76..0000000 --- a/python-distro.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- Python-3.3.1/Lib/platform.py~ 2013-04-06 09:41:39.000000000 +0200 -+++ Python-3.3.1/Lib/platform.py 2013-05-11 16:25:29.566791008 +0200 -@@ -261,7 +261,7 @@ - _supported_dists = ( - 'SuSE', 'debian', 'fedora', 'redhat', 'centos', - 'mandrake', 'mandriva', 'rocks', 'slackware', 'yellowdog', 'gentoo', -- 'UnitedLinux', 'turbolinux', 'arch', 'mageia') -+ 'pld', 'UnitedLinux', 'turbolinux', 'arch', 'mageia') - - def _parse_release_file(firstline): - diff --git a/python3-db.patch b/python3-db.patch index 5674108..928aa62 100644 --- a/python3-db.patch +++ b/python3-db.patch @@ -9,18 +9,18 @@ min_db_ver = (3, 3) db_setup_debug = False # verbose debug prints from this script? ---- Python-3.6.0/setup.py~ 2016-12-27 23:21:52.000000000 +0100 -+++ Python-3.6.0/setup.py 2016-12-27 23:28:54.720208583 +0100 -@@ -1252,16 +1252,7 @@ class PyBuildExt(build_ext): +--- Python-3.8.0/setup.py~ 2019-10-15 10:03:10.000000000 +0200 ++++ Python-3.8.0/setup.py 2019-10-15 10:03:52.493993277 +0200 +@@ -1275,16 +1275,7 @@ class PyBuildExt(build_ext): for cand in dbm_order: if cand == "ndbm": - if find_file("ndbm.h", inc_dirs, []) is not None: + if find_file("ndbm.h", self.inc_dirs, []) is not None: - # Some systems have -lndbm, others have -lgdbm_compat, - # others don't have either -- if self.compiler.find_library_file(lib_dirs, +- if self.compiler.find_library_file(self.lib_dirs, - 'ndbm'): - ndbm_libs = ['ndbm'] -- elif self.compiler.find_library_file(lib_dirs, +- elif self.compiler.find_library_file(self.lib_dirs, - 'gdbm_compat'): - ndbm_libs = ['gdbm_compat'] - else: diff --git a/python3-multilib.patch b/python3-multilib.patch index 4898f2b..b546e49 100644 --- a/python3-multilib.patch +++ b/python3-multilib.patch @@ -215,15 +215,15 @@ diff -dur Python-3.5.0.orig/Modules/getpath.c Python-3.5.0/Modules/getpath.c #if !defined(PREFIX) || !defined(EXEC_PREFIX) || !defined(VERSION) || !defined(VPATH) #error "PREFIX, EXEC_PREFIX, VERSION, and VPATH must be constant defined" -@@ -753,7 +753,7 @@ calculate_zip_path(PyCalculatePath *calc - else { - wcsncpy(calculate->zip_path, calculate->prefix, MAXPATHLEN); +@@ -1078,7 +1078,7 @@ calculate_zip_path(PyCalculatePath *calc + return PATHLEN_ERR(); + } + } +- status = joinpath(zip_path, L"lib/python00.zip", zip_path_len); ++ status = joinpath(zip_path, L"" LIB_PYTHON "00.zip", zip_path_len); + if (_PyStatus_EXCEPTION(status)) { + return status; } -- joinpath(calculate->zip_path, L"lib/python00.zip"); -+ joinpath(calculate->zip_path, L"" LIB_PYTHON "00.zip"); - - /* Replace "00" with version */ - size_t bufsz = wcslen(calculate->zip_path); @@ -878,7 +878,7 @@ calculate_init(PyCalculatePath *calculat if (!calculate->prefix) { return DECODE_LOCALE_ERR("EXEC_PREFIX define", len); @@ -347,17 +347,35 @@ diff -dur Python-3.5.0.orig/setup.py Python-3.5.0/setup.py system_include_dirs = ['/usr/include'] # lib_dirs and inc_dirs are used to search for files; # if a file is found in one of those directories, it can -@@ -750,11 +749,11 @@ +@@ -953,11 +953,11 @@ class PyBuildExt(build_ext): elif curses_library: readline_libs.append(curses_library) - elif self.compiler.find_library_file(lib_dirs + + elif self.compiler.find_library_file(self.lib_dirs + - ['/usr/lib/termcap'], + ['/usr/' + sys.lib + '/termcap'], 'termcap'): readline_libs.append('termcap') - exts.append( Extension('readline', ['readline.c'], -- library_dirs=['/usr/lib/termcap'], -+ library_dirs=['/usr/' + sys.lib + '/termcap'], - extra_link_args=readline_extra_link_args, - libraries=readline_libs) ) + self.add(Extension('readline', ['readline.c'], +- library_dirs=['/usr/lib/termcap'], ++ library_dirs=['/usr/' + sys.lib + '/termcap'], + extra_link_args=readline_extra_link_args, + libraries=readline_libs)) else: + +--- Python-3.8.0/Lib/test/test_embed.py~ 2019-10-14 15:34:47.000000000 +0200 ++++ Python-3.8.0/Lib/test/test_embed.py 2019-10-15 11:53:55.299065729 +0200 +@@ -1071,11 +1071,11 @@ class InitConfigTests(EmbeddingTestsMixi + else: + ver = sys.version_info + return [ +- os.path.join(prefix, 'lib', ++ os.path.join(prefix, sys.lib, + f'python{ver.major}{ver.minor}.zip'), +- os.path.join(prefix, 'lib', ++ os.path.join(prefix, sys.lib, + f'python{ver.major}.{ver.minor}'), +- os.path.join(exec_prefix, 'lib', ++ os.path.join(exec_prefix, sys.lib, + f'python{ver.major}.{ver.minor}', 'lib-dynload'), + ] + diff --git a/python3-profile-tests.patch b/python3-profile-tests.patch index 11c0dc6..1148214 100644 --- a/python3-profile-tests.patch +++ b/python3-profile-tests.patch @@ -1,11 +1,11 @@ ---- Python-3.7.4/Makefile.pre.in~ 2019-08-05 14:10:46.000000000 +0200 -+++ Python-3.7.4/Makefile.pre.in 2019-08-05 14:37:01.691326225 +0200 +--- Python-3.8.0/Makefile.pre.in~ 2019-10-15 10:04:12.000000000 +0200 ++++ Python-3.8.0/Makefile.pre.in 2019-10-15 10:09:54.901153005 +0200 @@ -260,7 +260,7 @@ TCLTK_LIBS= @TCLTK_LIBS@ - # The task to run while instrumented when building the profile-opt target. - # We exclude unittests with -x that take a rediculious amount of time to - # run in the instrumented training build or do not provide much value. --PROFILE_TASK=-m test.regrtest --pgo -+PROFILE_TASK=-m test.regrtest --pgo $(TESTOPTS) + # To speed up profile generation, we don't run the full unit test suite + # by default. The default is "-m test --pgo". To run more tests, use + # PROFILE_TASK="-m test --pgo-extended" +-PROFILE_TASK= @PROFILE_TASK@ ++PROFILE_TASK= @PROFILE_TASK@ $(TESTOPTS) # report files for gcov / lcov coverage report COVERAGE_INFO= $(abs_builddir)/coverage.info diff --git a/python3.spec b/python3.spec index 261b7e6..a75a6c3 100644 --- a/python3.spec +++ b/python3.spec @@ -21,10 +21,10 @@ %define broken_tests_x32 -x test_time %undefine with_optimizations %endif -%define broken_tests -x test_nntplib -x test_gdb -x test_site -x test_distutils -x test_bdist_rpm -x test_ssl %{?broken_tests_x32} +%define broken_tests -x test_embed -x test_nntplib -x test_gdb -x test_site -x test_distutils -x test_bdist_rpm -x test_ssl %{?broken_tests_x32} -%define py_ver 3.7 -%define py_abi %{py_ver}m +%define py_ver 3.8 +%define py_abi %{py_ver} %define py_platform %{py_abi}-%{_target_base_arch}-%{_target_os}%{?_gnu} %define py_prefix %{_prefix} %define py_libdir %{py_prefix}/%{_lib}/python%{py_ver} @@ -41,13 +41,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}.4 -Release: 3 +Version: %{py_ver}.0 +Release: 1 Epoch: 1 License: PSF Group: Development/Languages/Python Source0: https://www.python.org/ftp/python/%{version}/Python-%{version}.tar.xz -# Source0-md5: d33e4aae66097051c2eca45ee3604803 +# Source0-md5: dbac8df9d8b9edc678d0f4cacdb7dbb0 Source1: pyconfig.h.in Patch0: %{name}-pythonpath.patch Patch1: %{name}-ac_fixes.patch @@ -55,7 +55,7 @@ Patch2: %{name}-multilib.patch Patch3: %{name}-no_cmdline_tests.patch Patch4: %{name}-makefile-location.patch Patch5: %{name}-config.patch -Patch6: python-distro.patch + Patch7: %{name}-db.patch Patch8: %{name}-install_prefix.patch Patch9: %{name}-tests_with_pythonpath.patch @@ -490,7 +490,7 @@ Moduły testowe dla Pythona. %patch3 -p1 %patch4 -p1 %patch5 -p1 -%patch6 -p1 + %patch7 -p1 %patch8 -p1 %patch9 -p1 @@ -503,7 +503,7 @@ Moduły testowe dla Pythona. %{__rm} -r Modules/expat -for SUBDIR in darwin libffi_msvc libffi_osx; do +for SUBDIR in darwin libffi_osx; do %{__rm} -r Modules/_ctypes/$SUBDIR/* done @@ -667,7 +667,9 @@ rm -rf $RPM_BUILD_ROOT %files %defattr(644,root,root,755) %attr(755,root,root) %{_bindir}/python%{py_ver} +%if "%{py_ver}" != "%{py_abi}" %attr(755,root,root) %{_bindir}/python%{py_abi} +%endif %attr(755,root,root) %{_bindir}/python3 %{_mandir}/man1/python%{py_ver}.1* %{_mandir}/man1/python3.1* @@ -771,8 +773,6 @@ rm -rf $RPM_BUILD_ROOT %files modules %defattr(644,root,root,755) %config(noreplace) %verify(not md5 mtime size) /etc/shrc.d/python*-modules* -%attr(755,root,root) %{_bindir}/pyvenv -%attr(755,root,root) %{_bindir}/pyvenv-%{py_ver} %{py_libdir}/__future__.py %{py_libdir}/__phello__.foo.py %{py_libdir}/_bootlocale.py @@ -838,7 +838,6 @@ rm -rf $RPM_BUILD_ROOT %{py_libdir}/inspect.py %{py_libdir}/ipaddress.py %{py_libdir}/lzma.py -%{py_libdir}/macpath.py %{py_libdir}/mailbox.py %{py_libdir}/mailcap.py %{py_libdir}/mimetypes.py @@ -908,6 +907,7 @@ rm -rf $RPM_BUILD_ROOT %{py_libdir}/xdrlib.py %{py_libdir}/zipapp.py %{py_libdir}/zipfile.py +%{py_libdir}/zipimport.py %{py_libdir}/__pycache__/__future__.cpython-*.py[co] %{py_libdir}/__pycache__/__phello__.foo.cpython-*.py[co] %{py_libdir}/__pycache__/_bootlocale.cpython-*.py[co] @@ -973,7 +973,6 @@ rm -rf $RPM_BUILD_ROOT %{py_libdir}/__pycache__/inspect.cpython-*.py[co] %{py_libdir}/__pycache__/ipaddress.cpython-*.py[co] %{py_libdir}/__pycache__/lzma.cpython-*.py[co] -%{py_libdir}/__pycache__/macpath.cpython-*.py[co] %{py_libdir}/__pycache__/mailbox.cpython-*.py[co] %{py_libdir}/__pycache__/mailcap.cpython-*.py[co] %{py_libdir}/__pycache__/mimetypes.cpython-*.py[co] @@ -1043,6 +1042,7 @@ rm -rf $RPM_BUILD_ROOT %{py_libdir}/__pycache__/xdrlib.cpython-*.py[co] %{py_libdir}/__pycache__/zipapp.cpython-*.py[co] %{py_libdir}/__pycache__/zipfile.cpython-*.py[co] +%{py_libdir}/__pycache__/zipimport.cpython-*.py[co] # # list .so modules to be sure that all of them are built @@ -1081,6 +1081,7 @@ rm -rf $RPM_BUILD_ROOT %attr(755,root,root) %{py_dyndir}/_multiprocessing.cpython-*.so %attr(755,root,root) %{py_dyndir}/_opcode.cpython-*.so %attr(755,root,root) %{py_dyndir}/_pickle.cpython-*.so +%attr(755,root,root) %{py_dyndir}/_posixshmem.cpython-*.so %attr(755,root,root) %{py_dyndir}/_posixsubprocess.cpython-*.so %attr(755,root,root) %{py_dyndir}/_queue.cpython-*.so %attr(755,root,root) %{py_dyndir}/_random.cpython-*.so @@ -1088,11 +1089,14 @@ rm -rf $RPM_BUILD_ROOT %attr(755,root,root) %{py_dyndir}/_sha3.cpython-*.so %attr(755,root,root) %{py_dyndir}/_socket.cpython-*.so %attr(755,root,root) %{py_dyndir}/_ssl.cpython-*.so +%attr(755,root,root) %{py_dyndir}/_statistics.cpython-*.so %attr(755,root,root) %{py_dyndir}/_testbuffer.cpython-*.so %attr(755,root,root) %{py_dyndir}/_testcapi.cpython-*.so +%attr(755,root,root) %{py_dyndir}/_testinternalcapi.cpython-*.so %attr(755,root,root) %{py_dyndir}/_testimportmultiple.cpython-*.so %attr(755,root,root) %{py_dyndir}/_testmultiphase.cpython-*.so %attr(755,root,root) %{py_dyndir}/_uuid.cpython-*.so +%attr(755,root,root) %{py_dyndir}/_xxsubinterpreters.cpython-*.so %attr(755,root,root) %{py_dyndir}/_xxtestfuzz.cpython-*.so # for openssl < 0.9.8 package sha256 and sha512 modules @@ -1211,6 +1215,7 @@ rm -rf $RPM_BUILD_ROOT %{py_libdir}/venv/*.py %dir %{py_libdir}/venv/scripts %dir %{py_libdir}/venv/scripts/common +%{py_libdir}/venv/scripts/common/Activate.ps1 %{py_libdir}/venv/scripts/common/activate %dir %{py_libdir}/venv/scripts/posix %{py_libdir}/venv/scripts/posix/activate.csh @@ -1272,12 +1277,15 @@ rm -rf $RPM_BUILD_ROOT %defattr(644,root,root,755) %doc Misc/{ACKS,NEWS,README,README.valgrind,valgrind-python.supp} %attr(755,root,root) %{_bindir}/python%{py_ver}-config +%if "%{py_ver}" != "%{py_abi}" %attr(755,root,root) %{_bindir}/python%{py_abi}-config +%endif %attr(755,root,root) %{_bindir}/python3-config %attr(755,root,root) %{_libdir}/libpython%{py_abi}.so %attr(755,root,root) %{_libdir}/libpython3.so %{py_incdir}/*.h %exclude %{py_incdir}/pyconfig.h +%{py_incdir}/cpython %{py_incdir}/internal %attr(755,root,root) %{py_libdir}/config-%{py_platform}/makesetup %attr(755,root,root) %{py_libdir}/config-%{py_platform}/install-sh @@ -1288,7 +1296,11 @@ rm -rf $RPM_BUILD_ROOT %dir %{py_libdir}/config-%{py_platform}/__pycache__ %{py_libdir}/config-%{py_platform}/__pycache__/python-config.* %{_pkgconfigdir}/python-%{py_ver}.pc +%{_pkgconfigdir}/python-%{py_ver}-embed.pc +%{_pkgconfigdir}/python3-embed.pc +%if "%{py_ver}" != "%{py_abi}" %{_pkgconfigdir}/python-%{py_abi}.pc +%endif %{_pkgconfigdir}/python3.pc %files devel-tools