diff options
author | CoprDistGit <infra@openeuler.org> | 2024-10-24 04:11:04 +0000 |
---|---|---|
committer | CoprDistGit <infra@openeuler.org> | 2024-10-24 04:11:04 +0000 |
commit | d83fa8360c587fda79e9cbed0430f40120ad20d8 (patch) | |
tree | f8a2ab4a47cb781a86333cdf9cbb32f9ec860a40 | |
parent | 334db9062e911271c9a1571b49b76b21a57ef3dc (diff) |
automatic import of python3
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | 00001-rpath.patch | 30 | ||||
-rw-r--r-- | 0001-add-loongarch64-support-for-python.patch | 24 | ||||
-rw-r--r-- | 00251-change-user-install-location.patch | 204 | ||||
-rw-r--r-- | add-the-sm3-method-for-obtaining-the-salt-value.patch | 34 | ||||
-rw-r--r-- | pyconfig.h | 9 | ||||
-rw-r--r-- | python3.spec | 1187 | ||||
-rw-r--r-- | sources | 1 |
8 files changed, 1490 insertions, 0 deletions
@@ -0,0 +1 @@ +/Python-3.11.10.tar.xz diff --git a/00001-rpath.patch b/00001-rpath.patch new file mode 100644 index 0000000..778c077 --- /dev/null +++ b/00001-rpath.patch @@ -0,0 +1,30 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: David Malcolm <dmalcolm@redhat.com> +Date: Wed, 13 Jan 2010 21:25:18 +0000 +Subject: [PATCH] 00001: Fixup distutils/unixccompiler.py to remove standard + library path from rpath Was Patch0 in ivazquez' python3000 specfile + +--- + Lib/distutils/unixccompiler.py | 9 +++++++++ + 1 file changed, 9 insertions(+) + +diff --git a/Lib/distutils/unixccompiler.py b/Lib/distutils/unixccompiler.py +index d00c48981e..0283a28c19 100644 +--- a/Lib/distutils/unixccompiler.py ++++ b/Lib/distutils/unixccompiler.py +@@ -82,6 +82,15 @@ class UnixCCompiler(CCompiler): + if sys.platform == "cygwin": + exe_extension = ".exe" + ++ def _fix_lib_args(self, libraries, library_dirs, runtime_library_dirs): ++ """Remove standard library path from rpath""" ++ libraries, library_dirs, runtime_library_dirs = super()._fix_lib_args( ++ libraries, library_dirs, runtime_library_dirs) ++ libdir = sysconfig.get_config_var('LIBDIR') ++ if runtime_library_dirs and (libdir in runtime_library_dirs): ++ runtime_library_dirs.remove(libdir) ++ return libraries, library_dirs, runtime_library_dirs ++ + def preprocess(self, source, output_file=None, macros=None, + include_dirs=None, extra_preargs=None, extra_postargs=None): + fixed_args = self._fix_compile_args(None, macros, include_dirs) diff --git a/0001-add-loongarch64-support-for-python.patch b/0001-add-loongarch64-support-for-python.patch new file mode 100644 index 0000000..8cba5ee --- /dev/null +++ b/0001-add-loongarch64-support-for-python.patch @@ -0,0 +1,24 @@ +From cd9f19a56816985d05f132319874f6697d7da872 Mon Sep 17 00:00:00 2001 +From: Wenlong Zhang <zhangwenlong@loongson.cn> +Date: Mon, 26 Feb 2024 03:25:24 +0000 +Subject: [PATCH] add loongarch64 support for python + +--- + configure.ac | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/configure.ac b/configure.ac +index e1cbb7c..1b8c272 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -968,6 +968,8 @@ cat > conftest.c <<EOF + hppa-linux-gnu + # elif defined(__ia64__) + ia64-linux-gnu ++# elif defined(__loongarch64) ++ loongarch64-linux-gnu + # elif defined(__m68k__) && !defined(__mcoldfire__) + m68k-linux-gnu + # elif defined(__mips_hard_float) && defined(__mips_isa_rev) && (__mips_isa_rev >=6) && defined(_MIPSEL) +-- +2.43.0 diff --git a/00251-change-user-install-location.patch b/00251-change-user-install-location.patch new file mode 100644 index 0000000..53096ec --- /dev/null +++ b/00251-change-user-install-location.patch @@ -0,0 +1,204 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= <miro@hroncok.cz> +Date: Mon, 15 Feb 2021 12:19:27 +0100 +Subject: [PATCH] 00251: Change user install location +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Set values of base and platbase in sysconfig from /usr +to /usr/local when RPM build is not detected +to make pip and similar tools install into separate location. + +Set values of prefix and exec_prefix in distutils install command +to /usr/local if executable is /usr/bin/python* and RPM build +is not detected to make distutils and pypa/distutils install into separate location. + +Fedora Change: https://fedoraproject.org/wiki/Changes/Making_sudo_pip_safe +Downstream only. + +We've tried to rework in Fedora 36/Python 3.10 to follow https://bugs.python.org/issue43976 +but we have identified serious problems with that approach, +see https://bugzilla.redhat.com/2026979 or https://bugzilla.redhat.com/2097183 + +pypa/distutils integration: https://github.com/pypa/distutils/pull/70 + +Co-authored-by: Petr Viktorin <encukou@gmail.com> +Co-authored-by: Miro Hrončok <miro@hroncok.cz> +Co-authored-by: Michal Cyprian <m.cyprian@gmail.com> +Co-authored-by: Lumír Balhar <frenzy.madness@gmail.com> +--- + Lib/distutils/command/install.py | 8 ++++-- + Lib/site.py | 9 +++++- + Lib/sysconfig.py | 49 +++++++++++++++++++++++++++++++- + Lib/test/test_sysconfig.py | 17 +++++++++-- + 4 files changed, 77 insertions(+), 6 deletions(-) + +diff --git a/Lib/distutils/command/install.py b/Lib/distutils/command/install.py +index 01d5331a63..79f70f0de4 100644 +--- a/Lib/distutils/command/install.py ++++ b/Lib/distutils/command/install.py +@@ -159,6 +159,8 @@ class install(Command): + + negative_opt = {'no-compile' : 'compile'} + ++ # Allow Fedora to add components to the prefix ++ _prefix_addition = getattr(sysconfig, '_prefix_addition', '') + + def initialize_options(self): + """Initializes options.""" +@@ -441,8 +443,10 @@ def finalize_unix(self): + raise DistutilsOptionError( + "must not supply exec-prefix without prefix") + +- self.prefix = os.path.normpath(sys.prefix) +- self.exec_prefix = os.path.normpath(sys.exec_prefix) ++ self.prefix = ( ++ os.path.normpath(sys.prefix) + self._prefix_addition) ++ self.exec_prefix = ( ++ os.path.normpath(sys.exec_prefix) + self._prefix_addition) + + else: + if self.exec_prefix is None: +diff --git a/Lib/site.py b/Lib/site.py +index 69670d9d7f..104cb93899 100644 +--- a/Lib/site.py ++++ b/Lib/site.py +@@ -377,8 +377,15 @@ def getsitepackages(prefixes=None): + return sitepackages + + def addsitepackages(known_paths, prefixes=None): +- """Add site-packages to sys.path""" ++ """Add site-packages to sys.path ++ ++ '/usr/local' is included in PREFIXES if RPM build is not detected ++ to make packages installed into this location visible. ++ ++ """ + _trace("Processing global site-packages") ++ if ENABLE_USER_SITE and 'RPM_BUILD_ROOT' not in os.environ: ++ PREFIXES.insert(0, "/usr/local") + for sitedir in getsitepackages(prefixes): + if os.path.isdir(sitedir): + addsitedir(sitedir, known_paths) +diff --git a/Lib/sysconfig.py b/Lib/sysconfig.py +index ebe3711827..55af57b335 100644 +--- a/Lib/sysconfig.py ++++ b/Lib/sysconfig.py +@@ -103,6 +103,11 @@ + else: + _INSTALL_SCHEMES['venv'] = _INSTALL_SCHEMES['posix_venv'] + ++# For a brief period of time in the Fedora 36 life cycle, ++# this installation scheme existed and was documented in the release notes. ++# For backwards compatibility, we keep it here (at least on 3.10 and 3.11). ++_INSTALL_SCHEMES['rpm_prefix'] = _INSTALL_SCHEMES['posix_prefix'] ++ + + # NOTE: site.py has copy of this function. + # Sync it when modify this function. +@@ -162,6 +167,19 @@ def joinuser(*args): + }, + } + ++# This is used by distutils.command.install in the stdlib ++# as well as pypa/distutils (e.g. bundled in setuptools). ++# The self.prefix value is set to sys.prefix + /local/ ++# if neither RPM build nor virtual environment is ++# detected to make distutils install packages ++# into the separate location. ++# https://fedoraproject.org/wiki/Changes/Making_sudo_pip_safe ++if (not (hasattr(sys, 'real_prefix') or ++ sys.prefix != sys.base_prefix) and ++ 'RPM_BUILD_ROOT' not in os.environ): ++ _prefix_addition = '/local' ++ ++ + _SCHEME_KEYS = ('stdlib', 'platstdlib', 'purelib', 'platlib', 'include', + 'scripts', 'data') + +@@ -258,11 +276,40 @@ def _extend_dict(target_dict, other_dict): + target_dict[key] = value + + ++_CONFIG_VARS_LOCAL = None ++ ++ ++def _config_vars_local(): ++ # This function returns the config vars with prefixes amended to /usr/local ++ # https://fedoraproject.org/wiki/Changes/Making_sudo_pip_safe ++ global _CONFIG_VARS_LOCAL ++ if _CONFIG_VARS_LOCAL is None: ++ _CONFIG_VARS_LOCAL = dict(get_config_vars()) ++ _CONFIG_VARS_LOCAL['base'] = '/usr/local' ++ _CONFIG_VARS_LOCAL['platbase'] = '/usr/local' ++ return _CONFIG_VARS_LOCAL ++ ++ + def _expand_vars(scheme, vars): + res = {} + if vars is None: + vars = {} +- _extend_dict(vars, get_config_vars()) ++ ++ # when we are not in a virtual environment or an RPM build ++ # we change '/usr' to '/usr/local' ++ # to avoid surprises, we explicitly check for the /usr/ prefix ++ # Python virtual environments have different prefixes ++ # we only do this for posix_prefix, not to mangle the venv scheme ++ # posix_prefix is used by sudo pip install ++ # we only change the defaults here, so explicit --prefix will take precedence ++ # https://fedoraproject.org/wiki/Changes/Making_sudo_pip_safe ++ if (scheme == 'posix_prefix' and ++ _PREFIX == '/usr' and ++ 'RPM_BUILD_ROOT' not in os.environ): ++ _extend_dict(vars, _config_vars_local()) ++ else: ++ _extend_dict(vars, get_config_vars()) ++ + if os.name == 'nt': + # On Windows we want to substitute 'lib' for schemes rather + # than the native value (without modifying vars, in case it +diff --git a/Lib/test/test_sysconfig.py b/Lib/test/test_sysconfig.py +index d96371d242..72b028435f 100644 +--- a/Lib/test/test_sysconfig.py ++++ b/Lib/test/test_sysconfig.py +@@ -111,8 +111,19 @@ def test_get_path(self): + for scheme in _INSTALL_SCHEMES: + for name in _INSTALL_SCHEMES[scheme]: + expected = _INSTALL_SCHEMES[scheme][name].format(**config_vars) ++ tested = get_path(name, scheme) ++ # https://fedoraproject.org/wiki/Changes/Making_sudo_pip_safe ++ if tested.startswith('/usr/local'): ++ # /usr/local should only be used in posix_prefix ++ self.assertEqual(scheme, 'posix_prefix') ++ # Fedora CI runs tests for venv and virtualenv that check for other prefixes ++ self.assertEqual(sys.prefix, '/usr') ++ # When building the RPM of Python, %check runs this with RPM_BUILD_ROOT set ++ # Fedora CI runs this with RPM_BUILD_ROOT unset ++ self.assertNotIn('RPM_BUILD_ROOT', os.environ) ++ tested = tested.replace('/usr/local', '/usr') + self.assertEqual( +- os.path.normpath(get_path(name, scheme)), ++ os.path.normpath(tested), + os.path.normpath(expected), + ) + +@@ -336,7 +347,7 @@ def test_get_config_h_filename(self): + self.assertTrue(os.path.isfile(config_h), config_h) + + def test_get_scheme_names(self): +- wanted = ['nt', 'posix_home', 'posix_prefix', 'posix_venv', 'nt_venv', 'venv'] ++ wanted = ['nt', 'posix_home', 'posix_prefix', 'posix_venv', 'nt_venv', 'venv', 'rpm_prefix'] + if HAS_USER_BASE: + wanted.extend(['nt_user', 'osx_framework_user', 'posix_user']) + self.assertEqual(get_scheme_names(), tuple(sorted(wanted))) +@@ -348,6 +359,8 @@ def test_symlink(self): # Issue 7880 + cmd = "-c", "import sysconfig; print(sysconfig.get_platform())" + self.assertEqual(py.call_real(*cmd), py.call_link(*cmd)) + ++ @unittest.skipIf('RPM_BUILD_ROOT' not in os.environ, ++ "Test doesn't expect Fedora's paths") + def test_user_similar(self): + # Issue #8759: make sure the posix scheme for the users + # is similar to the global posix_prefix one diff --git a/add-the-sm3-method-for-obtaining-the-salt-value.patch b/add-the-sm3-method-for-obtaining-the-salt-value.patch new file mode 100644 index 0000000..5033820 --- /dev/null +++ b/add-the-sm3-method-for-obtaining-the-salt-value.patch @@ -0,0 +1,34 @@ +From 1e245b53ec5ae96ca6ad11edd72b812f9ae0d141 Mon Sep 17 00:00:00 2001 +From: hanxinke <hanxinke@huawei.com> +Date: Tue, 3 Aug 2021 09:34:30 +0800 +Subject: [PATCH] add the sm3 method for obtaining the salt value + +Signed-off-by: hanxinke <hanxinke@huawei.com> +--- + Lib/crypt.py | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/Lib/crypt.py b/Lib/crypt.py +index 33dbc46..3a7cea1 100644 +--- a/Lib/crypt.py ++++ b/Lib/crypt.py +@@ -55,7 +55,7 @@ def mksalt(method=None, *, rounds=None): + if not 4 <= log_rounds <= 31: + raise ValueError('rounds out of the range 2**4 to 2**31') + s += f'{log_rounds:02d}$' +- elif method.ident in ('5', '6'): # SHA-2 ++ elif method.ident in ('5', '6', 'sm3'): # SHA-2 and sm3 + if rounds is not None: + if not 1000 <= rounds <= 999_999_999: + raise ValueError('rounds out of the range 1000 to 999_999_999') +@@ -117,4 +117,7 @@ for _v in 'b', 'y', 'a', '': + _add_method('MD5', '1', 8, 34) + _add_method('CRYPT', None, 2, 13) + ++# support the sm3 method ++_add_method('SM3', 'sm3', 16, 63) ++ + del _v, _add_method +-- +1.8.3.1 + diff --git a/pyconfig.h b/pyconfig.h new file mode 100644 index 0000000..78bc6bb --- /dev/null +++ b/pyconfig.h @@ -0,0 +1,9 @@ +#include <bits/wordsize.h> + +#if __WORDSIZE == 32 +#include "pyconfig-32.h" +#elif __WORDSIZE == 64 +#include "pyconfig-64.h" +#else +#error "Unknown word size" +#endif diff --git a/python3.spec b/python3.spec new file mode 100644 index 0000000..1ab4d98 --- /dev/null +++ b/python3.spec @@ -0,0 +1,1187 @@ +Name: python3 +Summary: Interpreter of the Python3 programming language +URL: https://www.python.org/ + +Version: 3.11.10 +Release: 2 +License: Python-2.0 + +%global branchversion 3.11 +%global pyshortver 311 + +%ifarch %{ix86} x86_64 aarch64 riscv64 +%bcond_without optimizations +%else +%bcond_with optimizations +%endif + +%global pylibdir %{_libdir}/python%{branchversion} +%global dynload_dir %{pylibdir}/lib-dynload + +%global LDVERSION_optimized %{branchversion} +%global LDVERSION_debug %{branchversion}d + +%ifarch ppc64le +%define _arch powerpc64le +%endif + +%global SOABI_optimized cpython-%{pyshortver}-%{_arch}-linux%{_gnu} +%global SOABI_debug cpython-%{pyshortver}d-%{_arch}-linux%{_gnu} + +# See http://www.python.org/dev/peps/pep-3147/ +%global bytecode_suffixes .cpython-%{pyshortver}*.pyc + +%global py_INSTSONAME_optimized libpython%{LDVERSION_optimized}.so.1.0 +%global py_INSTSONAME_debug libpython%{LDVERSION_debug}.so.1.0 + +%undefine py_auto_byte_compile + +%global wordsize 64 + +BuildRequires: autoconf +BuildRequires: bluez-libs-devel +BuildRequires: bzip2 +BuildRequires: bzip2-devel +BuildRequires: desktop-file-utils +BuildRequires: expat-devel + +BuildRequires: findutils +BuildRequires: gcc-c++ +BuildRequires: gcc +BuildRequires: gdbm-devel +BuildRequires: glibc-all-langpacks +BuildRequires: glibc-devel +BuildRequires: gmp-devel +BuildRequires: libappstream-glib +BuildRequires: libffi-devel +BuildRequires: libnsl2-devel +BuildRequires: libtirpc-devel +BuildRequires: libGL-devel +BuildRequires: libuuid-devel +BuildRequires: libX11-devel +BuildRequires: ncurses-devel + +BuildRequires: openssl-devel +BuildRequires: pkgconfig +BuildRequires: readline-devel +BuildRequires: system-rpm-config +BuildRequires: sqlite-devel + +BuildRequires: tar +BuildRequires: tcl-devel +BuildRequires: tix-devel +BuildRequires: tk-devel + +%ifarch %{valgrind_arches} +BuildRequires: valgrind-devel +%endif + +BuildRequires: xz-devel +BuildRequires: zlib-devel + +BuildRequires: systemtap-sdt-devel + +BuildRequires: net-tools + +BuildRequires: python-setuptools-wheel +BuildRequires: python-pip-wheel +BuildRequires: openEuler-rpm-config >= 31-6 + +Source: https://www.python.org/ftp/python/%{version}/Python-%{version}.tar.xz +Source1: pyconfig.h + +Patch1: 00001-rpath.patch +Patch251: 00251-change-user-install-location.patch + +Patch9000: add-the-sm3-method-for-obtaining-the-salt-value.patch +Patch9001: 0001-add-loongarch64-support-for-python.patch + +Provides: python%{branchversion} = %{version}-%{release} +Provides: python(abi) = %{branchversion} + +Provides: python%{pyshortver} = %{version}-%{release} +Obsoletes: python%{pyshortver} + +Requires: python-setuptools-wheel +Requires: python-pip-wheel +Provides: python3-libs +Obsoletes: python3-libs +Provides: python3-enum34 = 1.0.4-5 +Obsoletes: python3-enum34 < 1.0.4-5 +Obsoletes: python36 + +Recommends: python3-setuptools +Recommends: python3-pip + +%global __requires_exclude ^/usr/bin/python3 + +%description +Python combines remarkable power with very clear syntax. It has modules, +classes, exceptions, very high level dynamic data types, and dynamic +typing. There are interfaces to many system calls and libraries, as well +as to various windowing systems. New built-in modules are easily written +in C or C++ (or other languages, depending on the chosen implementation). +Python is also usable as an extension language for applications written +in other languages that need easy-to-use scripting or automation interfaces. + +This package Provides python version 3. + +%package -n python3-unversioned-command +Summary: The "python" command that runs Python 3 +Requires: %{name} = %{version}-%{release} +Provides: python = %{version}-%{release} +Conflicts: python2 +%description -n python3-unversioned-command +This package contains /usr/bin/python - the "python" command that runs Python 3. + +%package devel +Summary: Libraries and header files needed for Python development +Requires: %{name} = %{version}-%{release} +BuildRequires: python-rpm-macros +Requires: python-rpm-macros +Requires: python3-rpm-macros +Requires: python3-rpm-generators +Requires: python3-setuptools +Provides: %{name}-2to3 = %{version}-%{release} +Provides: 2to3 = %{version}-%{release} +Conflicts: %{name} < %{version}-%{release} +Provides: python3-idle +Obsoletes: python3-idle +Provides: python3-test +Obsoletes: python3-test +Provides: %{name}-tools = %{version}-%{release} +Obsoletes: %{name}-tools < %{version}-%{release} + +%description devel +This package contains the header files and configuration needed to develop +python3 modules. + +%package tkinter +Summary: A GUI toolkit for Python +Requires: %{name} = %{version}-%{release} +Provides: %{name}-turtle = %{version}-%{release} +Provides: %{name}-tkinter = %{version}-%{release} + +%description tkinter +The Tkinter (Tk interface) library is a graphical user interface toolkit for +the Python programming language. + +%package debug +Summary: Debug version of the Python runtime + +Requires: %{name} = %{version}-%{release} +Requires: %{name}-devel = %{version}-%{release} +Requires: %{name}-tkinter = %{version}-%{release} + +%description debug +python3-debug provides a version of the Python runtime with numerous debugging +features enabled, aimed at advanced Python users such as developers of Python +extension modules. + +%package_help + +%prep +%autosetup -n Python-%{version} -p1 +find -name '*.exe' -print -delete +rm -r Modules/expat +rm Lib/ensurepip/_bundled/*.whl +rm configure pyconfig.h.in + +%build +autoconf +autoheader + +topdir=$(pwd) + +%if %{with optimizations} +%global optimizations_flag "--enable-optimizations" +%else +%global optimizations_flag "--disable-optimizations" +%endif + +%if "%toolchain" == "clang" +%global extra_cflags "-gdwarf-4" +%endif + +export CFLAGS="%{extension_cflags} %{?extra_cflags} -D_GNU_SOURCE -fPIC -fwrapv -fstack-protector-strong -D_FORTIFY_SOURCE=2 -O2" +export CFLAGS_NODIST="%{build_cflags} %{?extra_cflags} -D_GNU_SOURCE -fPIC -fwrapv" +export CXXFLAGS="%{extension_cxxflags} -D_GNU_SOURCE -fPIC -fwrapv" +export CPPFLAGS="$(pkg-config --cflags-only-I libffi)" +export OPT="%{extension_cflags} %{?extra_cflags} -D_GNU_SOURCE -fPIC -fwrapv" +%if "%toolchain" == "clang" +export LINKCC="clang" +%else +export LINKCC="gcc" +%endif +export CFLAGS="$CFLAGS $(pkg-config --cflags openssl)" +export LDFLAGS="%{extension_ldflags} -g $(pkg-config --libs-only-L openssl)" +export LDFLAGS_NODIST="%{build_ldflags} -g $(pkg-config --libs-only-L openssl)" + +DebugBuildDir=build/debug +mkdir -p ${DebugBuildDir} +pushd ${DebugBuildDir} + +%global _configure $topdir/configure + +%configure \ + --with-platlibdir=%{_lib} \ + --without-static-libpython \ + --with-wheel-pkg-dir=%{_datadir}/python-wheels \ + --enable-ipv6 \ + --enable-shared \ + --with-computed-gotos=yes \ + --with-dbmliborder=gdbm:ndbm:bdb \ + --with-system-expat \ + --with-system-ffi \ + --enable-loadable-sqlite-extensions \ + --with-dtrace \ + --with-ssl-default-suites=openssl \ +%ifarch %{valgrind_arches} + --with-valgrind \ +%endif + --without-ensurepip \ +%if "%toolchain" == "gcc" + --with-lto \ +%endif + --with-pydebug + +%make_build EXTRA_CFLAGS="$CFLAGS -Og" + +popd + +OptimizedBuildDir=build/optimized +mkdir -p ${OptimizedBuildDir} +pushd ${OptimizedBuildDir} + +%global _configure $topdir/configure + +%configure \ + --with-platlibdir=%{_lib} \ + --without-static-libpython \ + --with-wheel-pkg-dir=%{_datadir}/python-wheels \ + --enable-ipv6 \ + --enable-shared \ + --with-computed-gotos=yes \ + --with-dbmliborder=gdbm:ndbm:bdb \ + --with-system-expat \ + --with-system-ffi \ + --enable-loadable-sqlite-extensions \ + --with-dtrace \ + --with-ssl-default-suites=openssl \ +%ifarch %{valgrind_arches} + --with-valgrind \ +%endif + --without-ensurepip \ +%if "%toolchain" == "gcc" + --with-lto \ +%endif + %{optimizations_flag} + +%make_build EXTRA_CFLAGS="$CFLAGS" + +popd + +%install + +topdir=$(pwd) + +DirHoldingGdbPy=%{_prefix}/lib/debug/%{_libdir} +mkdir -p %{buildroot}$DirHoldingGdbPy + +%global _pyconfig32_h pyconfig-32.h +%global _pyconfig64_h pyconfig-64.h +%global _pyconfig_h pyconfig-%{wordsize}.h + +DebugBuildDir=build/debug +mkdir -p ${DebugBuildDir} +pushd ${DebugBuildDir} +make DESTDIR=%{buildroot} INSTALL="install -p" EXTRA_CFLAGS="-O0" install +popd + +PathOfGdbPy=$DirHoldingGdbPy/%{py_INSTSONAME_debug}-%{version}-%{release}.%{_arch}.debug-gdb.py +cp Tools/gdb/libpython.py %{buildroot}$PathOfGdbPy + +mv %{buildroot}%{_bindir}/python%{LDVERSION_debug}-{,`uname -m`-}config +echo -e '#!/bin/sh\nexec `dirname $0`/python'%{LDVERSION_debug}'-`uname -m`-config "$@"' > \ + %{buildroot}%{_bindir}/python%{LDVERSION_debug}-config +echo '[ $? -eq 127 ] && echo "Could not find python'%{LDVERSION_debug}'-`uname -m`-config. Look around to see available arches." >&2' >> \ + %{buildroot}%{_bindir}/python%{LDVERSION_debug}-config + chmod +x %{buildroot}%{_bindir}/python%{LDVERSION_debug}-config + +mv %{buildroot}%{_includedir}/python%{LDVERSION_debug}/pyconfig.h \ + %{buildroot}%{_includedir}/python%{LDVERSION_debug}/%{_pyconfig_h} +install -D -m 0644 %{SOURCE1} %{buildroot}%{_includedir}/python%{LDVERSION_debug}/pyconfig.h + +OptimizedBuildDir=build/optimized +mkdir -p ${OptimizedBuildDir} +pushd ${OptimizedBuildDir} +make DESTDIR=%{buildroot} INSTALL="install -p" EXTRA_CFLAGS="" install +popd + +PathOfGdbPy=$DirHoldingGdbPy/%{py_INSTSONAME_optimized}-%{version}-%{release}.%{_arch}.debug-gdb.py +cp Tools/gdb/libpython.py %{buildroot}$PathOfGdbPy + +mv %{buildroot}%{_bindir}/python%{LDVERSION_optimized}-{,`uname -m`-}config +echo -e '#!/bin/sh\nexec `dirname $0`/python'%{LDVERSION_optimized}'-`uname -m`-config "$@"' > \ + %{buildroot}%{_bindir}/python%{LDVERSION_optimized}-config +echo '[ $? -eq 127 ] && echo "Could not find python'%{LDVERSION_optimized}'-`uname -m`-config. Look around to see available arches." >&2' >> \ + %{buildroot}%{_bindir}/python%{LDVERSION_optimized}-config + chmod +x %{buildroot}%{_bindir}/python%{LDVERSION_optimized}-config + +mv %{buildroot}%{_includedir}/python%{LDVERSION_optimized}/pyconfig.h \ + %{buildroot}%{_includedir}/python%{LDVERSION_optimized}/%{_pyconfig_h} +install -D -m 0644 %{SOURCE1} %{buildroot}%{_includedir}/python%{LDVERSION_optimized}/pyconfig.h +install -d -m 0755 %{buildroot}%{pylibdir}/site-packages/__pycache__ +install -d -m 0755 %{buildroot}%{_prefix}/lib/python%{branchversion}/site-packages/__pycache__ + +install -D -m 0644 Lib/idlelib/Icons/idle_16.png %{buildroot}%{_datadir}/icons/hicolor/16x16/apps/idle3.png +install -D -m 0644 Lib/idlelib/Icons/idle_32.png %{buildroot}%{_datadir}/icons/hicolor/32x32/apps/idle3.png +install -D -m 0644 Lib/idlelib/Icons/idle_48.png %{buildroot}%{_datadir}/icons/hicolor/48x48/apps/idle3.png + +sed -i -e "s/'pyconfig.h'/'%{_pyconfig_h}'/" \ + %{buildroot}%{pylibdir}/distutils/sysconfig.py \ + %{buildroot}%{pylibdir}/sysconfig.py + +cp -p Tools/scripts/pathfix.py %{buildroot}%{_bindir}/ + +for tool in pygettext msgfmt; do + cp -p Tools/i18n/${tool}.py %{buildroot}%{_bindir}/${tool}%{branchversion}.py + ln -s ${tool}%{branchversion}.py %{buildroot}%{_bindir}/${tool}3.py +done + +LD_LIBRARY_PATH=./build/optimized ./build/optimized/python \ + Tools/scripts/pathfix.py \ + -i "%{_bindir}/python%{branchversion}" -pn \ + %{buildroot} \ + %{buildroot}%{_bindir}/*%{branchversion}.py \ + %{?with_gdb_hooks:%{buildroot}$DirHoldingGdbPy/*.py} + +rm -rf %{buildroot}%{pylibdir}/test/test_tools + +find %{buildroot} -name \*.py \ + \( \( \! -perm /u+x,g+x,o+x -exec sed -e '/^#!/Q 0' -e 'Q 1' {} \; \ + -print -exec sed -i '1d' {} \; \) -o \( \ + -perm /u+x,g+x,o+x ! -exec grep -m 1 -q '^#!' {} \; \ + -exec chmod a-x {} \; \) \) + +find %{buildroot} -name \*.bat -exec rm {} \; + +find %{buildroot}/ -name "*~" -exec rm -f {} \; +find . -name "*~" -exec rm -f {} \; + +rm %{buildroot}%{pylibdir}/LICENSE.txt + +find %{buildroot} -type f -a -name "*.py" -print0 | \ + LD_LIBRARY_PATH="%{buildroot}%{dynload_dir}/:%{buildroot}%{_libdir}" \ + PYTHONPATH="%{buildroot}%{_libdir}/python%{branchversion} %{buildroot}%{_libdir}/python%{branchversion}/site-packages" \ + xargs -0 %{buildroot}%{_bindir}/python%{branchversion} -O -c 'import py_compile, sys; [py_compile.compile(f, dfile=f.partition("%{buildroot}")[2], optimize=opt) for opt in range(3) for f in sys.argv[1:]]' || : + +rm -rf %{buildroot}%{_bindir}/__pycache__ + +find %{buildroot} -perm 555 -exec chmod 755 {} \; + +ln -s \ + %{_bindir}/python%{LDVERSION_debug} \ + %{buildroot}%{_bindir}/python3-debug + +ln -s %{_bindir}/python3 %{buildroot}%{_bindir}/python + +mv %{buildroot}%{_bindir}/2to3-%{branchversion} %{buildroot}%{_bindir}/2to3 + +%check +topdir=$(pwd) + +BEP_WHITELIST_TMP="$BEP_WHITELIST" +BEP_GTDLIST_TMP="$BEP_GTDLIST" +export BEP_WHITELIST="python python-debug "$BEP_WHITELIST"" +export BEP_GTDLIST=`echo $BEP_GTDLIST | sed 's/ python / /g'` + +export OPENSSL_CONF=/non-existing-file + +LD_LIBRARY_PATH=$(pwd)/build/debug $(pwd)/build/debug/python -m test.pythoninfo + +WITHIN_PYTHON_RPM_BUILD= \ +LD_LIBRARY_PATH=$(pwd)/build/debug $(pwd)/build/debug/python -m test.regrtest \ + -wW --slowest -j0 --timeout 1800 \ + -x test_distutils \ + -x test_bdist_rpm \ + -x test_gdb \ + -x test_socket \ + -x test_asyncio \ + -i test_freeze_simple_script \ + -i test_check_probes \ + -i test_peg_generator + +export OPENSSL_CONF=/non-existing-file +LD_LIBRARY_PATH=$(pwd)/build/optimized $(pwd)/build/optimized/python -m test.pythoninfo + +WITHIN_PYTHON_RPM_BUILD= \ +LD_LIBRARY_PATH=$(pwd)/build/optimized $(pwd)/build/optimized/python -m test.regrtest \ + -wW --slowest -j0 --timeout 1800 \ + -x test_distutils \ + -x test_bdist_rpm \ + -x test_gdb \ + -x test_socket \ + -x test_asyncio \ + -i test_freeze_simple_script \ + -i test_check_probes \ + -i test_peg_generator + +export BEP_WHITELIST="$BEP_WHITELIST_TMP" +export BEP_GTDLIST="$BEP_GTDLIST_TMP" + +%files +%license LICENSE +%doc README.rst + +%{_bindir}/pydoc* +%{_bindir}/python3 + +%{_bindir}/python%{branchversion} + +%dir %{pylibdir} +%dir %{dynload_dir} + +%{pylibdir}/lib2to3 +%exclude %{pylibdir}/lib2to3/tests + +%dir %{pylibdir}/unittest/ +%dir %{pylibdir}/unittest/__pycache__/ +%{pylibdir}/unittest/*.py +%{pylibdir}/unittest/__pycache__/*%{bytecode_suffixes} + +%dir %{pylibdir}/asyncio/ +%dir %{pylibdir}/asyncio/__pycache__/ +%{pylibdir}/asyncio/*.py +%{pylibdir}/asyncio/__pycache__/*%{bytecode_suffixes} + +%dir %{pylibdir}/venv/ +%dir %{pylibdir}/venv/__pycache__/ +%{pylibdir}/venv/*.py +%{pylibdir}/venv/__pycache__/*%{bytecode_suffixes} +%{pylibdir}/venv/scripts + +%{pylibdir}/wsgiref +%{pylibdir}/xmlrpc + +%dir %{pylibdir}/ensurepip/ +%dir %{pylibdir}/ensurepip/__pycache__/ +%{pylibdir}/ensurepip/*.py +%{pylibdir}/ensurepip/__pycache__/*%{bytecode_suffixes} + +%exclude %{pylibdir}/ensurepip/_bundled + +%dir %{pylibdir}/__phello__/ +%dir %{pylibdir}/__phello__/__pycache__/ +%{pylibdir}/__phello__/*.py +%{pylibdir}/__phello__/__pycache__/*%{bytecode_suffixes} + +%dir %{pylibdir}/test/ +%dir %{pylibdir}/test/__pycache__/ +%dir %{pylibdir}/test/support/ +%dir %{pylibdir}/test/support/__pycache__/ +%{pylibdir}/test/__init__.py +%{pylibdir}/test/__pycache__/__init__%{bytecode_suffixes} +%{pylibdir}/test/support/*.py +%{pylibdir}/test/support/__pycache__/*%{bytecode_suffixes} + +%dir %{pylibdir}/concurrent/ +%dir %{pylibdir}/concurrent/__pycache__/ +%{pylibdir}/concurrent/*.py +%{pylibdir}/concurrent/__pycache__/*%{bytecode_suffixes} + +%dir %{pylibdir}/concurrent/futures/ +%dir %{pylibdir}/concurrent/futures/__pycache__/ +%{pylibdir}/concurrent/futures/*.py +%{pylibdir}/concurrent/futures/__pycache__/*%{bytecode_suffixes} + +%{pylibdir}/pydoc_data + +%{dynload_dir}/_blake2.%{SOABI_optimized}.so +%{dynload_dir}/_md5.%{SOABI_optimized}.so +%{dynload_dir}/_sha1.%{SOABI_optimized}.so +%{dynload_dir}/_sha256.%{SOABI_optimized}.so +%{dynload_dir}/_sha3.%{SOABI_optimized}.so +%{dynload_dir}/_sha512.%{SOABI_optimized}.so + +%{dynload_dir}/_asyncio.%{SOABI_optimized}.so +%{dynload_dir}/_bisect.%{SOABI_optimized}.so +%{dynload_dir}/_bz2.%{SOABI_optimized}.so +%{dynload_dir}/_codecs_cn.%{SOABI_optimized}.so +%{dynload_dir}/_codecs_hk.%{SOABI_optimized}.so +%{dynload_dir}/_codecs_iso2022.%{SOABI_optimized}.so +%{dynload_dir}/_codecs_jp.%{SOABI_optimized}.so +%{dynload_dir}/_codecs_kr.%{SOABI_optimized}.so +%{dynload_dir}/_codecs_tw.%{SOABI_optimized}.so +%{dynload_dir}/_contextvars.%{SOABI_optimized}.so +%{dynload_dir}/_crypt.%{SOABI_optimized}.so +%{dynload_dir}/_csv.%{SOABI_optimized}.so +%{dynload_dir}/_ctypes.%{SOABI_optimized}.so +%{dynload_dir}/_curses.%{SOABI_optimized}.so +%{dynload_dir}/_curses_panel.%{SOABI_optimized}.so +%{dynload_dir}/_dbm.%{SOABI_optimized}.so +%{dynload_dir}/_decimal.%{SOABI_optimized}.so +%{dynload_dir}/_elementtree.%{SOABI_optimized}.so +%{dynload_dir}/_gdbm.%{SOABI_optimized}.so +%{dynload_dir}/_hashlib.%{SOABI_optimized}.so +%{dynload_dir}/_heapq.%{SOABI_optimized}.so +%{dynload_dir}/_json.%{SOABI_optimized}.so +%{dynload_dir}/_lsprof.%{SOABI_optimized}.so +%{dynload_dir}/_lzma.%{SOABI_optimized}.so +%{dynload_dir}/_multibytecodec.%{SOABI_optimized}.so +%{dynload_dir}/_multiprocessing.%{SOABI_optimized}.so +%{dynload_dir}/_opcode.%{SOABI_optimized}.so +%{dynload_dir}/_pickle.%{SOABI_optimized}.so +%{dynload_dir}/_posixsubprocess.%{SOABI_optimized}.so +%{dynload_dir}/_queue.%{SOABI_optimized}.so +%{dynload_dir}/_random.%{SOABI_optimized}.so +%{dynload_dir}/_socket.%{SOABI_optimized}.so +%{dynload_dir}/_sqlite3.%{SOABI_optimized}.so +%{dynload_dir}/_ssl.%{SOABI_optimized}.so +%{dynload_dir}/_struct.%{SOABI_optimized}.so +%{dynload_dir}/_typing.%{SOABI_optimized}.so +%{dynload_dir}/array.%{SOABI_optimized}.so +%{dynload_dir}/audioop.%{SOABI_optimized}.so +%{dynload_dir}/binascii.%{SOABI_optimized}.so +%{dynload_dir}/cmath.%{SOABI_optimized}.so +%{dynload_dir}/_datetime.%{SOABI_optimized}.so +%{dynload_dir}/fcntl.%{SOABI_optimized}.so +%{dynload_dir}/grp.%{SOABI_optimized}.so +%{dynload_dir}/math.%{SOABI_optimized}.so +%{dynload_dir}/mmap.%{SOABI_optimized}.so +%{dynload_dir}/nis.%{SOABI_optimized}.so +%{dynload_dir}/ossaudiodev.%{SOABI_optimized}.so +%{dynload_dir}/_posixshmem.%{SOABI_optimized}.so +%{dynload_dir}/pyexpat.%{SOABI_optimized}.so +%{dynload_dir}/readline.%{SOABI_optimized}.so +%{dynload_dir}/resource.%{SOABI_optimized}.so +%{dynload_dir}/select.%{SOABI_optimized}.so +%{dynload_dir}/spwd.%{SOABI_optimized}.so +%{dynload_dir}/syslog.%{SOABI_optimized}.so +%{dynload_dir}/termios.%{SOABI_optimized}.so +%{dynload_dir}/_testmultiphase.%{SOABI_optimized}.so +%{dynload_dir}/unicodedata.%{SOABI_optimized}.so +%{dynload_dir}/_uuid.%{SOABI_optimized}.so +%{dynload_dir}/xxlimited.%{SOABI_optimized}.so +%{dynload_dir}/zlib.%{SOABI_optimized}.so +%{dynload_dir}/_statistics.%{SOABI_optimized}.so +%{dynload_dir}/_xxsubinterpreters.%{SOABI_optimized}.so +%{dynload_dir}/_zoneinfo.%{SOABI_optimized}.so +%{dynload_dir}/xxlimited_35.%{SOABI_optimized}.so +%{dynload_dir}/_testclinic.%{SOABI_optimized}.so + +%dir %{pylibdir}/site-packages/ +%dir %{pylibdir}/site-packages/__pycache__/ +%{pylibdir}/site-packages/README.txt +%{pylibdir}/*.py +%dir %{pylibdir}/__pycache__/ +%{pylibdir}/__pycache__/*%{bytecode_suffixes} + +%dir %{pylibdir}/collections/ +%dir %{pylibdir}/collections/__pycache__/ +%{pylibdir}/collections/*.py +%{pylibdir}/collections/__pycache__/*%{bytecode_suffixes} + +%dir %{pylibdir}/ctypes/ +%dir %{pylibdir}/ctypes/__pycache__/ +%{pylibdir}/ctypes/*.py +%{pylibdir}/ctypes/__pycache__/*%{bytecode_suffixes} +%{pylibdir}/ctypes/macholib + +%{pylibdir}/curses + +%dir %{pylibdir}/dbm/ +%dir %{pylibdir}/dbm/__pycache__/ +%{pylibdir}/dbm/*.py +%{pylibdir}/dbm/__pycache__/*%{bytecode_suffixes} + +%dir %{pylibdir}/distutils/ +%dir %{pylibdir}/distutils/__pycache__/ +%{pylibdir}/distutils/*.py +%{pylibdir}/distutils/__pycache__/*%{bytecode_suffixes} +%{pylibdir}/distutils/README +%{pylibdir}/distutils/command + +%dir %{pylibdir}/email/ +%dir %{pylibdir}/email/__pycache__/ +%{pylibdir}/email/*.py +%{pylibdir}/email/__pycache__/*%{bytecode_suffixes} +%{pylibdir}/email/mime +%doc %{pylibdir}/email/architecture.rst + +%{pylibdir}/encodings + +%{pylibdir}/html +%{pylibdir}/http + +%dir %{pylibdir}/importlib/ +%dir %{pylibdir}/importlib/__pycache__/ +%{pylibdir}/importlib/*.py +%{pylibdir}/importlib/__pycache__/*%{bytecode_suffixes} + +%dir %{pylibdir}/importlib/metadata/ +%dir %{pylibdir}/importlib/metadata/__pycache__/ +%{pylibdir}/importlib/metadata/*.py +%{pylibdir}/importlib/metadata/__pycache__/*%{bytecode_suffixes} + +%dir %{pylibdir}/importlib/resources/ +%dir %{pylibdir}/importlib/resources/__pycache__/ +%{pylibdir}/importlib/resources/*.py +%{pylibdir}/importlib/resources/__pycache__/*%{bytecode_suffixes} + +%dir %{pylibdir}/json/ +%dir %{pylibdir}/json/__pycache__/ +%{pylibdir}/json/*.py +%{pylibdir}/json/__pycache__/*%{bytecode_suffixes} + +%{pylibdir}/logging +%{pylibdir}/multiprocessing + +%dir %{pylibdir}/re/ +%dir %{pylibdir}/re/__pycache__/ +%{pylibdir}/re/*.py +%{pylibdir}/re/__pycache__/*%{bytecode_suffixes} + +%dir %{pylibdir}/tomllib/ +%dir %{pylibdir}/tomllib/__pycache__/ +%{pylibdir}/tomllib/*.py +%{pylibdir}/tomllib/__pycache__/*%{bytecode_suffixes} + +%dir %{pylibdir}/sqlite3/ +%dir %{pylibdir}/sqlite3/__pycache__/ +%{pylibdir}/sqlite3/*.py +%{pylibdir}/sqlite3/__pycache__/*%{bytecode_suffixes} + +%exclude %{pylibdir}/turtle.py +%exclude %{pylibdir}/__pycache__/turtle*%{bytecode_suffixes} + +%{pylibdir}/urllib +%{pylibdir}/xml +%{pylibdir}/zoneinfo + +%attr(0755,root,root) %dir %{_prefix}/lib/python%{branchversion} +%attr(0755,root,root) %dir %{_prefix}/lib/python%{branchversion}/site-packages +%attr(0755,root,root) %dir %{_prefix}/lib/python%{branchversion}/site-packages/__pycache__/ + +%dir %{pylibdir}/config-%{LDVERSION_optimized}-%{_arch}-linux%{_gnu}/ +%{pylibdir}/config-%{LDVERSION_optimized}-%{_arch}-linux%{_gnu}/Makefile +%dir %{_includedir}/python%{LDVERSION_optimized}/ +%{_includedir}/python%{LDVERSION_optimized}/%{_pyconfig_h} + +%{_libdir}/%{py_INSTSONAME_optimized} +%{_libdir}/libpython3.so + +%files -n python3-unversioned-command +%{_bindir}/python + +%files devel +%{_bindir}/2to3 + +%{pylibdir}/config-%{LDVERSION_optimized}-%{_arch}-linux%{_gnu}/* +%exclude %{pylibdir}/config-%{LDVERSION_optimized}-%{_arch}-linux%{_gnu}/Makefile +%exclude %{_includedir}/python%{LDVERSION_optimized}/%{_pyconfig_h} +%{_includedir}/python%{LDVERSION_optimized}/*.h +%{_includedir}/python%{LDVERSION_optimized}/internal/ +%{_includedir}/python%{LDVERSION_optimized}/cpython/ +%doc Misc/README.valgrind Misc/valgrind-python.supp Misc/gdbinit + +%{_bindir}/python3-config +%{_libdir}/pkgconfig/python3.pc +%{_libdir}/pkgconfig/python3-embed.pc +%{_bindir}/pathfix.py +%{_bindir}/pygettext3.py +%{_bindir}/msgfmt3.py + +%{_bindir}/pygettext%{branchversion}.py +%{_bindir}/msgfmt%{branchversion}.py + +%{_bindir}/python%{LDVERSION_optimized}-config +%{_bindir}/python%{LDVERSION_optimized}-*-config +%{_libdir}/libpython%{LDVERSION_optimized}.so +%{_libdir}/pkgconfig/python-%{LDVERSION_optimized}.pc +%{_libdir}/pkgconfig/python-%{LDVERSION_optimized}-embed.pc + +%{_bindir}/idle* +%{pylibdir}/idlelib + +%{_datadir}/icons/hicolor/*/apps/idle3.* + +%{pylibdir}/ctypes/test +%{pylibdir}/distutils/tests +%{pylibdir}/test +%exclude %{pylibdir}/test/capath +%exclude %{pylibdir}/test/*.pem +%exclude %{pylibdir}/test/*.crl +%{dynload_dir}/_ctypes_test.%{SOABI_optimized}.so +%{dynload_dir}/_testbuffer.%{SOABI_optimized}.so +%{dynload_dir}/_testcapi.%{SOABI_optimized}.so +%{dynload_dir}/_testinternalcapi.%{SOABI_optimized}.so +%{dynload_dir}/_testimportmultiple.%{SOABI_optimized}.so +%{dynload_dir}/_xxtestfuzz.%{SOABI_optimized}.so +%{pylibdir}/lib2to3/tests +%{pylibdir}/unittest/test + +%exclude %dir %{pylibdir}/test/ +%exclude %dir %{pylibdir}/test/__pycache__/ +%exclude %{pylibdir}/test/__init__.py +%exclude %{pylibdir}/test/__pycache__/__init__%{bytecode_suffixes} +%exclude %{pylibdir}/test/support/ + +%files tkinter +%{pylibdir}/tkinter +%{dynload_dir}/_tkinter.%{SOABI_optimized}.so +%{pylibdir}/turtle.py +%{pylibdir}/__pycache__/turtle*%{bytecode_suffixes} +%dir %{pylibdir}/turtledemo +%{pylibdir}/turtledemo/*.py +%{pylibdir}/turtledemo/*.cfg +%dir %{pylibdir}/turtledemo/__pycache__/ +%{pylibdir}/turtledemo/__pycache__/*%{bytecode_suffixes} + +%files debug +%{_bindir}/python3-debug + +%{_bindir}/python%{LDVERSION_debug} + +%{dynload_dir}/_blake2.%{SOABI_debug}.so +%{dynload_dir}/_md5.%{SOABI_debug}.so +%{dynload_dir}/_sha1.%{SOABI_debug}.so +%{dynload_dir}/_sha256.%{SOABI_debug}.so +%{dynload_dir}/_sha3.%{SOABI_debug}.so +%{dynload_dir}/_sha512.%{SOABI_debug}.so + +%{dynload_dir}/_asyncio.%{SOABI_debug}.so +%{dynload_dir}/_bisect.%{SOABI_debug}.so +%{dynload_dir}/_bz2.%{SOABI_debug}.so +%{dynload_dir}/_codecs_cn.%{SOABI_debug}.so +%{dynload_dir}/_codecs_hk.%{SOABI_debug}.so +%{dynload_dir}/_codecs_iso2022.%{SOABI_debug}.so +%{dynload_dir}/_codecs_jp.%{SOABI_debug}.so +%{dynload_dir}/_codecs_kr.%{SOABI_debug}.so +%{dynload_dir}/_codecs_tw.%{SOABI_debug}.so +%{dynload_dir}/_contextvars.%{SOABI_debug}.so +%{dynload_dir}/_crypt.%{SOABI_debug}.so +%{dynload_dir}/_csv.%{SOABI_debug}.so +%{dynload_dir}/_ctypes.%{SOABI_debug}.so +%{dynload_dir}/_curses.%{SOABI_debug}.so +%{dynload_dir}/_curses_panel.%{SOABI_debug}.so +%{dynload_dir}/_dbm.%{SOABI_debug}.so +%{dynload_dir}/_decimal.%{SOABI_debug}.so +%{dynload_dir}/_elementtree.%{SOABI_debug}.so +%{dynload_dir}/_gdbm.%{SOABI_debug}.so +%{dynload_dir}/_hashlib.%{SOABI_debug}.so +%{dynload_dir}/_heapq.%{SOABI_debug}.so +%{dynload_dir}/_json.%{SOABI_debug}.so +%{dynload_dir}/_lsprof.%{SOABI_debug}.so +%{dynload_dir}/_lzma.%{SOABI_debug}.so +%{dynload_dir}/_multibytecodec.%{SOABI_debug}.so +%{dynload_dir}/_multiprocessing.%{SOABI_debug}.so +%{dynload_dir}/_opcode.%{SOABI_debug}.so +%{dynload_dir}/_pickle.%{SOABI_debug}.so +%{dynload_dir}/_posixsubprocess.%{SOABI_debug}.so +%{dynload_dir}/_queue.%{SOABI_debug}.so +%{dynload_dir}/_random.%{SOABI_debug}.so +%{dynload_dir}/_socket.%{SOABI_debug}.so +%{dynload_dir}/_sqlite3.%{SOABI_debug}.so +%{dynload_dir}/_ssl.%{SOABI_debug}.so +%{dynload_dir}/_struct.%{SOABI_debug}.so +%{dynload_dir}/_typing.%{SOABI_debug}.so +%{dynload_dir}/array.%{SOABI_debug}.so +%{dynload_dir}/audioop.%{SOABI_debug}.so +%{dynload_dir}/binascii.%{SOABI_debug}.so +%{dynload_dir}/cmath.%{SOABI_debug}.so +%{dynload_dir}/_datetime.%{SOABI_debug}.so +%{dynload_dir}/fcntl.%{SOABI_debug}.so +%{dynload_dir}/grp.%{SOABI_debug}.so +%{dynload_dir}/math.%{SOABI_debug}.so +%{dynload_dir}/mmap.%{SOABI_debug}.so +%{dynload_dir}/nis.%{SOABI_debug}.so +%{dynload_dir}/ossaudiodev.%{SOABI_debug}.so +%{dynload_dir}/pyexpat.%{SOABI_debug}.so +%{dynload_dir}/readline.%{SOABI_debug}.so +%{dynload_dir}/resource.%{SOABI_debug}.so +%{dynload_dir}/select.%{SOABI_debug}.so +%{dynload_dir}/spwd.%{SOABI_debug}.so +%{dynload_dir}/syslog.%{SOABI_debug}.so +%{dynload_dir}/termios.%{SOABI_debug}.so +%{dynload_dir}/_testmultiphase.%{SOABI_debug}.so +%{dynload_dir}/unicodedata.%{SOABI_debug}.so +%{dynload_dir}/_uuid.%{SOABI_debug}.so +%{dynload_dir}/_xxtestfuzz.%{SOABI_debug}.so +%{dynload_dir}/zlib.%{SOABI_debug}.so +%{dynload_dir}/_statistics.%{SOABI_debug}.so +%{dynload_dir}/_xxsubinterpreters.%{SOABI_debug}.so +%{dynload_dir}/_posixshmem.%{SOABI_debug}.so +%{dynload_dir}/_zoneinfo.%{SOABI_debug}.so +%{dynload_dir}/xxlimited.%{SOABI_debug}.so +%{dynload_dir}/xxlimited_35.%{SOABI_debug}.so +%{dynload_dir}/_testclinic.%{SOABI_debug}.so + +%{_libdir}/%{py_INSTSONAME_debug} + +%{pylibdir}/config-%{LDVERSION_debug}-%{_arch}-linux%{_gnu} +%{_includedir}/python%{LDVERSION_debug} +%{_bindir}/python%{LDVERSION_debug}-config +%{_bindir}/python%{LDVERSION_debug}-*-config +%{_libdir}/libpython%{LDVERSION_debug}.so +%{_libdir}/libpython%{LDVERSION_debug}.so.1.0 +%{_libdir}/pkgconfig/python-%{LDVERSION_debug}.pc +%{_libdir}/pkgconfig/python-%{LDVERSION_debug}-embed.pc + +%{dynload_dir}/_tkinter.%{SOABI_debug}.so + +%{dynload_dir}/_ctypes_test.%{SOABI_debug}.so +%{dynload_dir}/_testbuffer.%{SOABI_debug}.so +%{dynload_dir}/_testcapi.%{SOABI_debug}.so +%{dynload_dir}/_testimportmultiple.%{SOABI_debug}.so +%{dynload_dir}/_testinternalcapi.%{SOABI_debug}.so + +%undefine _debuginfo_subpackages + +%files help +%{_mandir}/*/* + +%changelog +* Thu Oct 24 2024 Funda Wang <fundawang@yeah.net> - 3.11.10-2 +- use extension_flags defined in new openEuler-rpm-config + +* Sat Oct 19 2024 Funda Wang <fundawang@yeah.net> - 3.11.10-1 +- update to 3.11.10 + +* Tue Sep 24 2024 xinsheng <xinsheng3@huawei.com> - 3.11.6-8 +- Type:CVE +- CVE:CVE-2024-6232,CVE-2024-3219,CVE-2024-0450,CVE-2023-6597 +- SUG:NA +- DESC:fix CVE-2024-6232,CVE-2024-3219,CVE-2024-0450,CVE-2023-6597 + - rename all CVE patch name + - CVE-2024-6232: Remove backtracking when parsing tarfile headers + - CVE-2024-3219: patch1 Authenticate socket connection for `socket.socketpair()` fallback + - CVE-2024-3219: patch2 Rework pure Python socketpair tests to avoid use of importlib.reload. + - CVE-2024-0450: Protect zipfile from "quoted-overlap" zipbomb + - CVE-2023-6597: tempfile.TemporaryDirectory: fix symlink bug in cleanup + +* Wed Sep 04 2024 yinyongkang <yinyongkang@kylinos.cn> - 3.11.6-7 +- Type:CVE +- ID:CVE-2024-6232,CVE-2024-3219 +- SUG:NA +- DESC:fix CVE-2024-6232 and CVE-2024-3219 + +* Tue Sep 03 2024 xinsheng <xinsheng3@huawei.com> - 3.11.6-6 +- Type:CVE +- CVE:NA +- SUG:NA +- DESC:fix CVE-2024-6923,CVE-2024-7592,CVE-2024-8088 + - Encode newlines in headers, and verify headers are sound + - Fix quadratic complexity in parsing quoted cookie values with backslashes + - Replaced SanitizedNames with a more surgical fix + +* Thu Jul 11 2024 Dingli Zhang <dingli@iscas.ac.cn> - 3.11.6-5 +- Type:enhancement +- ID:NA +- SUG:NA +- DESC:enable profile guided optimizations for some architectures + +* Tue Jun 25 2024 peng.zou <peng.zou@shingroup.cn> - 3.11.6-4 +- Type:bugfix +- CVE:NA +- SUG:NA +- DESC: add ppc64le support for python 3.11.6 + +* Thu Jun 20 2024 wangziliang <wangziliang@kylinos.cn> - 3.11.6-3 +- Type:CVE +- CVE:CVE-2024-0397,CVE-2024-4032 +- SUG:NA +- DESC:fix CVE-2024-0397 and CVE-2024-4032 + +* Mon Feb 26 2024 Wenlong Zhang<zhangwenlong@loongson.cn> - 3.11.6-2 +- Type:bugfix +- CVE:NA +- SUG:NA +- DESC: add loongarch64 support for python 3.11.6 + +* Wed Jan 31 2024 xinsheng3<xinsheng3@huawei.com> - 3.11.6-1 +- Type:bugfix +- CVE:NA +- SUG:NA +- DESC:update version to 3.11.6 + +* Wed Sep 20 2023 futao<futao10@huawei.com> - 3.11.4-3 +- Type:bugfix +- CVE:NA +- SUG:NA +- DESC:add Obsoletes python36 + +* Thu Jul 20 2023 zhuofeng<zhuofeng2@huawei.com> - 3.11.4-2 +- Type:bugfix +- CVE:NA +- SUG:NA +- DESC:remove old python library + +* Fri Jun 30 2023 zhuofeng<zhuofeng2@huawei.com> - 3.11.4-1 +- Type:enhancement +- CVE:NA +- SUG:NA +- DESC:update version to 3.11.4 + +* Thu Jun 01 2023 Chenxi Mao <chenxi.mao@suse.com> - 3.10.9-4 +- Type:enhancement +- CVE:NA +- SUG:NA +- DESC:Support build python via clang. + +* Thu Apr 06 2023 shixuantong <shixuantong1@huawei.com> - 3.10.9-3 +- Type:CVE +- CVE:CVE-2023-24329 +- SUG:NA +- DESC:fix CVE-2023-24329 + +* Mon Mar 13 2023 Chenxi Mao <chenxi.mao@suse.com> - 3.10.9-2 +- Type:enhancement +- CVE:NA +- SUG:NA +- DESC: Enable link time optimizaitons (LTO) for better performance. + +* Mon Jan 30 2023 zhuofeng <zhuofeng2@huawei.com> - 3.10.9-1 +- Type:enhancement +- CVE:NA +- SUG:NA +- DESC:update version to 3.10.9 + +* Mon Nov 28 2022 zhuofeng <zhuofeng2@huawei.com> - 3.10.2-12 +- Type:CVE +- CVE:CVE-2022-37454 +- SUG:NA +- DESC:fix CVE-2022-37454 + +* Thu Nov 10 2022 zhuofeng <zhuofeng2@huawei.com> - 3.10.2-11 +- Type:CVE +- CVE:CVE-2022-45061 +- SUG:NA +- DESC:fix CVE-2022-45061 + +* Wed Nov 09 2022 zhuofeng <zhuofeng2@huawei.com> - 3.10.2-10 +- Type:CVE +- CVE:CVE-2022-42919 +- SUG:NA +- DESC:fix CVE-2022-42919 + +* Thu Sep 08 2022 shixuantong <shixuantong@h-partners.com> - 3.10.2-9 +- Type:CVE +- CVE:CVE-2020-10735 +- SUG:NA +- DESC:fix CVE-2020-10735 + +* Thu Aug 25 2022 shixuantong <shixuantong@h-partners.com> - 3.10.2-8 +- Type:CVE +- CVE:CVE-2021-28861 +- SUG:NA +- DESC:fix CVE-2021-28861 + +* Fri Aug 12 2022 shixuantong <shixuantong@h-partners.com> - 3.10.2-7 +- Type:enhancement +- CVE:NA +- SUG:NA +- DESC:split python3-tkinter from python3-devel + +* Wed Aug 03 2022 shixuantong <shixuantong@h-partners.com> - 3.10.2-6 +- Type:bugfix +- CVE:NA +- SUG:NA +- DESC:add timeout when running the test case + +* Wed Jul 06 2022 shixuantong <shixuantong@h-partners.com> - 3.10.2-5 +- Type:bugfix +- CVE:NA +- SUG:NA +- DESC:Modify the license of python3 + +* Fri Jul 01 2022 shixuantong <shixuantong@h-partners.com> - 3.10.2-4 +- Type:CVE +- CVE:CVE-2015-20107 +- SUG:NA +- DESC:Modify the solution of CVE-2015-20107 + +* Mon Jun 20 2022 shixuantong <shixuantong@h-partners.com> - 3.10.2-3 +- Type:bugfix +- CVE:NA +- SUG:NA +- DESC:add safe compilation option of FS + +* Mon May 16 2022 shixuantong <shixuantong@h-partners.com> - 3.10.2-2 +- Type:CVE +- CVE:CVE-2015-20107 +- SUG:NA +- DESC:fix CVE-2015-20107 + +* Wed Mar 09 2022 shixuantong <shixuantong@h-partners.com> - 3.10.2-1 +- Type:enhancement +- CVE:NA +- SUG:NA +- DESC:update version to 3.10.2 + +* Mon Mar 07 2022 shixuantong <shixuantong@h-partners.com> - 3.10.0-4 +- Type:bugfix +- CVE:NA +- SUG:NA +- DESC:Make test suite support Expat >=2.4.5 + +* Thu Feb 10 2022 shixuantong <shixuantong@h-partners.com> - 3.10.0-3 +- Type:bugfix +- CVE:NA +- SUG:NA +- DESC:disable profile guided optimizations for x86_64 and i686 architectures + +* Mon Jan 24 2022 shixuantong<shixuantong@huawei.com> - 3.10.0-2 +- Type:bugfix +- ID:NA +- SUG:NA +- DESC:delete libpython3.8.so.1.0 file + +* Sat Nov 13 2021 shixuantong<shixuantong@huawei.com> - 3.10.0-1 +- Type:enhancement +- ID:NA +- SUG:NA +- DESC:update version to 3.10.0 + +* Thu Oct 28 2021 hanxinke<hanxinke@huawei.com> - 3.8.5-14 +- Type:requirement +- CVE:NA +- SUG:NA +- DESC:add the sm3 method for obtaining the salt value + +* Mon Sep 27 2021 shixuantong<shixuantong@huawei.com> - 3.8.5-13 +- Type:CVE +- CVE:CVE-2021-3733 CVE-2021-3737 +- SUG:NA +- DESC:fix CVE-2021-3733 CVE-2021-3737 + +* Thu Jul 22 2021 liudabo<liudabo1@huawei.com> - 3.8.5-12 +- Type:bugfix +- ID:NA +- SUG:NA +- DESC:deleting gdb build dependency + +* Mon May 31 2021 shixuantong<shixuantong@huawei.com> - 3.8.5-11 +- Type:CVE +- CVE:CVE-2021-3426 CVE-2021-29921 +- SUG:NA +- DESC:fix CVE-2021-3426 CVE-2021-29921 + +* Sun May 23 2021 shixuantong<shixuantong@huawei.com> - 3.8.5-10 +- Type:bugfix +- ID:NA +- SUG:NA +- DESC:Fix reference leak when Thread is never joined + +* Tue Apr 27 2021 BruceGW<gyl93216@163.com> - 3.8.5-9 +- Type:bugfix +- ID:NA +- SUG:NA +- DESC: fix memory leak in socketserver.ThreadingMixIn + +* Tue Mar 30 2021 shenyangyang<shenyangyang4@huawei.com> - 3.8.5-8 +- Type:bugfix +- ID:NA +- SUG:NA +- DESC:Rebuild for openEuler-rpm-config moving /usr/lib/rpm/openEuler/xxxx + to /usr/lib/xxxx + +* Wed Mar 03 2021 wuchaochao<wuchaochao4@huawei.com> - 3.8.5-7 +- Type:cves +- ID:CVE-2021-23336 +- SUG:NA +- DESC:fix CVE-2021-23336 + +* Wed Feb 24 2021 hehuazhen<hehuazhen@huawei.com> - 3.8.5-6 +- Type:bugfix +- ID:NA +- SUG:NA +- DESC:revert fix a reference leak if a thread is not joined + +* Sun Feb 07 2021 shangyibin<shangyibin1@huawei.com> - 3.8.5-5 +- Type:cves +- ID:CVE-2021-3177 +- SUG:NA +- DESC:fix CVE-2021-3177 + +* Mon Feb 01 2021 shixuantong<shixuantong@huawei.com> - 3.8.5-4 +- Type:bugfix +- ID:NA +- SUG:NA +- DESC:Fix a reference leak if a thread is not joined + +* Sat Nov 14 2020 shixuantong<shixuantong@huawei.com> - 3.8.5-3 +- Type:cves +- ID:CVE-2020-27619 +- SUG:NA +- DESC:fix CVE-2020-27619 + +* Wed Aug 19 2020 whoisxxx<zhangxuzhou4@huawei.com> - 3.8.5-2 +- Type:bugfix +- ID:NA +- SUG:NA +- DESC: Judge arch before use valgrind + +* Sat Aug 1 2020 wenzhanli<wenzhanli2@huawei.com> - 3.8.5-1 +- Type:bugfix +- ID:NA +- SUG:NA +- DESC:update version 3.8.5 + +* Fri Jun 5 2020 hanxinke<hanxinke@huawei.com> - 3.8.3-1 +- Update to Python 3.8.3 + +* Tue Jun 2 2020 hanxinke<hanxinke@huawei.com> - 3.7.4-11 +- Type:bugfix +- ID:NA +- SUG:NA +- DESC:add python3-unversioned-command package + +* Mon Jun 1 2020 hanxinke<hanxinke@huawei.com> - 3.7.4-10 +- Type:bugfix +- ID:NA +- SUG:NA +- DESC:add generic_os support to python3 + +* Tue Apr 21 2020 hanxinke<hanxinke@huawei.com> - 3.7.4-9 +- Type:cves +- ID:CVE-2019-9674 +- SUG:NA +- DESC:fix CVE-2019-9674 + +* Tue Mar 17 2020 hanxinke<hanxinke@huawei.com> - 3.7.4-8 +- Type:bugfix +- ID:NA +- SUG:NA +- DESC:patch the CVE + +* Sat Feb 22 2020 openEuler Buildteam <buildteam@openeuler.org> - 3.7.4-7 +- Type:enhancement +- ID:NA +- SUG:NA +- DESC:revert last commit + +* Sat Feb 22 2020 chengquan<chengquan3@huawei.com> - 3.7.4-6 +- Type:enhancement +- ID:NA +- SUG:NA +- DESC:Add the default version of python3 + +* Tue Dec 31 2019 hanxinke<hanxinke@huawei.com> - 3.7.4-5 +- Type:enhancement +- ID:NA +- SUG:NA +- DESC:update spec file + +* Tue Dec 24 2019 openEuler Buildteam <buildteam@openeuler.org> - 3.7.4-4 +- fix CVE-2019-16056 CVE-2019-16935 CVE-2019-17514 +- Delete the test keys, fix BEP problem + +* Thu Dec 12 2019 lvying <lvying6@huawei.com> - 3.7.4-3 +- provides python3-enum34 + +* Wed Nov 13 2019 hexiaowen <hexiaowen@huawei.com> - 3.7.4-2 +- Add system-rpm-config buildrequires + +* Tue Aug 27 2019 openEuler Buildteam <buildteam@openeuler.org> - 3.7.4-1 +- Package init @@ -0,0 +1 @@ +af59e243df4c7019f941ae51891c10bc Python-3.11.10.tar.xz |