#This spec file was created by Logan (2025). This spec file may be distributed with the python source package it has been originally bundled with under the same license as the python source package. %global __brp_python_bytecompile %{nil} %define srcpkg python %define ver 3.14 %define rev 0b1~ Name: %{srcpkg}%{ver} Summary: python License: GPL Version: %{ver}.%{rev} Release: 1 Packager: Logan URL: https://www.python.org Source0: %{srcpkg}-v%{ver}.%{rev}-src.tar.xz Requires: %{name}-libs openssl bzip2 xz sqlite gdbm-libs systemtap-sdt-dtrace BuildRequires: gcc g++ glibc-devel python3-pip ncurses-devel readline-devel gdbm-devel libzstd-devel libuuid-devel xz-devel bzip2-devel unzip openssl openssl-devel sqlite-devel tk-devel expat-devel systemtap-sdt-dtrace systemtap-sdt-devel %description Python interactive high-level object-oriented language libraries (version %{version}) %package libs Version: %{ver}.%{rev} Summary: Standard library files for %{name} %description libs Standard library for object-oriented python %{version} %package devel Version: %{ver}.%{rev} Summary: Development libraries and include files for %{name} Requires: %{name} = %{version}, %{name}-libs = %{version} %description devel Development files and static libraries for %{name}. %package doc Version: %{ver}.%{rev} Summary: Official documentation files for Python %{version} %description doc Official documentation for the high-level object-oriented language Python %{version} %package idle Version: %{ver}.%{rev} Summary: Python IDLE IDE module files for %{name} Requires: %{name} = %{version}, %{name}-libs = %{version}, %{name}-tkinter = %{version} %description idle IDE for Python (%{ver}) using Tkinter %package pip Version: %{ver}.%{rev} Summary: PIP module files for %{name} Requires: %{name} = %{version}, %{name}-libs = %{version} %description pip PIP package manager module files for %{name} for installing additional packages. %package pip-wheel Version: %{ver}.%{rev} Summary: Wheel files for %{name} Requires: %{name} = %{version}, %{name}-pip = %{version} %description pip-wheel PIP package manager wheels for %{name}. %package tkinter Version: %{ver}.%{rev} Summary: Tkinter module files for %{name} Requires: %{name} = %{version}, %{name}-libs = %{version} %description tkinter Tkinter - Writing Tk applications with Python %{version} Python for GUI applications creation with Python %{version} %package test Version: %{ver}.%{rev} Summary: Module files for %{name} self test. Requires: %{name} = %{version}, %{name}-libs = %{version} %description test Self test module files for the Python standard library (version %{version}) %package venv Version: %{ver}.%{rev} Summary: Virtula environment (venv) module files for %{name} Requires: %{name} = %{version}, %{name}-libs = %{version}, %{name}-pip = %{version} %description venv Python module for creating virtual environments for python %{version} %define _prefix /usr %define openSSL /usr %define runtimeOpenSSLv $(openssl version -d) %define runtimeOpenSSL $(echo ${runtimeOpenSSLv:12} | tail -c +2 | head -c -2) %define procs $(((%getncpus)*2)) %define instDir install %undefine __brp_mangle_shebangs %prep %setup -q %build pip3 install matplotlib CXX="/usr/bin/g++" ./configure --prefix="%{_prefix}" --libdir="%{_libdir}" --with-platlibdir="/%{_lib}" --with-openssl="%{openSSL}" --with-openssl-rpath --with-ssl-default-suites=python --with-system-expat --with-lto=full --with-dtrace --enable-loadable-sqlite-extensions --enable-optimizations --with-ensurepip=install --with-wheel-pkg-dir="%{_datadir}%{name}-wheels" %make_build -j%{procs} %make_build -C Doc venv %make_build -j%{procs} -C Doc html %install sourcePath="$PWD" export QA_RPATHS=0x0001 %define path0 %{_libdir}/python%{ver}/config-%{ver}-%{_arch}-linux-gnu %define path1 %{_libdir}/python%{ver}/idlelib %define path2 %{_libdir}/python%{ver}/lib-dynload %define path3 %{_libdir}/python%{ver}/ensurepip %define path4 %{_libdir}/python%{ver}/test %define path5 %{_libdir}/python%{ver}/tkinter %define path5_1 %{_libdir}/python%{ver}/lib-dynload/_tkinter.cpython- %define path6 %{_libdir}/python%{ver}/venv %define path7 /usr/lib/python%{ver}/site-packages/pip %make_build altinstall DESTDIR="%{buildroot}" %__install -dm 755 "%{buildroot}%{_docdir}/python%{ver}" %__cp -rf "Doc/build/"* "%{buildroot}%{_docdir}/python%{ver}/" %__install -dm 755 "%{buildroot}%{_docdir}/python%{ver}-doc/" ln -s "../../doc/python%{ver}/html" "%{buildroot}%{_docdir}/python%{ver}-doc/python%{ver}" %__install -dm 755 "%{buildroot}%{_datadir}/devhelp/books/python%{ver}/" ln -s "../../doc/python%{ver}/html" "%{buildroot}%{_datadir}/devhelp/books/python%{ver}" %__install -dm 755 "%{buildroot}%{_datadir}/applications" %__cp -rf "resources/python.desktop" "%{buildroot}%{_datadir}/applications/python%{ver}.desktop" %__cp -rf "resources/idle.desktop" "%{buildroot}%{_datadir}/applications/idle%{ver}.desktop" for fileName in "%{buildroot}%{_datadir}/applications/"*; do awk -v version="%{ver}" '{gsub(/3.x/, version);print;}' "$fileName" > "$fileName.tmp" && mv "$fileName.tmp" "$fileName"; done %__install -dm 755 "%{buildroot}%{_datadir}/pixmaps/" %__cp -rf "resources/"*".xpm" "%{buildroot}%{_datadir}/pixmaps" %__install -dm 755 "%{buildroot}%{_datadir}/python%{ver}-wheels" %__install -dm 755 "%{buildroot}%{_libdir}/python%{ver}/site-packages" %__cp -rf "%{buildroot}%{_libdir}/python%{ver}/ensurepip/_bundled/pip-25.1.1-py3-none-any.whl" "%{buildroot}%{_datadir}/%{name}-wheels" unzip "%{buildroot}%{_libdir}/python%{ver}/ensurepip/_bundled/pip-25.1.1-py3-none-any.whl" -d "%{buildroot}%{_libdir}/python%{ver}/site-packages" cd "%{buildroot}" echo "%defattr(-,root,root)" > "$sourcePath/libpython-files" find ".%{_libdir}" -type f -regex '.*' -not \( -regex '\./' -or -regex '\.%{path1}.*' -or -regex '\.%{path2}.*' -or -regex '\.%{path4}.*' -or -regex '\.%{path5}.*' -or -regex '\.%{path6}.*' -or -regex '\.%{path6_1}.*' -or -regex '\.%{path7}.*' -or -regex '\.%{path0}.*' \) | awk '{print substr($0,2);}' >> "$sourcePath/libpython-files" find ".%{path2}" -type f -regex '.*' -not \( -regex '\./' -or -regex '\.%{path5_1}.*' \) | awk '{print substr($0,2);}' >> "$sourcePath/libpython-files" #%clean #%__rm -r %{buildroot} %files %defattr(-,root,root) %{_bindir}/python%{ver} %{_bindir}/pydoc%{ver} %{_datadir}/applications/python%{ver}.desktop %{_datadir}/pixmaps/* %files devel %defattr(-,root,root) %{_bindir}/python%{ver}-config %{path0}* %{_mandir}/man1/* %{_includedir}/python%{ver}/ %files doc %defattr(-,root,root) %{_docdir}/python%{ver} %{_datadir}/devhelp/books/python%{ver} %{_docdir}/python%{ver}-doc %files libs -f libpython-files %defattr(-,root,root) %files idle %defattr(-,root,root) %{_bindir}/idle%{ver} %{path1}* %{_datadir}/applications/idle%{ver}.desktop %files pip %defattr(-,root,root) %{_bindir}/pip%{ver} %{path7}* %{path3}* %files pip-wheel %defattr(-,root,root) %{_datadir}/%{name}-wheels %files tkinter %defattr(-,root,root) %{path5}* %{path5_1}* %files test %defattr(-,root,root) %{path4}* %files venv %defattr(-,root,root) %{path6}*