]> git.pld-linux.org Git - packages/python3.git/commitdiff
Up to 3.12.1 (builds; starts; passes own test suite); needs some review from others
authorArkadiusz Miśkiewicz <arekm@maven.pl>
Fri, 12 Jan 2024 15:35:52 +0000 (16:35 +0100)
committerArkadiusz Miśkiewicz <arekm@maven.pl>
Fri, 12 Jan 2024 15:35:52 +0000 (16:35 +0100)
python3-BLDLIBRARY.patch
python3-ac_fixes.patch [deleted file]
python3-bdist_rpm.patch [deleted file]
python3-db.patch [deleted file]
python3-installcompile.patch
python3-multilib.patch
python3-no_cmdline_tests.patch
python3-pythonpath.patch
python3-tests.patch
python3-tests_with_pythonpath.patch
python3.spec

index 663e804efcd4be7b942f7e13f2149fddb8e16bc1..fcaecd918ffe7e7f639c97a6b00dd42d57d4515e 100644 (file)
@@ -8,37 +8,37 @@
  PY3LIBRARY=     @PY3LIBRARY@
  DLLLIBRARY=   @DLLLIBRARY@
  LDLIBRARYDIR=   @LDLIBRARYDIR@
-@@ -588,7 +588,7 @@ clinic: check-clean-src $(srcdir)/Module
+@@ -780,7 +780,7 @@ clinic: check-clean-src $(srcdir)/Module
  
  # Build the interpreter
- $(BUILDPYTHON):       Programs/python.o $(LIBRARY_DEPS)
--      $(LINKCC) $(PY_CORE_LDFLAGS) $(LINKFORSHARED) -o $@ Programs/python.o $(BLDLIBRARY) $(LIBS) $(MODLIBS) $(SYSLIBS)
-+      $(LINKCC) $(PY_CORE_LDFLAGS) $(LINKFORSHARED) -o $@ Programs/python.o $(BLDLIBDIR) $(BLDLIBRARY) $(LIBS) $(MODLIBS) $(SYSLIBS)
+ $(BUILDPYTHON):       Programs/python.o $(LINK_PYTHON_DEPS)
+-      $(LINKCC) $(PY_CORE_LDFLAGS) $(LINKFORSHARED) -o $@ Programs/python.o $(LINK_PYTHON_OBJS) $(LIBS) $(MODLIBS) $(SYSLIBS)
++      $(LINKCC) $(PY_CORE_LDFLAGS) $(LINKFORSHARED) -o $@ Programs/python.o $(BLDLIBDIR) $(LINK_PYTHON_OBJS) $(LIBS) $(MODLIBS) $(SYSLIBS)
  
- platform: $(BUILDPYTHON) pybuilddir.txt
+ platform: $(PYTHON_FOR_BUILD_DEPS) pybuilddir.txt
        $(RUNSHARED) $(PYTHON_FOR_BUILD) -c 'import sys ; from sysconfig import get_platform ; print("%s-%d.%d" % (get_platform(), *sys.version_info[:2]))' >platform
-@@ -723,7 +723,7 @@ Makefile Modules/config.c: Makefile.pre
+@@ -1056,7 +1056,7 @@ regen-re: $(BUILDPYTHON)
+       $(RUNSHARED) ./$(BUILDPYTHON) $(srcdir)/Tools/build/generate_re_casefix.py $(srcdir)/Lib/re/_casefix.py
  
- Programs/_testembed: Programs/_testembed.o $(LIBRARY_DEPS)
--      $(LINKCC) $(PY_CORE_LDFLAGS) $(LINKFORSHARED) -o $@ Programs/_testembed.o $(BLDLIBRARY) $(LIBS) $(MODLIBS) $(SYSLIBS)
-+      $(LINKCC) $(PY_CORE_LDFLAGS) $(LINKFORSHARED) -o $@ Programs/_testembed.o $(BLDLIBDIR) $(BLDLIBRARY) $(LIBS) $(MODLIBS) $(SYSLIBS)
+ Programs/_testembed: Programs/_testembed.o $(LINK_PYTHON_DEPS)
+-      $(LINKCC) $(PY_CORE_LDFLAGS) $(LINKFORSHARED) -o $@ Programs/_testembed.o $(LINK_PYTHON_OBJS) $(LIBS) $(MODLIBS) $(SYSLIBS)
++      $(LINKCC) $(PY_CORE_LDFLAGS) $(LINKFORSHARED) -o $@ Programs/_testembed.o $(BLDLIBDIR) $(LINK_PYTHON_OBJS) $(LIBS) $(MODLIBS) $(SYSLIBS)
  
  ############################################################################
- # Importlib
+ # "Bootstrap Python" used to run deepfreeze.py
 --- Python-3.8.5/configure.ac.orig     2020-09-17 07:55:13.735226834 +0200
 +++ Python-3.8.5/configure.ac  2020-09-17 10:46:44.172812084 +0200
-@@ -1033,6 +1033,7 @@
+@@ -1359,6 +1359,7 @@ AC_MSG_RESULT([$LIBRARY])
  # with the ABI build flags appended.
- AC_SUBST(LDLIBRARY)
- AC_SUBST(DLLLIBRARY)
-+AC_SUBST(BLDLIBDIR)
- AC_SUBST(BLDLIBRARY)
- AC_SUBST(PY3LIBRARY)
- AC_SUBST(LDLIBRARYDIR)
-@@ -1040,6 +1041,7 @@
- AC_SUBST(RUNSHARED)
- AC_SUBST(LDVERSION)
+ AC_SUBST([LDLIBRARY])
+ AC_SUBST([DLLLIBRARY])
++AC_SUBST([BLDLIBDIR])
+ AC_SUBST([BLDLIBRARY])
+ AC_SUBST([PY3LIBRARY])
+ AC_SUBST([LDLIBRARYDIR])
+@@ -1366,6 +1367,7 @@ AC_SUBST([INSTSONAME])
+ AC_SUBST([RUNSHARED])
+ AC_SUBST([LDVERSION])
  LDLIBRARY="$LIBRARY"
 +BLDLIBDIR=''
  BLDLIBRARY='$(LDLIBRARY)'
diff --git a/python3-ac_fixes.patch b/python3-ac_fixes.patch
deleted file mode 100644 (file)
index 36e3783..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
---- Python-3.6.2/configure.ac~ 2017-07-08 05:33:27.000000000 +0200
-+++ Python-3.6.2/configure.ac  2017-08-07 10:28:44.498951134 +0200
-@@ -1485,25 +1485,6 @@ then
-             CFLAGS_ALIASING="-fno-strict-aliasing"
-         fi
--      case $ac_cv_prog_cc_g in
--      yes)
--          if test "$Py_DEBUG" = 'true' ; then
--              # Optimization messes up debuggers, so turn it off for
--              # debug builds.
--                if "$CC" -v --help 2>/dev/null |grep -- -Og > /dev/null; then
--                    OPT="-g -Og -Wall"
--                else
--                    OPT="-g -O0 -Wall"
--                fi
--          else
--              OPT="-g $WRAP -O3 -Wall"
--          fi
--          ;;
--      *)
--          OPT="-O3 -Wall"
--          ;;
--      esac
--
-       case $ac_sys_system in
-           SCO_SV*) OPT="$OPT -m486 -DSCO5"
-           ;;
-
diff --git a/python3-bdist_rpm.patch b/python3-bdist_rpm.patch
deleted file mode 100644 (file)
index 4579c97..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-diff -dur -x '*~' -x '*.orig' Python-3.5.0.orig/Lib/distutils/command/bdist_rpm.py Python-3.5.0/Lib/distutils/command/bdist_rpm.py
---- Python-3.5.0.orig/Lib/distutils/command/bdist_rpm.py       2015-09-13 13:41:20.000000000 +0200
-+++ Python-3.5.0/Lib/distutils/command/bdist_rpm.py    2015-12-03 18:14:59.483958511 +0100
-@@ -324,6 +324,16 @@
-         if self.rpm3_mode:
-             rpm_cmd.extend(['--define',
-                              '_topdir %s' % os.path.abspath(self.rpm_base)])
-+            rpm_cmd.extend(['--define',
-+                             '_specdir %s/SPECS' % os.path.abspath(self.rpm_base)])
-+            rpm_cmd.extend(['--define',
-+                             '_sourcedir %s/SOURCES' % os.path.abspath(self.rpm_base)])
-+            rpm_cmd.extend(['--define',
-+                             '_builddir %s/BUILD' % os.path.abspath(self.rpm_base)])
-+            rpm_cmd.extend(['--define',
-+                             '_rpmdir %s/RPMS' % os.path.abspath(self.rpm_base)])
-+            rpm_cmd.extend(['--define',
-+                             '_srcrpmdir %s/SRPMS' % os.path.abspath(self.rpm_base)])
-         if not self.keep_temp:
-             rpm_cmd.append('--clean')
-@@ -337,7 +347,7 @@
-         # list is empty)
-         nvr_string = "%{name}-%{version}-%{release}"
-         src_rpm = nvr_string + ".src.rpm"
--        non_src_rpm = "%{arch}/" + nvr_string + ".%{arch}.rpm"
-+        non_src_rpm = nvr_string + ".%{arch}.rpm"
-         q_cmd = r"rpm -q --qf '%s %s\n' --specfile '%s'" % (
-             src_rpm, non_src_rpm, spec_path)
diff --git a/python3-db.patch b/python3-db.patch
deleted file mode 100644 (file)
index 928aa62..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
---- Python-3.3.3/setup.py.orig 2013-11-21 18:36:59.259841950 +0100
-+++ Python-3.3.3/setup.py      2013-11-21 19:07:23.173098741 +0100
-@@ -835,7 +835,7 @@
-         # a release.  Most open source OSes come with one or more
-         # versions of BerkeleyDB already installed.
--        max_db_ver = (5, 3)
-+        max_db_ver = (6, 2)
-         min_db_ver = (3, 3)
-         db_setup_debug = False   # verbose debug prints from this script?
---- 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", 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(self.lib_dirs,
--                                                               'ndbm'):
--                            ndbm_libs = ['ndbm']
--                        elif self.compiler.find_library_file(self.lib_dirs,
--                                                             'gdbm_compat'):
--                            ndbm_libs = ['gdbm_compat']
--                        else:
--                            ndbm_libs = []
-+                        ndbm_libs = ['gdbm_compat']
-                         if dbm_setup_debug: print("building dbm using ndbm")
-                         dbmext = Extension('_dbm', ['_dbmmodule.c'],
-                                            define_macros=[
index 82c914e573bb85ddcc7810cc4252c43d9e100a0d..1611ffbf1957e6c089979eca6b30014678c36e29 100644 (file)
@@ -1,30 +1,20 @@
-diff -urNp -x '*.orig' Python-3.9.2.org/Makefile.pre.in Python-3.9.2/Makefile.pre.in
---- Python-3.9.2.org/Makefile.pre.in   2021-02-25 18:42:02.242771533 +0100
-+++ Python-3.9.2/Makefile.pre.in       2021-02-25 18:42:03.919490432 +0100
-@@ -1262,7 +1262,7 @@ altinstall: commoninstall
+--- a/Makefile.pre.in~ 2024-01-12 14:35:45.000000000 +0100
++++ b/Makefile.pre.in  2024-01-12 14:40:01.203324556 +0100
+@@ -1921,7 +1921,7 @@ altinstall: commoninstall
+ .PHONY: commoninstall
  commoninstall:  check-clean-src @FRAMEWORKALTINSTALLFIRST@ \
                altbininstall libinstall inclinstall libainstall \
--              sharedinstall oldsharedinstall altmaninstall \
-+              sharedinstall oldsharedinstall altmaninstall installcompile \
-               @FRAMEWORKALTINSTALLLAST@
+-              sharedinstall altmaninstall @FRAMEWORKALTINSTALLLAST@
++              sharedinstall altmaninstall installcompile @FRAMEWORKALTINSTALLLAST@
  
  # Install shared libraries enabled by Setup
-@@ -1530,6 +1530,8 @@ libinstall:      build_all $(srcdir)/Modules/
-               $(INSTALL_DATA) $(srcdir)/Modules/xxmodule.c \
-                       $(DESTDIR)$(LIBDEST)/distutils/tests ; \
-       fi
-+
+ DESTDIRS=     $(exec_prefix) $(LIBDIR) $(BINLIBDEST) $(DESTSHARED)
+@@ -2316,6 +2316,8 @@ libinstall:      all $(srcdir)/Modules/xxmodu
+       $(INSTALL_DATA) `cat pybuilddir.txt`/_sysconfigdata_$(ABIFLAGS)_$(MACHDEP)_$(MULTIARCH).py \
+               $(DESTDIR)$(LIBDEST); \
+       $(INSTALL_DATA) $(srcdir)/LICENSE $(DESTDIR)$(LIBDEST)/LICENSE.txt
++.PHONY: installcompile
 +installcompile: libainstall libinstall
-       -PYTHONPATH=$(DESTDIR)$(LIBDEST)  $(RUNSHARED) \
+       @ # Build PYC files for the 3 optimization levels (0, 1, 2)
+       -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
                $(PYTHON_FOR_BUILD) -Wi $(DESTDIR)$(LIBDEST)/compileall.py \
-               -j0 -d $(LIBDEST) -f \
-@@ -1938,7 +1940,7 @@ Python/thread.o: @THREADHEADERS@ $(srcdi
- .PHONY: frameworkinstall frameworkinstallframework frameworkinstallstructure
- .PHONY: frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools
- .PHONY: frameworkaltinstallunixtools recheck clean clobber distclean
--.PHONY: smelly funny patchcheck touch altmaninstall commoninstall
-+.PHONY: smelly funny patchcheck touch altmaninstall installcompile commoninstall
- .PHONY: clean-retain-profile profile-removal run_profile_task
- .PHONY: build_all_generate_profile build_all_merge_profile
- .PHONY: gdbhooks
index 83174c620b410ec19e09ad285488a787ff3c21ac..242108860dfaf571e9f1a5b097afbcb3356f513e 100644 (file)
@@ -1,34 +1,3 @@
-diff -urNp -x '*.orig' Python-3.9.2.org/Lib/distutils/sysconfig.py Python-3.9.2/Lib/distutils/sysconfig.py
---- Python-3.9.2.org/Lib/distutils/sysconfig.py        2021-02-19 13:31:44.000000000 +0100
-+++ Python-3.9.2/Lib/distutils/sysconfig.py    2021-02-25 18:40:00.705652346 +0100
-@@ -145,13 +145,13 @@ def get_python_lib(plat_specific=0, stan
-             prefix = plat_specific and EXEC_PREFIX or PREFIX
-     if os.name == "posix":
--        if plat_specific or standard_lib:
-+        if plat_specific or standard_lib or prefix != "/usr":
-             # Platform-specific modules (any module from a non-pure-Python
-             # module distribution) or standard Python library modules.
-             libdir = sys.platlibdir
-         else:
-             # Pure Python
--            libdir = "lib"
-+            libdir = "share"
-         libpython = os.path.join(prefix, libdir,
-                                  "python" + get_python_version())
-         if standard_lib:
-diff -urNp -x '*.orig' Python-3.9.2.org/Lib/distutils/tests/test_install.py Python-3.9.2/Lib/distutils/tests/test_install.py
---- Python-3.9.2.org/Lib/distutils/tests/test_install.py       2021-02-19 13:31:44.000000000 +0100
-+++ Python-3.9.2/Lib/distutils/tests/test_install.py   2021-02-25 18:40:00.705652346 +0100
-@@ -56,7 +56,7 @@ class InstallTestCase(support.TempdirMan
-             expected = os.path.normpath(expected)
-             self.assertEqual(got, expected)
--        libdir = os.path.join(destination, "lib", "python")
-+        libdir = os.path.join(destination, sys.platlibdir, "python")
-         check_path(cmd.install_lib, libdir)
-         platlibdir = os.path.join(destination, sys.platlibdir, "python")
-         check_path(cmd.install_platlib, platlibdir)
 diff -urNp -x '*.orig' Python-3.9.2.org/Lib/site.py Python-3.9.2/Lib/site.py
 --- Python-3.9.2.org/Lib/site.py       2021-02-19 13:31:44.000000000 +0100
 +++ Python-3.9.2/Lib/site.py   2021-02-25 18:40:00.705652346 +0100
@@ -41,7 +10,7 @@ diff -urNp -x '*.orig' Python-3.9.2.org/Lib/site.py Python-3.9.2/Lib/site.py
  
  
  def getuserbase():
-@@ -344,6 +344,8 @@ def getsitepackages(prefixes=None):
+@@ -371,6 +371,8 @@ def getsitepackages(prefixes=None):
                                      "python%d.%d" % sys.version_info[:2],
                                      "site-packages")
                  sitepackages.append(path)
@@ -49,7 +18,7 @@ diff -urNp -x '*.orig' Python-3.9.2.org/Lib/site.py Python-3.9.2/Lib/site.py
 +            sitepackages.append(os.path.join(prefix, "share", "python%d.%d" % sys.version_info[:2], "site-packages"))
          else:
              sitepackages.append(prefix)
+             sitepackages.append(os.path.join(prefix, "Lib", "site-packages"))
 diff -urNp -x '*.orig' Python-3.9.2.org/Lib/sysconfig.py Python-3.9.2/Lib/sysconfig.py
 --- Python-3.9.2.org/Lib/sysconfig.py  2021-02-19 13:31:44.000000000 +0100
 +++ Python-3.9.2/Lib/sysconfig.py      2021-02-25 18:40:00.705652346 +0100
@@ -90,7 +59,7 @@ diff -urNp -x '*.orig' Python-3.9.2.org/Lib/sysconfig.py Python-3.9.2/Lib/syscon
              'data': '{userbase}',
 @@ -490,7 +490,11 @@ def get_config_h_filename():
          else:
-             inc_dir = _sys_home or _PROJECT_BASE
+             inc_dir = _PROJECT_BASE
      else:
 -        inc_dir = get_path('platinclude')
 +        if hasattr(sys, 'abiflags'):
@@ -115,32 +84,6 @@ diff -urNp -x '*.orig' Python-3.9.2.org/Lib/sysconfig.py Python-3.9.2/Lib/syscon
                                fi; \
                        else \
                                echo Skip install of $(LIBRARY) - use make frameworkinstall; \
-diff -urNp -x '*.orig' Python-3.9.2.org/setup.py Python-3.9.2/setup.py
---- Python-3.9.2.org/setup.py  2021-02-19 13:31:44.000000000 +0100
-+++ Python-3.9.2/setup.py      2021-02-25 18:40:00.708985783 +0100
-@@ -750,7 +750,7 @@ class PyBuildExt(build_ext):
-             add_dir_to_list(self.compiler.include_dirs,
-                             sysconfig.get_config_var("INCLUDEDIR"))
--        system_lib_dirs = ['/lib64', '/usr/lib64', '/lib', '/usr/lib']
-+        system_lib_dirs = ['/' + sys.platlibdir, '/usr/' + sys.platlibdir]
-         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
-@@ -1039,11 +1039,11 @@ class PyBuildExt(build_ext):
-             elif curses_library:
-                 readline_libs.append(curses_library)
-             elif self.compiler.find_library_file(self.lib_dirs +
--                                                     ['/usr/lib/termcap'],
-+                                                     ['/usr/' + sys.platlibdir + '/termcap'],
-                                                      'termcap'):
-                 readline_libs.append('termcap')
-             self.add(Extension('readline', ['readline.c'],
--                               library_dirs=['/usr/lib/termcap'],
-+                               library_dirs=['/usr/' + sys.platlibdir + '/termcap'],
-                                extra_link_args=readline_extra_link_args,
-                                libraries=readline_libs))
-         else:
 --- Python-3.10.6/Lib/test/test_sysconfig.py.orig      2022-08-22 06:15:16.895139554 +0200
 +++ Python-3.10.6/Lib/test/test_sysconfig.py   2022-08-22 06:18:57.331178879 +0200
 @@ -299,13 +299,13 @@ class TestSysConfig(unittest.TestCase):
@@ -162,9 +105,9 @@ diff -urNp -x '*.orig' Python-3.9.2.org/setup.py Python-3.9.2/setup.py
      def test_main(self):
 --- Python-3.10.13/Lib/venv/__init__.py.orig   2023-08-24 14:46:25.000000000 +0200
 +++ Python-3.10.13/Lib/venv/__init__.py        2023-09-23 12:30:09.948046280 +0200
-@@ -137,10 +137,9 @@ class EnvBuilder:
-         context.inc_path = path = os.path.join(env_dir, incpath)
-         create_if_needed(path)
+@@ -145,10 +145,9 @@ class EnvBuilder:
+         create_if_needed(incpath)
+         context.lib_path = libpath
          create_if_needed(libpath)
 -        # Issue 21197: create lib64 as a symlink to lib on 64-bit non-OS X POSIX
 -        if ((sys.maxsize > 2**32) and (os.name == 'posix') and
@@ -175,4 +118,4 @@ diff -urNp -x '*.orig' Python-3.9.2.org/setup.py Python-3.9.2/setup.py
 +            link_path = os.path.join(env_dir, sys.platlibdir)
              if not os.path.exists(link_path):   # Issue #21643
                  os.symlink('lib', link_path)
-         context.bin_path = binpath = os.path.join(env_dir, binname)
+         context.bin_path = binpath
index e78668798ebe770e85128a92049572f0e2481c02..f33f8fc65d34a501de87045d28e8a93c9468c9e4 100644 (file)
@@ -20,7 +20,7 @@ diff -urNp -x '*.orig' Python-3.9.2.org/Lib/test/test_warnings/__init__.py Pytho
  class EnvironmentVariableTests(BaseTest):
  
      def test_single_warning(self):
-@@ -1206,14 +1207,17 @@ class EnvironmentVariableTests(BaseTest)
+@@ -1278,9 +1278,11 @@ class EnvironmentVariableTests(BaseTest)
              PYTHONDEVMODE="")
          self.assertEqual(stdout, str([PYTHONWARNINGS]).encode())
  
@@ -32,8 +32,10 @@ diff -urNp -x '*.orig' Python-3.9.2.org/Lib/test/test_warnings/__init__.py Pytho
  class PyEnvironmentVariableTests(EnvironmentVariableTests, unittest.TestCase):
      module = py_warnings
  
+@@ -1326,6 +1328,7 @@ class _DeprecatedTest(BaseTest, unittest
  
  class BootstrapTest(unittest.TestCase):
 +    @unittest.skipUnless(support.is_resource_enabled("cmdline"), "python cmdline tests disabled")
      def test_issue_8766(self):
          # "import encodings" emits a warning whereas the warnings is not loaded
index 1342158f730472849f471c6d6738c799066bb84c..d2bd0809b05ef1c7ac0239e050b3ca5cd068d2b5 100644 (file)
@@ -1,25 +1,3 @@
---- Python-3.0.1/Lib/distutils/tests/test_build_scripts.py.wiget       2004-08-26 07:44:02.000000000 +0200
-+++ Python-3.0.1/Lib/distutils/tests/test_build_scripts.py     2009-03-14 18:12:32.000000000 +0100
-@@ -58,7 +58,7 @@ class BuildScriptsTestCase(support.Tempd
-                            "pass\n"))
-         expected.append("script2.py")
-         self.write_script(dir, "script2.py",
--                          ("#!/usr/bin/python\n"
-+                          ("#!/usr/bin/python3\n"
-                            "# bogus script w/ Python sh-bang\n"
-                            "pass\n"))
-         expected.append("shell.sh")
---- Python-3.0.1/Lib/distutils/tests/test_install_scripts.py.wiget     2004-08-03 20:53:07.000000000 +0200
-+++ Python-3.0.1/Lib/distutils/tests/test_install_scripts.py   2009-03-14 18:12:32.000000000 +0100
-@@ -48,7 +48,7 @@ class InstallScriptsTestCase(support.Tem
-         write_script("script1.py", ("#! /usr/bin/env python2.3\n"
-                                     "# bogus script w/ Python sh-bang\n"
-                                     "pass\n"))
--        write_script("script2.py", ("#!/usr/bin/python\n"
-+        write_script("script2.py", ("#!/usr/bin/python3\n"
-                                     "# bogus script w/ Python sh-bang\n"
-                                     "pass\n"))
-         write_script("shell.sh", ("#!/bin/sh\n"
 --- Python-3.0.1/Lib/cgi.py.wiget      2008-12-04 21:11:57.000000000 +0100
 +++ Python-3.0.1/Lib/cgi.py    2009-03-14 18:12:32.000000000 +0100
 @@ -1,6 +1,6 @@
index 83f26eac0a07ac2bd0e9d572c968a6e84ba488ee..6695810fcec1003a359c5a2eed9c4825c67023c0 100644 (file)
@@ -1,8 +1,8 @@
 diff -urNp -x '*.orig' Python-3.9.2.org/Lib/test/test_imaplib.py Python-3.9.2/Lib/test/test_imaplib.py
 --- Python-3.9.2.org/Lib/test/test_imaplib.py  2021-02-19 13:31:44.000000000 +0100
 +++ Python-3.9.2/Lib/test/test_imaplib.py      2021-02-25 18:42:23.540101637 +0100
-@@ -74,7 +74,7 @@ class TestImaplib(unittest.TestCase):
+@@ -77,7 +77,7 @@ class TestImaplib(unittest.TestCase):
+     @socket_helper.skip_if_tcp_blackhole
      def test_imap4_host_default_value(self):
          # Check whether the IMAP4_PORT is truly unavailable.
 -        with socket.socket() as s:
index 03b450a30f4e9566431a73ebef8affc46031dd08..796532dcf524e0b7fcee4bed3898f9d24ea8bab6 100644 (file)
@@ -1,8 +1,8 @@
 diff -urNp -x '*.orig' Python-3.9.2.org/Lib/test/test_asyncio/test_tasks.py Python-3.9.2/Lib/test/test_asyncio/test_tasks.py
 --- Python-3.9.2.org/Lib/test/test_asyncio/test_tasks.py       2021-02-19 13:31:44.000000000 +0100
 +++ Python-3.9.2/Lib/test/test_asyncio/test_tasks.py   2021-02-25 18:41:41.098779547 +0100
-@@ -6,6 +6,7 @@ import contextvars
- import functools
+@@ -4,6 +4,7 @@ import collections
+ import contextvars
  import gc
  import io
 +import os
@@ -28,10 +28,11 @@ diff -urNp -x '*.orig' Python-3.9.2.org/Lib/test/test_cmd_line.py Python-3.9.2/L
      def test_large_PYTHONPATH(self):
          path1 = "ABCDE" * 100
          path2 = "FGHIJ" * 100
-@@ -280,6 +281,7 @@ class CmdLineTest(unittest.TestCase):
-         self.assertIn(path1.encode('ascii'), out)
-         self.assertIn(path2.encode('ascii'), out)
+
+@@ -374,6 +374,7 @@ class CmdLineTest(unittest.TestCase):
  
+     @unittest.skipIf(sys.flags.safe_path,
+                      'PYTHONSAFEPATH changes default sys.path')
 +    @unittest.skipIf("PYTHONPATH" in os.environ, "$PYTHONPATH set")
      def test_empty_PYTHONPATH_issue16309(self):
          # On Posix, it is documented that setting PATH to the
@@ -46,18 +47,18 @@ diff -urNp -x '*.orig' Python-3.9.2.org/Lib/test/test_cmd_line.py Python-3.9.2/L
      def test_no_args_compiles_path(self):
          # Note that -l is implied for the no args case.
          bazfn = script_helper.make_script(self.directory, 'baz', '')
-@@ -517,6 +518,7 @@ class CommandLineTestsBase:
-             self.assertNotCompiled(self.initfn)
-             self.assertNotCompiled(self.barfn)
+@@ -558,6 +558,7 @@ class CommandLineTestsBase:
  
-+    @unittest.skipIf("PYTHONPATH" in os.environ, "$PYTHONPATH set")
      @without_source_date_epoch  # timestamp invalidation test
+     @support.requires_resource('cpu')
++    @unittest.skipIf("PYTHONPATH" in os.environ, "$PYTHONPATH set")
      def test_no_args_respects_force_flag(self):
          bazfn = script_helper.make_script(self.directory, 'baz', '')
-@@ -535,6 +537,7 @@ class CommandLineTestsBase:
-         mtime2 = os.stat(pycpath).st_mtime
+         with self.temporary_pycache_prefix() as env:
+@@ -577,6 +577,7 @@ class CommandLineTestsBase:
          self.assertNotEqual(mtime, mtime2)
  
+     @support.requires_resource('cpu')
 +    @unittest.skipIf("PYTHONPATH" in os.environ, "$PYTHONPATH set")
      def test_no_args_respects_quiet_flag(self):
          script_helper.make_script(self.directory, 'baz', '')
@@ -92,8 +93,8 @@ diff -urNp -x '*.orig' Python-3.9.2.org/Lib/test/test_venv.py Python-3.9.2/Lib/t
      def test_executable(self):
          """
          Test that the sys.executable value is as expected.
-@@ -406,6 +408,7 @@ class BasicTest(BaseTest):
-         self.assertEqual(out.strip(), 'False'.encode())
+@@ -641,6 +641,7 @@ class BasicTest(BaseTest):
+                 self.assertFalse(line.endswith(b'\r\n'), error_message)
  
  @requireVenvCreate
 +@unittest.skipIf("PYTHONPATH" in os.environ, "$PYTHONPATH set")
@@ -103,9 +104,9 @@ diff -urNp -x '*.orig' Python-3.9.2.org/Lib/test/test_venv.py Python-3.9.2/Lib/t
 diff -urNp -x '*.orig' Python-3.9.2.org/Lib/test/test_warnings/__init__.py Python-3.9.2/Lib/test/test_warnings/__init__.py
 --- Python-3.9.2.org/Lib/test/test_warnings/__init__.py        2021-02-25 18:41:39.412060338 +0100
 +++ Python-3.9.2/Lib/test/test_warnings/__init__.py    2021-02-25 18:41:41.098779547 +0100
-@@ -1218,6 +1218,7 @@ class PyEnvironmentVariableTests(Environ
+@@ -1329,6 +1329,7 @@ class _DeprecatedTest(BaseTest, unittest
  class BootstrapTest(unittest.TestCase):
      @unittest.skipUnless(support.is_resource_enabled("cmdline"), "python cmdline tests disabled")
 +    @unittest.skipIf("PYTHONPATH" in os.environ, "$PYTHONPATH set")
      def test_issue_8766(self):
index cc4b1f487ab2c4b1d30f3d9d0a7d66516a338ee6..30e98919d61f9d5b5fe424019e782acef2390c8b 100644 (file)
@@ -13,7 +13,7 @@
 # tests which may fail because of builder environment limitations (no /proc or /dev/pts)
 %define                nobuilder_tests -u-network -x test_resource -x test_openpty -x test_socket -x test_nis -x test_posix -x test_locale -x test_pty -x test_asyncio -x test_os -x test_readline -x test_normalization
 
-# tests which fail because of some unknown/unresolved reason (this list should be %{nil})
+# tests which fail because of some unknown/unresolved reason (this list should be %%{nil})
 #   test_site: fails because our site.py is patched to include both /usr/share/... and /usr/lib...
 #   test_gdb: fails, as the gdb uses old python version
 #   test_time: test_AsTimeval (test.test_time.TestCPyTime), rounding error
@@ -21,7 +21,7 @@
 %define                broken_tests_x32        -x test_time
 %undefine      with_optimizations
 %endif
-%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                broken_tests    -x test_embed -x test_nntplib -x test_gdb -x test_site -x test_ssl %{?broken_tests_x32}
 
 %ifarch armv6hl armv7hl armv7hnl
 %define                _python_target_abi      %{?_gnu}hf
@@ -29,7 +29,7 @@
 %define                _python_target_abi      %{?_gnu}
 %endif
 
-%define py_ver         3.10
+%define py_ver         3.12
 %define py_abi         %{py_ver}
 %define        py_platform     %{py_abi}-%{_target_base_arch}-%{_target_os}%{?_python_target_abi}
 %define py_prefix      %{_prefix}
@@ -47,23 +47,23 @@ 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}.13
-Release:       2
+Version:       %{py_ver}.1
+Release:       0.1
 Epoch:         1
 License:       PSF
 Group:         Development/Languages/Python
 Source0:       https://www.python.org/ftp/python/%{version}/Python-%{version}.tar.xz
-# Source0-md5: 8847dc6458d1431d0ae0f55942deeb89
+# Source0-md5: 50f827c800483776c8ef86e6a53831fa
 Source1:       pyconfig.h.in
 Patch0:                %{name}-pythonpath.patch
-Patch1:                %{name}-ac_fixes.patch
+
 Patch2:                %{name}-multilib.patch
 Patch3:                %{name}-no_cmdline_tests.patch
 Patch4:                %{name}-BLDLIBRARY.patch
 Patch5:                %{name}-config.patch
-Patch7:                %{name}-db.patch
+
 Patch9:                %{name}-tests_with_pythonpath.patch
-Patch10:       %{name}-bdist_rpm.patch
+
 Patch11:       %{name}-installcompile.patch
 
 Patch13:       %{name}-no-randomize-tests.patch
@@ -483,14 +483,14 @@ Moduły testowe dla Pythona.
 %prep
 %setup -q -n Python-%{version}
 %patch0 -p1
-%patch1 -p1
+
 %patch2 -p1
 %patch3 -p1
 %patch4 -p1
 %patch5 -p1
-%patch7 -p1
+
 %patch9 -p1
-%patch10 -p1
+
 %patch11 -p1
 
 %patch13 -p1
@@ -499,10 +499,6 @@ Moduły testowe dla Pythona.
 
 %{__rm} -r Modules/expat
 
-for SUBDIR in darwin libffi_osx; do
-       %{__rm} -r Modules/_ctypes/$SUBDIR/*
-done
-
 %if "%{pld_release}" == "ac"
 files="md5module.c sha1module.c"
 files="$files sha256module.c sha512module.c"
@@ -513,17 +509,16 @@ done
 
 sed -E -i -e '1s,#!\s*/usr/bin/env\s+python2(\s|$),#!%{__python}\1,' -e '1s,#!\s*/usr/bin/env\s+python(\s|$),#!%{__python}\1,' -e '1s,#!\s*/usr/bin/python(\s|$),#!%{__python}\1,' \
       Tools/gdb/libpython.py \
-      Tools/pynche/pynche \
-      Tools/pynche/pynche.pyw \
-      Tools/scripts/2to3
 
 sed -E -i -e '1s,#!\s*/usr/bin/env\s+python3(\s|$),#!%{__python3}\1,' \
       Tools/scripts/idle3 \
+      Tools/scripts/2to3 \
       Tools/scripts/pydoc3
 
 find . -name '*.py' | xargs -r grep -El '^#! */usr/bin/env python3?' | xargs %{__sed} -i -e '1s,^#! */usr/bin/env python3\?,#!/usr/bin/python3,'
 
 sed -E -i -e '1s,#!\s*/usr/bin/env\s+bash(\s|$),#!/bin/bash\1,' \
+       Tools/build/regen-configure.sh \
        Tools/c-analyzer/must-resolve.sh
 
 %build
@@ -652,7 +647,7 @@ sed 's/=/ /' \
 install -p Tools/i18n/pygettext.py $RPM_BUILD_ROOT%{_bindir}/pygettext%{py_ver}
 
 # reindent python code
-install -p Tools/scripts/reindent.py $RPM_BUILD_ROOT%{_bindir}/pyreindent%{py_ver}
+install -p Tools/patchcheck/reindent.py $RPM_BUILD_ROOT%{_bindir}/pyreindent%{py_ver}
 
 # just to cut the noise, as they are not packaged (now)
 %{__rm} $RPM_BUILD_ROOT%{py_libdir}/ctypes/macholib/fetch_macholib*
@@ -734,7 +729,6 @@ rm -rf $RPM_BUILD_ROOT
 %{py_libdir}/io.py
 %{py_libdir}/operator.py
 %{py_libdir}/posixpath.py
-%{py_libdir}/re.py
 %{py_libdir}/reprlib.py
 %{py_libdir}/site.py
 %{py_libdir}/sre_*.py
@@ -765,7 +759,6 @@ rm -rf $RPM_BUILD_ROOT
 %{py_libdir}/__pycache__/io.cpython-*.py[co]
 %{py_libdir}/__pycache__/operator.cpython-*.py[co]
 %{py_libdir}/__pycache__/posixpath.cpython-*.py[co]
-%{py_libdir}/__pycache__/re.cpython-*.py[co]
 %{py_libdir}/__pycache__/reprlib.cpython-*.py[co]
 %{py_libdir}/__pycache__/site.cpython-*.py[co]
 %{py_libdir}/__pycache__/sre_*.cpython-*.py[co]
@@ -795,27 +788,25 @@ rm -rf $RPM_BUILD_ROOT
 %defattr(644,root,root,755)
 %config(noreplace) %verify(not md5 mtime size) /etc/shrc.d/python*-modules*
 %{py_libdir}/__future__.py
-%{py_libdir}/__phello__.foo.py
+%{py_libdir}/__hello__.py
 %{py_libdir}/_aix_support.py
-%{py_libdir}/_bootsubprocess.py
 %{py_libdir}/_compat_pickle.py
 %{py_libdir}/_compression.py
 %{py_libdir}/_markupbase.py
 %{py_libdir}/_osx_support.py
 %{py_libdir}/_pydecimal.py
 %{py_libdir}/_py_abc.py
+%{py_libdir}/_pydatetime.py
 %{py_libdir}/_pyio.py
+%{py_libdir}/_pylong.py
 %{py_libdir}/_strptime.py
 %{py_libdir}/_threading_local.py
 %{py_libdir}/aifc.py
 %{py_libdir}/antigravity.py
 %{py_libdir}/argparse.py
 %{py_libdir}/ast.py
-%{py_libdir}/asynchat.py
-%{py_libdir}/asyncore.py
 %{py_libdir}/base64.py
 %{py_libdir}/bdb.py
-%{py_libdir}/binhex.py
 %{py_libdir}/bz2.py
 %{py_libdir}/cProfile.py
 %{py_libdir}/calendar.py
@@ -854,7 +845,6 @@ rm -rf $RPM_BUILD_ROOT
 %{py_libdir}/hmac.py
 %{py_libdir}/imaplib.py
 %{py_libdir}/imghdr.py
-%{py_libdir}/imp.py
 %{py_libdir}/inspect.py
 %{py_libdir}/ipaddress.py
 %{py_libdir}/lzma.py
@@ -896,7 +886,6 @@ rm -rf $RPM_BUILD_ROOT
 %{py_libdir}/shlex.py
 %{py_libdir}/shutil.py
 %{py_libdir}/signal.py
-%{py_libdir}/smtpd.py
 %{py_libdir}/smtplib.py
 %{py_libdir}/sndhdr.py
 %{py_libdir}/socket.py
@@ -928,30 +917,27 @@ rm -rf $RPM_BUILD_ROOT
 %{py_libdir}/webbrowser.py
 %{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__/__hello__.cpython-*.py[co]
 %{py_libdir}/__pycache__/_aix_support.cpython-*.py[co]
-%{py_libdir}/__pycache__/_bootsubprocess.cpython-*.py[co]
 %{py_libdir}/__pycache__/_compat_pickle.cpython-*.py[co]
 %{py_libdir}/__pycache__/_compression.cpython-*.py[co]
 %{py_libdir}/__pycache__/_markupbase.cpython-*.py[co]
 %{py_libdir}/__pycache__/_osx_support.cpython-*.py[co]
 %{py_libdir}/__pycache__/_pydecimal.cpython-*.py[co]
 %{py_libdir}/__pycache__/_py_abc.cpython-*.py[co]
+%{py_libdir}/__pycache__/_pydatetime.cpython-*.py[co]
 %{py_libdir}/__pycache__/_pyio.cpython-*.py[co]
+%{py_libdir}/__pycache__/_pylong.cpython-*.py[co]
 %{py_libdir}/__pycache__/_strptime.cpython-*.py[co]
 %{py_libdir}/__pycache__/_threading_local.cpython-*.py[co]
 %{py_libdir}/__pycache__/aifc.cpython-*.py[co]
 %{py_libdir}/__pycache__/antigravity.cpython-*.py[co]
 %{py_libdir}/__pycache__/argparse.cpython-*.py[co]
 %{py_libdir}/__pycache__/ast.cpython-*.py[co]
-%{py_libdir}/__pycache__/asynchat.cpython-*.py[co]
-%{py_libdir}/__pycache__/asyncore.cpython-*.py[co]
 %{py_libdir}/__pycache__/base64.cpython-*.py[co]
 %{py_libdir}/__pycache__/bdb.cpython-*.py[co]
-%{py_libdir}/__pycache__/binhex.cpython-*.py[co]
 %{py_libdir}/__pycache__/bz2.cpython-*.py[co]
 %{py_libdir}/__pycache__/cProfile.cpython-*.py[co]
 %{py_libdir}/__pycache__/calendar.cpython-*.py[co]
@@ -990,7 +976,6 @@ rm -rf $RPM_BUILD_ROOT
 %{py_libdir}/__pycache__/hmac.cpython-*.py[co]
 %{py_libdir}/__pycache__/imaplib.cpython-*.py[co]
 %{py_libdir}/__pycache__/imghdr.cpython-*.py[co]
-%{py_libdir}/__pycache__/imp.cpython-*.py[co]
 %{py_libdir}/__pycache__/inspect.cpython-*.py[co]
 %{py_libdir}/__pycache__/ipaddress.cpython-*.py[co]
 %{py_libdir}/__pycache__/lzma.cpython-*.py[co]
@@ -1032,7 +1017,6 @@ rm -rf $RPM_BUILD_ROOT
 %{py_libdir}/__pycache__/shlex.cpython-*.py[co]
 %{py_libdir}/__pycache__/shutil.cpython-*.py[co]
 %{py_libdir}/__pycache__/signal.cpython-*.py[co]
-%{py_libdir}/__pycache__/smtpd.cpython-*.py[co]
 %{py_libdir}/__pycache__/smtplib.cpython-*.py[co]
 %{py_libdir}/__pycache__/sndhdr.cpython-*.py[co]
 %{py_libdir}/__pycache__/socket.cpython-*.py[co]
@@ -1064,7 +1048,6 @@ rm -rf $RPM_BUILD_ROOT
 %{py_libdir}/__pycache__/webbrowser.cpython-*.py[co]
 %{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]
 
 #
@@ -1109,6 +1092,7 @@ rm -rf $RPM_BUILD_ROOT
 %attr(755,root,root) %{py_dyndir}/_queue.cpython-*.so
 %attr(755,root,root) %{py_dyndir}/_random.cpython-*.so
 %attr(755,root,root) %{py_dyndir}/_sha1.cpython-*.so
+%attr(755,root,root) %{py_dyndir}/_sha2.cpython-*.so
 %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
@@ -1119,16 +1103,11 @@ rm -rf $RPM_BUILD_ROOT
 %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}/_testsinglephase.cpython-*.so
 %attr(755,root,root) %{py_dyndir}/_uuid.cpython-*.so
+%attr(755,root,root) %{py_dyndir}/_xxinterpchannels.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
-%if "%{pld_release}" != "ac"
-%attr(755,root,root) %{py_dyndir}/_sha256.cpython-*.so
-%attr(755,root,root) %{py_dyndir}/_sha512.cpython-*.so
-%endif
-
 %attr(755,root,root) %{py_dyndir}/array.cpython-*.so
 %attr(755,root,root) %{py_dyndir}/audioop.cpython-*.so
 %attr(755,root,root) %{py_dyndir}/binascii.cpython-*.so
@@ -1147,8 +1126,11 @@ rm -rf $RPM_BUILD_ROOT
 %attr(755,root,root) %{py_dyndir}/termios.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}/xxsubtype.cpython-*.so
 %attr(755,root,root) %{py_dyndir}/zlib.cpython-*.so
 
+%{py_libdir}/__phello__
+
 %dir %{py_libdir}/asyncio
 %{py_libdir}/asyncio/__pycache__
 %{py_libdir}/asyncio/*.py
@@ -1172,15 +1154,6 @@ rm -rf $RPM_BUILD_ROOT
 %{py_libdir}/dbm/__pycache__
 %{py_libdir}/dbm/*.py
 
-%dir %{py_libdir}/distutils
-%dir %{py_libdir}/distutils/command
-%doc %{py_libdir}/distutils/README
-%{py_libdir}/distutils/__pycache__
-%{py_libdir}/distutils/command/__pycache__
-%{py_libdir}/distutils/*.py
-%{py_libdir}/distutils/command/*.py
-%{py_libdir}/distutils/command/command_template
-
 %dir %{py_libdir}/email
 %dir %{py_libdir}/email/mime
 %{py_libdir}/email/__pycache__
@@ -1210,6 +1183,7 @@ rm -rf $RPM_BUILD_ROOT
 %dir %{py_libdir}/importlib/metadata
 %{py_libdir}/importlib/metadata/__pycache__
 %{py_libdir}/importlib/metadata/*.py
+%{py_libdir}/importlib/resources
 
 %dir %{py_libdir}/json
 %{py_libdir}/json/__pycache__
@@ -1226,6 +1200,8 @@ rm -rf $RPM_BUILD_ROOT
 %{py_libdir}/multiprocessing/dummy/__pycache__
 %{py_libdir}/multiprocessing/dummy/*.py
 
+%{py_libdir}/re
+%{py_libdir}/tomllib
 %{py_libdir}/turtledemo
 
 %dir %{py_libdir}/unittest
@@ -1271,6 +1247,8 @@ rm -rf $RPM_BUILD_ROOT
 %{py_libdir}/xmlrpc/__pycache__
 %{py_libdir}/xmlrpc/*.py
 
+%{py_libdir}/zipfile
+
 %attr(755,root,root) %{py_dyndir}/_sqlite3.cpython-*.so
 %dir %{py_libdir}/sqlite3
 %{py_libdir}/sqlite3/__pycache__
@@ -1369,12 +1347,6 @@ rm -rf $RPM_BUILD_ROOT
 %defattr(644,root,root,755)
 %{py_libdir}/idlelib/idle_test
 %{py_libdir}/test
-%{py_libdir}/ctypes/test
-%{py_libdir}/distutils/tests
-%{py_libdir}/lib2to3/tests
-%{py_libdir}/sqlite3/test
-%{py_libdir}/tkinter/test
-%{py_libdir}/unittest/test
 
 %if %{with info}
 %files doc-info
This page took 0.189218 seconds and 4 git commands to generate.