1 Star 0 Fork 17

ocs-commit-check/python3.11

加入 Gitee
与超过 1400万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
python3.11.spec 51.26 KB
一键复制 编辑 原始数据 按行查看 历史
abushwang 提交于 2026-03-03 15:06 +08:00 . fix CVE-2026-1299
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321
%global src_version 3.11.6
%global pybasever %%(echo %{src_version} | cut -d. -f1-2)
%global pyshortver %%(echo %{pybasever} | tr -d '.')
%global pip_version 23.2.1
%global setuptools_version 65.5.0
%if "%{?__default_python3_pkgversion}" == "%{pybasever}"
%bcond_without main_python
%else
%bcond_with main_python
%endif
%bcond_with bootstrap
%if %{with bootstrap}
%bcond_with rpmwheels
%else
%bcond_without rpmwheels
%endif
%bcond_without optimizations
%bcond_without tests
%bcond_without gdb_hooks
%bcond_without gdbm
%bcond_without computed_gotos
%bcond_without debug_build
%ifarch %{valgrind_arches}
%bcond_without valgrind
%else
%bcond_with valgrind
%endif
%if %{with main_python}
%global pkgname python3
%else
%global pkgname python%{pybasever}
%endif
%global pylibdir %{_libdir}/python%{pybasever}
%global dynload_dir %{pylibdir}/lib-dynload
%global ABIFLAGS_debug d
%global LDVERSION_optimized %{pybasever}
%global LDVERSION_debug %{pybasever}%{ABIFLAGS_debug}
%global platform_triplet %{expand:%(echo %{_arch}-linux%{_gnu} | sed -E \\
-e 's/^arm(eb)?-linux-gnueabi$/arm\\1-linux-gnueabihf/' \\
-e 's/^mips64(el)?-linux-gnu$/mips64\\1-linux-gnuabi64/' \\
-e 's/^ppc(64)?(le)?-linux-gnu$/powerpc\\1\\2-linux-gnu/')}
%global SOABI_optimized cpython-%{pyshortver}-%{platform_triplet}
%global SOABI_debug cpython-%{pyshortver}%{ABIFLAGS_debug}-%{platform_triplet}
%global bytecode_suffixes .cpython-%{pyshortver}*.pyc
%global py_SOVERSION 1.0
%global py_INSTSONAME_optimized libpython%{LDVERSION_optimized}.so.%{py_SOVERSION}
%global py_INSTSONAME_debug libpython%{LDVERSION_debug}.so.%{py_SOVERSION}
%undefine py_auto_byte_compile
%undefine __pythonname_provides
%undefine _debuginfo_subpackages
%undefine _include_frame_pointers
Summary: Version %{pybasever} of the Python interpreter
Name: python%{pybasever}
Version: %{src_version}
Release: 30%{?dist}
License: Python-2.0.1
URL: https://www.python.org/
Source0: %{url}ftp/python/%{version}/Python-%{version}.tar.xz
# Idle is the official IDE of Python
Source10: idle3.desktop
Patch0001: backport-gh-115133-fix-tests-for-xmlpullparser-with-expat-2-6-0.patch
Patch0002: CVE-2024-0450.patch
Patch0003: CVE-2024-0397-3.11-gh-114572-Fix-locking-in-cert_store_stats-and-g.patch
Patch0004: CVE-2024-4032-3.11-gh-113171-gh-65056-Fix-private-non-global-IP-ad.patch
Patch0005: CVE-2024-6232-3.11-gh-121285-Remove-backtracking-when-parsing-tarf.patch
Patch0006: CVE-2023-6597.patch
Patch0007: CVE-2024-8088.patch
Patch0008: CVE-2024-7592.patch
Patch0009: CVE-2024-6923.patch
Patch0010: CVE-2024-9287-3.11-gh-124651-Quote-template-strings-in-venv-activa.patch
Patch0011: CVE-2025-0938.patch
Patch0012: CVE-2025-1795-3.11-gh-100884-email-_header_value_parser-don-t-enco.patch
Patch0013: 0001-gh-113594-Fix-UnicodeEncodeError-in-TokenList.fold-G.patch
Patch0014: 0001-gh-92081-Fix-for-email.generator.Generator-with-whit.patch
# fix bug introduced in CVE-2025-1795, Patch0013 - 0014 is pre-patch for Patch0015
Patch0015: 0001-gh-118643-Fix-AttributeError-in-the-email-module-GH-.patch
# https://github.com/python/cpython/pull/135037
# Also addresses CVEs 2024-12718, 2025-4138, 2025-4330, and 2025-4517
Patch0016: CVE-2025-4435.patch
# https://github.com/python/cpython/pull/135464
Patch0017: CVE-2025-6069.patch
Patch0018: CVE-2025-4516-3.11-gh-133767-Fix-use-after-free-in-the-unicode-esc.patch
# https://github.com/python/cpython/pull/137172
Patch0019: CVE-2025-8194.patch
Patch0020: https://github.com/python/cpython/commit/7cff053efeb8506495c5f77f40742341a1714d96.patch
Patch0021: https://github.com/python/cpython/commit/3abcace681e58c4c84cec9e191345a6cc58f46d9.patch
Patch0022: https://github.com/python/cpython/commit/f1897d312e16bdf820ee47de053fdc24f621d0b1.patch
Patch0023: https://github.com/python/cpython/commit/6b37486184590d19c6f24e620545ec8f8f65e4c7.patch
Patch0024: https://github.com/python/cpython/commit/458871277323024d5d4db35ca7056cc51d5e4d8d.patch
Patch0025: https://github.com/python/cpython/commit/0a66052d8dec1a143bc77015ce7522ea812817ed.patch
Patch0026: https://github.com/python/cpython/commit/f8b4421bc5569df25259895a58b69b4d87a47d20.patch
Patch0027: https://github.com/python/cpython/commit/f38f9cf7f81be1ccf0bedfec122b416090ce80cc.patch
Patch0028: https://github.com/python/cpython/commit/da3755557a2f6421e400f6903a47b9de291a9494.patch
Patch0029: https://github.com/python/cpython/commit/9df171dbbac669e0d43c978e10447f050b89eee6.patch
Patch0030: https://github.com/python/cpython/commit/2c6ca1a9adfeaabfdc17b9871b17bd2ca9b32bb3.patch
Patch0031: https://github.com/python/cpython/commit/313544eb0381d868b4f8b351a0ca808c313af698.patch
Patch0032: https://github.com/python/cpython/commit/d8f6297e6d678f635d78cc59776ab7b246bfb03c.patch
Patch0033: https://github.com/python/cpython/commit/228509edab356b02743d9fa9de379854e9526e51.patch
Patch0034: https://github.com/python/cpython/commit/3511c2e546aaacda5880eb89a94f4e8514b3ce76.patch
Patch0035: https://github.com/python/cpython/commit/02feb83af27184fd15f6ee7f7996ab92ce229f82.patch
Patch0036: https://github.com/python/cpython/commit/5f90abaa786f994db3907fc31e2ee00ea2cf0929.patch
Patch0037: https://github.com/python/cpython/commit/c5655aa6ad120d2ed7f255bebd6e8b71a9c07dde.patch
# https://github.com/python/cpython/commit/bc4a703a934a59657ecd018320ef990bc5542803
Patch0038: https://github.com/python/cpython/commit/bc4a703a934a59657ecd018320ef990bc5542803-mod.patch
Patch0039: https://github.com/python/cpython/commit/1459d1f1f1f00f36a25f616c0cea1b6d1609ff7d.patch
Patch0040: https://github.com/python/cpython/commit/22d5724fbbc0a3c55c51f63a14c10e0c618770d7.patch
Patch0041: CVE-2025-8291-3.11-gh-139700-Check-consistency-of-the-zip64-end-of.patch
Patch0042: CVE-2025-6075-3.11-gh-136065-Fix-quadratic-complexity-in-os.path.e.patch
Patch0043: https://github.com/python/cpython/commit/b95c10349956d95e258553def0fcc52ea3ef8f82.patch
Patch0044: https://github.com/serhiy-storchaka/cpython/commit/aa9edbb11a2bf7805fd5046cdd5c2d3864aa39f2.patch
Patch0045: https://github.com/python/cpython/pull/142141/commits/4f2bc24b750a82d3b439f174e7717fc09820bfeb.patch
Patch0046: CVE-2025-11468-3.11-gh-143935-Email-preserve-parens-when-folding-co.patch
Patch0047: CVE-2025-15282-3.11-gh-143925-Reject-control-characters-in-data-URL.patch
Patch0048: CVE-2026-0672-3.11-gh-143919-Reject-control-characters-in-http-coo.patch
# for CVE-2026-0865
Patch0049: 0001-3.11-gh-114331-Skip-decimal-test_maxcontext_exact_ar.patch
Patch0050: CVE-2026-0865-3.11-gh-143916-Reject-control-characters-in-wsgiref..patch
Patch0051: CVE-2026-1299-3.11-gh-144125-email-verify-headers-are-sound-in-Byt.patch
Patch3000: 00001-rpath.patch
Patch3001: 00251-change-user-install-location.patch
Patch3002: 00371-revert-bpo-1596321-fix-threading-_shutdown-for-the-main-thread-gh-28549-gh-28589.patch
Patch3003: python3.11-add-loongarch64-support.patch
BuildRequires: autoconf, make, pkgconfig, gdb, gcc-c++, findutils, glibc-all-langpacks, glibc-devel
BuildRequires: bzip2, bzip2-devel, tar, zlib-devel, expat-devel, xz-devel
BuildRequires: desktop-file-utils, libGL-devel, libX11-devel, tcl-devel, tix-devel, tk-devel
BuildRequires: git-core, gmp-devel, libappstream-glib, libb2-devel, libffi-devel, libnsl2-devel, libtirpc-devel
BuildRequires: libuuid-devel, mpdecimal-devel, ncurses-devel, openssl-devel, readline-devel, sqlite-devel, system-rpm-config
BuildRequires: tzdata, systemtap-sdt-devel, net-tools, bluez-libs-devel
%if %{with gdbm}
BuildRequires: gdbm-devel
%endif
%if %{with valgrind}
BuildRequires: valgrind-devel
%endif
%if %{with rpmwheels}
BuildRequires: %{python_wheel_pkg_prefix}-setuptools-wheel
BuildRequires: %{python_wheel_pkg_prefix}-pip-wheel
%endif
%if %{without bootstrap}
BuildRequires: python%{pybasever}
BuildRequires: python3-rpm-generators
%endif
%if %{with main_python}
%description
Python is a great object-oriented, interpreted, and interactive programming
language. It is often compared (favorably of course :-) ) to Lisp, Tcl,
Perl, Ruby, C#, Visual Basic, Visual Fox Pro, Scheme or Java... and it's
much more fun.
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.
%package -n %{pkgname}
Summary: Python %{pybasever} interpreter
Provides: python%{pybasever} = %{version}-%{release}
Provides: python%{pyshortver} = %{version}-%{release}
Provides: python(abi) = %{pybasever}
Provides: python-is-python3 = %{version}-%{release}
Provides: python = %{version}-%{release}
Provides: platform-python = %{version}-%{release}
# default install in user environment and not install in koji
Recommends: %{_bindir}/python
%else
%global __requires_exclude ^python\\(abi\\) = 3\\..+
%global __provides_exclude ^python\\(abi\\) = 3\\..+
%endif
Requires: %{pkgname}-libs = %{version}-%{release}
%global __requires_exclude ^(/usr/bin/python3|python\\(abi\\))
%description -n %{pkgname}
Python is a great object-oriented, interpreted, and interactive programming
language. It is often compared (favorably of course :-) ) to Lisp, Tcl,
Perl, Ruby, C#, Visual Basic, Visual Fox Pro, Scheme or Java... and it's
much more fun.
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 contains the Python3 interpreter.
%package -n %{pkgname}-libs
Summary: Python runtime libraries
%if %{with rpmwheels}
Requires: %{python_wheel_pkg_prefix}-setuptools-wheel
Requires: %{python_wheel_pkg_prefix}-pip-wheel
%else
Requires: tzdata
Provides: bundled(python3dist(pip)) = %{pip_version}
Provides: bundled(python3dist(setuptools)) = %{setuptools_version}
%endif
Recommends: %{pkgname} = %{version}-%{release}
Recommends: (%{pkgname}-tkinter = %{version}-%{release} if tk)
%description -n %{pkgname}-libs
Python is a great object-oriented, interpreted, and interactive programming
language. It is often compared (favorably of course :-) ) to Lisp, Tcl,
Perl, Ruby, C#, Visual Basic, Visual Fox Pro, Scheme or Java... and it's
much more fun.
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 contains Python C/C++ libraries by apps and Python standard
library.
%package -n %{pkgname}-devel
Summary: Libraries and header files needed for Python development
Requires: %{pkgname} = %{version}-%{release}
Requires: %{pkgname}-libs = %{version}-%{release}
Requires: (python-rpm-macros if rpm-build)
Requires: (python3-rpm-macros if rpm-build)
Requires: (pyproject-rpm-macros if rpm-build)
Requires: (python3-rpm-generators if rpm-build)
%if %{with main_python}
Recommends: python3-pip
Provides: 2to3 = %{version}-%{release}
%endif
Provides: platform-python-devel = %{version}-%{release}
Supplements: tox
Provides: %{pkgname}-2to3 = %{version}-%{release}
%description -n %{pkgname}-devel
Python is a great object-oriented, interpreted, and interactive programming
language. It is often compared (favorably of course :-) ) to Lisp, Tcl,
Perl, Ruby, C#, Visual Basic, Visual Fox Pro, Scheme or Java... and it's
much more fun.
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 contains the development files.
%package -n %{pkgname}-idle
Summary: A basic graphical development environment for Python
Requires: %{pkgname} = %{version}-%{release}
Requires: %{pkgname}-tkinter = %{version}-%{release}
Provides: %{pkgname}-tools = %{version}-%{release}
%if %{with main_python}
Provides: idle3 = %{version}-%{release}
Provides: idle = %{version}-%{release}
%endif
%description -n %{pkgname}-idle
Python is a great object-oriented, interpreted, and interactive programming
language. It is often compared (favorably of course :-) ) to Lisp, Tcl,
Perl, Ruby, C#, Visual Basic, Visual Fox Pro, Scheme or Java... and it's
much more fun.
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.
IDLE is the Python IDE built with the Tkinter GUI toolkit.
%package -n %{pkgname}-tkinter
Summary: A GUI toolkit for Python
Requires: %{pkgname} = %{version}-%{release}
Provides: %{pkgname}-turtle = %{version}-%{release}
%description -n %{pkgname}-tkinter
Python is a great object-oriented, interpreted, and interactive programming
language. It is often compared (favorably of course :-) ) to Lisp, Tcl,
Perl, Ruby, C#, Visual Basic, Visual Fox Pro, Scheme or Java... and it's
much more fun.
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.
Tkinter is the standard Python interface to the Tcl/Tk GUI toolkit.
%package -n %{pkgname}-test
Summary: The self-test suite for the main python3 package
Requires: %{pkgname} = %{version}-%{release}
Requires: %{pkgname}-libs = %{version}-%{release}
%description -n %{pkgname}-test
Python is a great object-oriented, interpreted, and interactive programming
language. It is often compared (favorably of course :-) ) to Lisp, Tcl,
Perl, Ruby, C#, Visual Basic, Visual Fox Pro, Scheme or Java... and it's
much more fun.
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 contains self-test suite for the Python interpreter.
%if %{with debug_build}
%package -n %{pkgname}-debug
Summary: Debug version of the Python runtime
Requires: %{pkgname} = %{version}-%{release}
Requires: %{pkgname}-libs = %{version}-%{release}
Requires: %{pkgname}-devel = %{version}-%{release}
Requires: %{pkgname}-test = %{version}-%{release}
Requires: %{pkgname}-tkinter = %{version}-%{release}
Requires: %{pkgname}-idle = %{version}-%{release}
Provides: platform-python-debug = %{version}-%{release}
%description -n %{pkgname}-debug
Python is a great object-oriented, interpreted, and interactive programming
language. It is often compared (favorably of course :-) ) to Lisp, Tcl,
Perl, Ruby, C#, Visual Basic, Visual Fox Pro, Scheme or Java... and it's
much more fun.
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 contains a Python runtime with numerous debugging features
enabled, aimed at advanced Python users such as developers of Python
extension modules.
%endif
%if %{with main_python}
%package -n python-unversioned-command
Summary: The "python" command that runs Python 3
BuildArch: noarch
Requires: python3 == %{version}-%{release}
Provides: python = %{version}-%{release}
Provides: python-is-python3 = %{version}-%{release}
%description -n python-unversioned-command
This package contains /usr/bin/python - the "python" command that runs Python 3.
%endif
%prep
%autosetup -p1 -n Python-%{version}
%if %{with rpmwheels}
rm Lib/ensurepip/_bundled/pip-%{pip_version}-py3-none-any.whl
rm Lib/ensurepip/_bundled/setuptools-%{setuptools_version}-py3-none-any.whl
%endif
find -name '*.exe' -print -delete
rm -r Modules/expat
rm -r Modules/_decimal/libmpdec
rm configure pyconfig.h.in
%build
export HAS_GIT=not-found
autoconf
autoheader
%if %{with computed_gotos}
%global computed_gotos_flag yes
%else
%global computed_gotos_flag no
%endif
%if %{with optimizations}
%global optimizations_flag "--enable-optimizations"
%else
%global optimizations_flag "--disable-optimizations"
%endif
export CFLAGS="%{extension_cflags}"
export CFLAGS_NODIST="%{build_cflags} -D_GNU_SOURCE -fPIC -fwrapv"
export CXXFLAGS="%{extension_cxxflags}"
export CPPFLAGS="$(pkg-config --cflags-only-I libffi)"
export OPT="%{extension_cflags}"
export LINKCC="gcc"
export CFLAGS="$CFLAGS $(pkg-config --cflags openssl)"
export LDFLAGS="%{extension_ldflags} $(pkg-config --libs-only-L openssl)"
export LDFLAGS_NODIST="%{build_ldflags} -g $(pkg-config --libs-only-L openssl)"
export DFLAGS=" "
topdir=$(pwd)
mkdir -p normal
pushd normal
%global _configure ${topdir}/configure
%configure \
--with-platlibdir=%{_lib} \
--enable-ipv6 \
--enable-shared \
--with-computed-gotos=%{computed_gotos_flag} \
--with-dbmliborder=gdbm:ndbm:bdb \
--with-system-expat \
--with-system-ffi \
--with-system-libmpdec \
--enable-loadable-sqlite-extensions \
--with-dtrace \
--with-lto \
--with-ssl-default-suites=openssl \
--without-static-libpython \
%if %{with rpmwheels}
--with-wheel-pkg-dir=%{python_wheel_dir} \
%endif
%if %{with valgrind}
--with-valgrind \
%endif
--without-ensurepip %{optimizations_flag}
%if %{without bootstrap}
%make_build CFLAGS_NODIST="$CFLAGS_NODIST" regen-all PYTHON_FOR_REGEN="python%{pybasever}"
%endif
%make_build CFLAGS_NODIST="$CFLAGS_NODIST"
popd
# debug build
%if %{with debug_build}
topdir=$(pwd)
mkdir -p debug
pushd debug
%global _configure ${topdir}/configure
%configure \
--with-platlibdir=%{_lib} \
--enable-ipv6 \
--enable-shared \
--with-computed-gotos=%{computed_gotos_flag} \
--with-dbmliborder=gdbm:ndbm:bdb \
--with-system-expat \
--with-system-ffi \
--with-system-libmpdec \
--enable-loadable-sqlite-extensions \
--with-dtrace \
--with-lto \
--with-ssl-default-suites=openssl \
--without-static-libpython \
%if %{with rpmwheels}
--with-wheel-pkg-dir=%{python_wheel_dir} \
%endif
%if %{with valgrind}
--with-valgrind \
%endif
--without-ensurepip \
--with-pydebug
%if %{without bootstrap}
%make_build EXTRA_CFLAGS="-O0 -Wno-cpp" CFLAGS_NODIST="$CFLAGS_NODIST -O0 -Wno-cpp" regen-all PYTHON_FOR_REGEN="python%{pybasever}"
%endif
%make_build EXTRA_CFLAGS="-O0 -Wno-cpp" CFLAGS_NODIST="$CFLAGS_NODIST -O0 -Wno-cpp"
popd
%endif
%install
%if %{with gdb_hooks}
DirHoldingGdbPy=%{_usr}/lib/debug/%{_libdir}
mkdir -p %{buildroot}$DirHoldingGdbPy
%endif
%global _pyconfig32_h pyconfig-32.h
%global _pyconfig64_h pyconfig-64.h
%global _pyconfig_h pyconfig-%{__isa_bits}.h
#
# debug install
#
%if %{with debug_build}
pushd debug
%make_install EXTRA_CFLAGS="-O0"
popd
LDVersion=%{LDVERSION_debug}
%if %{with gdb_hooks}
PathOfGdbPy=$DirHoldingGdbPy/%{py_INSTSONAME_debug}-%{version}-%{release}.%{_arch}.debug-gdb.py
cp Tools/gdb/libpython.py %{buildroot}$PathOfGdbPy
%endif
mv %{buildroot}%{_bindir}/python${LDVersion}-{,`uname -m`-}config
echo -e '#!/bin/sh\nexec %{_bindir}/python'${LDVersion}'-`uname -m`-config "$@"' > \
%{buildroot}%{_bindir}/python${LDVersion}-config
chmod +x %{buildroot}%{_bindir}/python${LDVersion}-config
mv %{buildroot}%{_includedir}/python${LDVersion}/pyconfig.h \
%{buildroot}%{_includedir}/python${LDVersion}/%{_pyconfig_h}
cat > %{buildroot}%{_includedir}/python${LDVersion}/pyconfig.h << EOF
#include <bits/wordsize.h>
#if __WORDSIZE == 32
#include "%{_pyconfig32_h}"
#elif __WORDSIZE == 64
#include "%{_pyconfig64_h}"
#else
#error "Unknown word size"
#endif
EOF
%endif
#
# normal install
#
pushd normal
%make_install
popd
%if %{with gdb_hooks}
PathOfGdbPy=$DirHoldingGdbPy/%{py_INSTSONAME_optimized}-%{version}-%{release}.%{_arch}.debug-gdb.py
cp Tools/gdb/libpython.py %{buildroot}$PathOfGdbPy
%endif
mv %{buildroot}%{_bindir}/python%{LDVERSION_optimized}-{,`uname -m`-}config
echo -e '#!/bin/sh\nexec %{_bindir}/python'%{pybasever}'-`uname -m`-config "$@"' > \
%{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}
cat > %{buildroot}%{_includedir}/python%{LDVERSION_optimized}/pyconfig.h << EOF
#include <bits/wordsize.h>
#if __WORDSIZE == 32
#include "%{_pyconfig32_h}"
#elif __WORDSIZE == 64
#include "%{_pyconfig64_h}"
#else
#error "Unknown word size"
#endif
EOF
install -d -m 0755 %{buildroot}%{pylibdir}/site-packages/__pycache__
%if "%{_lib}" == "lib64"
install -d -m 0755 %{buildroot}%{_prefix}/lib/python%{pybasever}/site-packages/__pycache__
%endif
%if %{with main_python}
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
install -D -m 0644 Lib/idlelib/Icons/idle_256.png %{buildroot}%{_datadir}/icons/hicolor/256x256/apps/idle3.png
desktop-file-install --dir=%{buildroot}%{_datadir}/applications %{SOURCE10}
%endif
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}/pathfix%{pybasever}.py
for tool in pygettext msgfmt; do
cp -p Tools/i18n/${tool}.py %{buildroot}%{_bindir}/${tool}%{pybasever}.py
ln -s ${tool}%{pybasever}.py %{buildroot}%{_bindir}/${tool}3.py
done
LD_LIBRARY_PATH=./normal ./normal/python \
Tools/scripts/pathfix.py \
-i "%{_bindir}/python%{pybasever}" -pn \
%{buildroot} \
%{buildroot}%{_bindir}/*%{pybasever}.py \
%{?with_gdb_hooks:%{buildroot}$DirHoldingGdbPy/*.py}
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 {} \;
%if 0%{?clamp_mtime_to_source_date_epoch}
LD_LIBRARY_PATH="%{buildroot}%{dynload_dir}/:%{buildroot}%{_libdir}" \
PYTHONPATH="%{_rpmconfigdir}/%{_vendor}" \
%{buildroot}%{_bindir}/python%{pybasever} -s -B -m clamp_source_mtime %{buildroot}%{pylibdir}
%endif
LD_LIBRARY_PATH="%{buildroot}%{dynload_dir}/:%{buildroot}%{_libdir}" \
%{buildroot}%{_bindir}/python%{pybasever} -s -B -m compileall \
-f %{_smp_mflags} -o 0 -o 1 -o 2 -s %{buildroot} -p / %{buildroot} --hardlink-dupes --invalidation-mode=timestamp \
-x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data'
%global __brp_python_hardlink %{nil}
rm -rf %{buildroot}%{_bindir}/__pycache__
find %{buildroot} -perm 555 -exec chmod 755 {} \;
%if %{with debug_build} && %{with main_python}
ln -s %{_bindir}/python%{LDVERSION_debug} %{buildroot}%{_bindir}/python3-debug
ln -s ./python3-debug %{buildroot}%{_bindir}/python-debug
%endif
%if %{without main_python}
rm %{buildroot}%{_bindir}/python3
rm %{buildroot}%{_bindir}/pydoc3
rm %{buildroot}%{_bindir}/pygettext3.py
rm %{buildroot}%{_bindir}/msgfmt3.py
rm %{buildroot}%{_bindir}/idle3
rm %{buildroot}%{_bindir}/python3-*
rm %{buildroot}%{_bindir}/2to3
rm %{buildroot}%{_libdir}/libpython3.so
rm %{buildroot}%{_mandir}/man1/python3.1
rm %{buildroot}%{_libdir}/pkgconfig/python3.pc
rm %{buildroot}%{_libdir}/pkgconfig/python3-embed.pc
%else
ln -s ./python3 %{buildroot}%{_bindir}/python
ln -s ./pydoc3 %{buildroot}%{_bindir}/pydoc
ln -s ./pygettext3.py %{buildroot}%{_bindir}/pygettext.py
ln -s ./msgfmt3.py %{buildroot}%{_bindir}/msgfmt.py
ln -s ./idle3 %{buildroot}%{_bindir}/idle
ln -s ./python3-config %{buildroot}%{_bindir}/python-config
ln -s ./python3.1 %{buildroot}%{_mandir}/man1/python.1
ln -s ./python3.pc %{buildroot}%{_libdir}/pkgconfig/python.pc
ln -s ./pathfix%{pybasever}.py %{buildroot}%{_bindir}/pathfix.py
%endif
mkdir -p %{buildroot}%{_libexecdir}
ln -s %{_bindir}/python%{pybasever} %{buildroot}%{_libexecdir}/platform-python
ln -s %{_bindir}/python%{pybasever} %{buildroot}%{_libexecdir}/platform-python%{pybasever}
ln -s %{_bindir}/python%{pybasever}-config %{buildroot}%{_libexecdir}/platform-python-config
ln -s %{_bindir}/python%{pybasever}-config %{buildroot}%{_libexecdir}/platform-python%{pybasever}-config
ln -s %{_bindir}/python%{pybasever}-`uname -m`-config %{buildroot}%{_libexecdir}/platform-python%{pybasever}-`uname -m`-config
%if %{with debug_build}
ln -s %{_bindir}/python%{LDVERSION_debug} %{buildroot}%{_libexecdir}/platform-python-debug
ln -s %{_bindir}/python%{LDVERSION_debug} %{buildroot}%{_libexecdir}/platform-python%{LDVERSION_debug}
ln -s %{_bindir}/python%{LDVERSION_debug}-config %{buildroot}%{_libexecdir}/platform-python%{LDVERSION_debug}-config
ln -s %{_bindir}/python%{LDVERSION_debug}-`uname -m`-config %{buildroot}%{_libexecdir}/platform-python%{LDVERSION_debug}-`uname -m`-config
%endif
for file in %{buildroot}%{pylibdir}/pydoc_data/topics.py $(grep --include='*.py' -lr %{buildroot}%{pylibdir}/encodings -e 'Python Character Mapping Codec .* from .* with gencodec.py'); do
directory=$(dirname ${file})
module=$(basename ${file%%.py})
mv ${directory}/{__pycache__/${module}.cpython-%{pyshortver}.pyc,${module}.pyc}
rm ${directory}/{__pycache__/${module}.cpython-%{pyshortver}.opt-?.pyc,${module}.py}
done
%check
# if zope related python packages were installed in system, test will be failed on test_embed case.
LD_LIBRARY_PATH=$(pwd)/normal $(pwd)/normal/python -m test.pythoninfo
LD_LIBRARY_PATH=$(pwd)/normal $(pwd)/normal/python -m test.regrtest \
-wW --slowest -j0 --timeout=1800 \
-i test_freeze_simple_script \
-i test_check_probes \
-x test_smtplib \
%ifarch riscv64
-x test_urllib \
-x test_urllib2 \
-x test_dtrace \
%endif
%if %{with bootstrap}
-x test_distutils \
%endif
%files -n %{pkgname}
%doc README.rst
%if %{with main_python}
%{_bindir}/pydoc*
%{_bindir}/python3
%else
%{_bindir}/pydoc%{pybasever}
%endif
%{_libexecdir}/platform-python
%{_libexecdir}/platform-python%{pybasever}
%{_libexecdir}/platform-python%{LDVERSION_optimized}
%{_bindir}/python%{pybasever}
%{_bindir}/python%{LDVERSION_optimized}
%{_mandir}/*/*3*
%files -n %{pkgname}-libs
%license %{pylibdir}/LICENSE.txt
%doc README.rst
%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}
%if %{with rpmwheels}
%exclude %{pylibdir}/ensurepip/_bundled
%else
%dir %{pylibdir}/ensurepip/_bundled
%{pylibdir}/ensurepip/_bundled/pip-%{pip_version}-py3-none-any.whl
%{pylibdir}/ensurepip/_bundled/setuptools-%{setuptools_version}-py3-none-any.whl
%endif
%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
%if %{with gdbm}
%{dynload_dir}/_gdbm.%{SOABI_optimized}.so
%endif
%{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}/_statistics.%{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}/unicodedata.%{SOABI_optimized}.so
%{dynload_dir}/_uuid.%{SOABI_optimized}.so
%{dynload_dir}/xxlimited.%{SOABI_optimized}.so
%{dynload_dir}/xxlimited_35.%{SOABI_optimized}.so
%{dynload_dir}/_xxsubinterpreters.%{SOABI_optimized}.so
%{dynload_dir}/zlib.%{SOABI_optimized}.so
%{dynload_dir}/_zoneinfo.%{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/
%{pylibdir}/re/*.py
%{pylibdir}/re/__pycache__/*%{bytecode_suffixes}
%dir %{pylibdir}/sqlite3/
%dir %{pylibdir}/sqlite3/__pycache__/
%{pylibdir}/sqlite3/*.py
%{pylibdir}/sqlite3/__pycache__/*%{bytecode_suffixes}
%dir %{pylibdir}/tomllib/
%{pylibdir}/tomllib/*.py
%{pylibdir}/tomllib/__pycache__/*%{bytecode_suffixes}
%exclude %{pylibdir}/turtle.py
%exclude %{pylibdir}/__pycache__/turtle*%{bytecode_suffixes}
%{pylibdir}/urllib
%{pylibdir}/xml
%{pylibdir}/zoneinfo
%dir %{pylibdir}/__phello__
%{pylibdir}/__phello__/__init__.py
%{pylibdir}/__phello__/spam.py
%{pylibdir}/__phello__/__pycache__/*%{bytecode_suffixes}
%if "%{_lib}" == "lib64"
%attr(0755,root,root) %dir %{_prefix}/lib/python%{pybasever}
%attr(0755,root,root) %dir %{_prefix}/lib/python%{pybasever}/site-packages
%attr(0755,root,root) %dir %{_prefix}/lib/python%{pybasever}/site-packages/__pycache__/
%endif
%dir %{pylibdir}/config-%{LDVERSION_optimized}-%{platform_triplet}/
%{pylibdir}/config-%{LDVERSION_optimized}-%{platform_triplet}/Makefile
%dir %{_includedir}/python%{LDVERSION_optimized}/
%{_includedir}/python%{LDVERSION_optimized}/%{_pyconfig_h}
%{_libdir}/%{py_INSTSONAME_optimized}
%if %{with main_python}
%{_libdir}/libpython3.so
%endif
%files -n %{pkgname}-devel
%doc Misc/README.valgrind Misc/valgrind-python.supp Misc/gdbinit
%if %{with main_python}
%{_bindir}/2to3
%{_bindir}/python3-config
%{_bindir}/python-config
%{_libdir}/pkgconfig/python3.pc
%{_libdir}/pkgconfig/python.pc
%{_libdir}/pkgconfig/python3-embed.pc
%{_bindir}/pathfix.py
%{_bindir}/pygettext3.py
%{_bindir}/pygettext.py
%{_bindir}/msgfmt3.py
%{_bindir}/msgfmt.py
%endif
%{_bindir}/2to3-%{pybasever}
%{_bindir}/pathfix%{pybasever}.py
%{_bindir}/pygettext%{pybasever}.py
%{_bindir}/msgfmt%{pybasever}.py
%{_bindir}/python%{pybasever}-config
%{_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
%{_libdir}/pkgconfig/python-%{pybasever}.pc
%{_libdir}/pkgconfig/python-%{pybasever}-embed.pc
%{pylibdir}/config-%{LDVERSION_optimized}-%{platform_triplet}/*
%exclude %{pylibdir}/config-%{LDVERSION_optimized}-%{platform_triplet}/Makefile
%exclude %{_includedir}/python%{LDVERSION_optimized}/%{_pyconfig_h}
%{_includedir}/python%{LDVERSION_optimized}/*.h
%{_includedir}/python%{LDVERSION_optimized}/internal/
%{_includedir}/python%{LDVERSION_optimized}/cpython/
%{_libexecdir}/platform-python-config
%{_libexecdir}/platform-python%{pybasever}-config
%{_libexecdir}/platform-python%{LDVERSION_optimized}-config
%{_libexecdir}/platform-python%{pybasever}-*-config
%{_libexecdir}/platform-python%{LDVERSION_optimized}-*-config
%files -n %{pkgname}-idle
%if %{with main_python}
%{_bindir}/idle*
%{_datadir}/applications/idle3.desktop
%{_datadir}/icons/hicolor/*/apps/idle3.*
%else
%{_bindir}/idle%{pybasever}
%endif
%{pylibdir}/idlelib
%files -n %{pkgname}-tkinter
%{pylibdir}/tkinter
%exclude %{pylibdir}/tkinter/test
%{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 -n %{pkgname}-test
%{pylibdir}/ctypes/test
%{pylibdir}/distutils/tests
%{pylibdir}/test
%{pylibdir}/lib2to3/tests
%{pylibdir}/tkinter/test
%{pylibdir}/unittest/test
%{dynload_dir}/_ctypes_test.%{SOABI_optimized}.so
%{dynload_dir}/_testbuffer.%{SOABI_optimized}.so
%{dynload_dir}/_testcapi.%{SOABI_optimized}.so
%{dynload_dir}/_testclinic.%{SOABI_optimized}.so
%{dynload_dir}/_testimportmultiple.%{SOABI_optimized}.so
%{dynload_dir}/_testinternalcapi.%{SOABI_optimized}.so
%{dynload_dir}/_testmultiphase.%{SOABI_optimized}.so
%{dynload_dir}/_xxtestfuzz.%{SOABI_optimized}.so
%if %{with debug_build}
%files -n %{pkgname}-debug
%if %{with main_python}
%{_bindir}/python3-debug
%{_bindir}/python-debug
%endif
%{_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
%if %{with gdbm}
%{dynload_dir}/_gdbm.%{SOABI_debug}.so
%endif
%{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}/_statistics.%{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}/_posixshmem.%{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}/unicodedata.%{SOABI_debug}.so
%{dynload_dir}/_uuid.%{SOABI_debug}.so
%{dynload_dir}/xxlimited.%{SOABI_debug}.so
%{dynload_dir}/xxlimited_35.%{SOABI_debug}.so
%{dynload_dir}/_xxsubinterpreters.%{SOABI_debug}.so
%{dynload_dir}/_xxtestfuzz.%{SOABI_debug}.so
%{dynload_dir}/zlib.%{SOABI_debug}.so
%{dynload_dir}/_zoneinfo.%{SOABI_debug}.so
%{_libdir}/%{py_INSTSONAME_debug}
%{pylibdir}/config-%{LDVERSION_debug}-%{platform_triplet}
%{_includedir}/python%{LDVERSION_debug}
%{_bindir}/python%{LDVERSION_debug}-config
%{_bindir}/python%{LDVERSION_debug}-*-config
%{_libdir}/libpython%{LDVERSION_debug}.so
%{_libdir}/libpython%{LDVERSION_debug}.so.%{py_SOVERSION}
%{_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}/_testclinic.%{SOABI_debug}.so
%{dynload_dir}/_testimportmultiple.%{SOABI_debug}.so
%{dynload_dir}/_testinternalcapi.%{SOABI_debug}.so
%{dynload_dir}/_testmultiphase.%{SOABI_debug}.so
%{pylibdir}/_sysconfigdata_%{ABIFLAGS_debug}_linux_%{platform_triplet}.py
%{pylibdir}/__pycache__/_sysconfigdata_%{ABIFLAGS_debug}_linux_%{platform_triplet}%{bytecode_suffixes}
%{_libexecdir}/platform-python-debug
%{_libexecdir}/platform-python%{LDVERSION_debug}
%{_libexecdir}/platform-python%{LDVERSION_debug}-config
%{_libexecdir}/platform-python%{LDVERSION_debug}-*-config
%endif
%if %{with main_python}
%files -n python-unversioned-command
%{_bindir}/python
%{_mandir}/*/python.1*
%endif
%changelog
* Tue Mar 3 2026 Shuo Wang <abushwang@tencent.com> - 3.11.6-30
- fix CVE-2026-1299
- gh-144125: email: verify headers are sound in BytesGenerator
* Thu Jan 29 2026 Shuo Wang <abushwang@tencent.com> - 3.11.6-29
- fix CVE-2025-11468 CVE-2025-15282 CVE-2026-0672 CVE-2026-0865
- gh-143935: Email preserve parens when folding comments
- gh-143925: Reject control characters in data: URL mediatypes
- gh-143919: Reject control characters in http cookies
- gh-143916: Reject control characters in wsgiref.headers.Headers
* Mon Dec 15 2025 cunshunxia <cunshunxia@tencent.com> - 3.11.6-28
- fix CVE-2025-13836 CVE-2025-13837 CVE-2025-12084
* Mon Nov 17 2025 cunshunxia <cunshunxia@tencent.com> - 3.11.6-27
- mute the testcase which fails because of port policy.
* Wed Nov 12 2025 Shuo Wang <abushwang@tencent.com> - 3.11.6-26
- fix CVE-2025-6075
- gh-136065: Fix quadratic complexity in os.path.expandvars() (GH-134952) (GH-140847)
* Tue Oct 28 2025 Tracker Robot <trackbot@opencloudos.tech> - 3.11.6-25
- [Type] security
- [DESC] Apply patches from rpm-tracker
- [Bug Fix] 1459d1f1f1f00f36a25f616c0cea1b6d1609ff7d.patch: [3.11] gh-139400: Make sure that parent parsers outlive their subparsers in pyexpat (GH-139403) (#139612)
- [Bug Fix] 22d5724fbbc0a3c55c51f63a14c10e0c618770d7.patch: [3.11] gh-135661: Fix CDATA section parsing in HTMLParser (GH-135665) (GH-137774) (GH-139659)
- [CVE Fix] 1d29afb0d6218aa8fb5e1e4a6133a4778d89bb46.patch: [3.11] gh-139700: Check consistency of the zip64 end of central directory record (GH-139702) (GH-139708) (GH-139713)
* Wed Oct 22 2025 Shuo Wang <abushwang@tencent.com> - 3.11.6-24
- fix CVE-2025-8291
- gh-139700: Check consistency of the zip64 end of
- central directory record (GH-139702) (GH-139708) (GH-139713)
* Wed Sep 24 2025 Tracker Robot <trackbot@opencloudos.tech> - 3.11.6-23
- [Type] security
- [DESC] Apply patches from rpm-tracker
- [CVE Fix] 5f90abaa786f994db3907fc31e2ee00ea2cf0929.patch: [3.11] gh-122133: Authenticate socket connection for socket.socketpair() fallback (GH-122134) (#122426)
- [CVE Fix] c5655aa6ad120d2ed7f255bebd6e8b71a9c07dde.patch: [3.11] gh-122133: Rework pure Python socketpair tests to avoid use of importlib.reload. (GH-122493) (GH-122506)
- [CVE Fix] bc4a703a934a59657ecd018320ef990bc5542803.patch: [3.11] [CVE-2023-27043] gh-102988: Reject malformed addresses in email.parseaddr() (GH-111116) (#123767)
* Thu Sep 18 2025 Tracker Robot <trackbot@opencloudos.tech> - 3.11.6-22
- [Type] bugfix
- [DESC] Apply patches from rpm-tracker
- [Bug Fix] 7cff053efeb8506495c5f77f40742341a1714d96.patch: [3.11] gh-80222: Fix email address header folding with long quoted-string (GH-122753) (#129009)
- [Bug Fix] 3abcace681e58c4c84cec9e191345a6cc58f46d9.patch: [3.11] gh-119511: Fix a potential denial of service in imaplib (GH-119514) (#129357)
- [Bug Fix] f1897d312e16bdf820ee47de053fdc24f621d0b1.patch: [3.11] GH-130396: Treat clang -Og as optimized for gdb tests (GH-130550) (GH-130573) (#130593)
- [Bug Fix] 6b37486184590d19c6f24e620545ec8f8f65e4c7.patch: [3.11] gh-106883 Fix deadlock in threaded application (#117332)
- [Bug Fix] 458871277323024d5d4db35ca7056cc51d5e4d8d.patch: [3.11] gh-127257: ssl: Raise OSError for ERR_LIB_SYS (GH-127361) (GH-127905) (GH-131970)
- [Bug Fix] 0a66052d8dec1a143bc77015ce7522ea812817ed.patch: [3.11] gh-121284: Fix email address header folding with parsed encoded-word (GH-122754) (GH-131405)
- [Bug Fix] f8b4421bc5569df25259895a58b69b4d87a47d20.patch: [3.11] gh-134062: Fix hash collisions in IPv4Network and IPv6Network (GH-134063) (GH-134479)
- [Bug Fix] da3755557a2f6421e400f6903a47b9de291a9494.patch: [3.11] gh-128840: Limit the number of parts in IPv6 address parsing (GH-128841) (GH-134613)
- [Bug Fix] 9df171dbbac669e0d43c978e10447f050b89eee6.patch: [3.11] gh-123409: fix IPv6Address.reverse_pointer for IPv4-mapped addresses (GH-123419) (GH-135087)
- [Bug Fix] 2c6ca1a9adfeaabfdc17b9871b17bd2ca9b32bb3.patch: [3.11] gh-128840: Fix parsing long IPv6 addresses with embedded IPv4 address (GH-134836) (GH-135091)
- [Bug Fix] 313544eb0381d868b4f8b351a0ca808c313af698.patch: [3.11] gh-127563: use dk_log2_index_bytes=3 in empty dicts (GH-127568) (GH-127813) (#135463)
- [Bug Fix] d8f6297e6d678f635d78cc59776ab7b246bfb03c.patch: [3.11] gh-102555: Fix comment parsing in HTMLParser according to the HTML5 standard (GH-135664) (GH-136274)
- [Bug Fix] 228509edab356b02743d9fa9de379854e9526e51.patch: [3.11] gh-135661: Fix parsing start and end tags in HTMLParser according to the HTML5 standard (GH-135930) (GH-136268) (#136291)
- [Bug Fix] 3511c2e546aaacda5880eb89a94f4e8514b3ce76.patch: [3.11] gh-135661: Fix parsing attributes with whitespaces around the = separator in HTMLParser (GH-136908) (GH-136920)
- [Bug Fix] 02feb83af27184fd15f6ee7f7996ab92ce229f82.patch: [3.11] gh-118350: Fix support of elements textarea and title in HTMLParser (GH-135310) (GH-137782)
* Mon Sep 01 2025 Xinlong Chen <xinlongchen@tencent.com> - 3.11.6-21
- disable some tests for riscv64
* Wed Jul 30 2025 cunshunxia <cunshunxia@tencent.com> - 3.11.6-20
- fix CVE-2025-8194.
- gh-130577: tarfile now validates archives to ensure member
- offsets are non-negative (GH-137027)
* Wed Jul 9 2025 Shuo Wang <abushwang@tencent.com> - 3.11.6-19
- fix CVE-2025-4516
- gh-133767: Fix use-after-free in the unicode-escape decoder
- with an error handler (GH-129648) (GH-133944) (GH-134341)
* Thu Jun 26 2025 Feng Weiyao <wynnfeng@tencent.com> - 3.11.6-18
- Add provides and symbolic links for compatibility with platform-python
* Wed Jun 25 2025 cunshunxia <cunshunxia@tencent.com> - 3.11.6-17
- fix CVE-2025-4435
- Also addresses CVEs 2024-12718, 2025-4138, 2025-4330, and 2025-4517
- gh-135034: Normalize link targets in tarfile, add `os.path.realpath(strict='allow_missing')` (GH-135037)
- fix CVE-2025-6069
* Mon Mar 10 2025 Shuo Wang <abushwang@tencent.com> - 3.11.6-16
- fix CVE-2025-1795
- email/_header_value_parser: don't encode list separators (GH-100885) (GH-115593)
- Fix UnicodeEncodeError in TokenList.fold() (GH-113730)
- Fix for email.generator.Generator with whitespace between encoded words. (#92281)
- Fix AttributeError in the email module (GH-119099)
* Mon Feb 24 2025 cunshunxia <cunshunxia@tencent.com> - 3.11.6-15
- fix CVE-2025-0938.
- gh-105704: Disallow square brackets (`[` and `]`) in
domain names for parsed URLs (GH-129418) (#129528)
* Tue Nov 5 2024 Shuo Wang <abushwang@tencent.com> - 3.11.6-14
- fix CVE-2024-6923
- Quote template strings in `venv` activation scripts (GH-124712) (GH-126185)
* Tue Oct 15 2024 cunshunxia <cunshunxia@tencent.com> - 3.11.6-13
- fix CVE-2024-6923.
* Thu Sep 26 2024 OpenCloudOS Release Engineering <releng@opencloudos.tech> - 3.11.6-12
- Rebuilt for clarifying the packages requirement in BaseOS and AppStream
* Wed Sep 18 2024 cunshunxia <cunshunxia@tencent.com> - 3.11.6-11
- fix CVE-2024-8088, CVE-2023-6597 and CVE-2024-7592.
* Fri Sep 6 2024 Shuo Wang <abushwang@tencent.com> - 3.11.6-10
- fix CVE-2024-6232
- Remove backtracking when parsing tarfile headers (GH-121286) (#123639)
* Fri Aug 16 2024 OpenCloudOS Release Engineering <releng@opencloudos.tech> - 3.11.6-9
- Rebuilt for loongarch release
* Wed Jun 19 2024 Shuo Wang <abushwang@tencent.com> - 3.11.6-8
- fix CVE-2024-0397
- Fix "private" (non-global) IP address ranges (GH-113179) (GH-113186)
* Tue Jun 18 2024 Shuo Wang <abushwang@tencent.com> - 3.11.6-7
- fix CVE-2024-0397
- Fix locking in cert_store_stats and get_ca_certs
* Sat May 25 2024 Huang Yang <huangyang@loongson.cn> - 3.11.6-6
- [Type] other
- [DESC] add loongarch64 support
* Mon Apr 15 2024 cunshunxia <cunshunxia@tencent.com> - 3.11.6-5
- fix CVE-2024-0450.
* Wed Apr 10 2024 Shuo Wang <abushwang@tencent.com> - 3.11.6-4
- simplify pybasever macro
* Mon Apr 8 2024 Shuo Wang <abushwang@tencent.com> - 3.11.6-3
- add support for multiple version
- fix etree test fail
* Wed Oct 25 2023 Shuo Wang <abushwang@tencent.com> - 3.11.6-2
- add Recommends to %{_bindir}/python
- default install in user environment and not install in koji
* Mon Oct 23 2023 Zhao Zhen <jeremiazhao@tencent.com> - 3.11.6-1
- upgraded upstream 3.11.6
- fixed CVE-2023-40217 CVE-2023-41105
* Wed Oct 18 2023 Shuo Wang <abushwang@tencent.com> - 3.11.4-4
- remove unused idle3 files
* Wed Sep 20 2023 Shuo Wang <abushwang@tencent.com> - 3.11.4-3
- provides python-unversioned-command
* Thu Aug 24 2023 Zhao Zhen <jeremiazhao@tencent.com> - 3.11.4-2
- small fixes
* Thu Aug 24 2023 Zhao Zhen <jeremiazhao@tencent.com> - 3.11.4-1
- upgraded for upstream 3.11.4
- fixed CVE-2023-24329, CVE-2022-45061, CVE-2022-42919, CVE-2021-28861, CVE-2020-10735, CVE-2015-20107
- removed python-unversioned-command, it is now merged into python3 package, so python3 package contains
- /usr/bin/python by default
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/ocs-commit-check/python3.11.git
git@gitee.com:ocs-commit-check/python3.11.git
ocs-commit-check
python3.11
python3.11
master

搜索帮助