45 lines
1.8 KiB
RPMSpec
45 lines
1.8 KiB
RPMSpec
|
|
%global debug_package %{nil}
|
||
|
|
%define src_install_dir /usr/src/%{name}
|
||
|
|
|
||
|
|
Name: python-build-standalone
|
||
|
|
Version: 20220502
|
||
|
|
Release: 1
|
||
|
|
Summary: Produce redistributable builds of Python
|
||
|
|
License: MPL-2.0
|
||
|
|
URL: https://github.com/indygreg/python-build-standalone
|
||
|
|
Source0: https://github.com/indygreg/%{name}/releases/download/%{version}/cpython-3.9.12+%{version}-%{_arch}-unknown-linux-gnu-install_only.tar.gz
|
||
|
|
Source1: https://github.com/indygreg/%{name}/releases/download/%{version}/cpython-3.9.12+%{version}-aarch64-unknown-linux-gnu-install_only.tar.gz
|
||
|
|
Source2: https://github.com/indygreg/%{name}/releases/download/%{version}/cpython-3.9.12+%{version}-x86_64-unknown-linux-gnu-install_only.tar.gz
|
||
|
|
|
||
|
|
%description
|
||
|
|
Produce redistributable builds of Python
|
||
|
|
|
||
|
|
%package source
|
||
|
|
Summary: Source code of python-build-standalone
|
||
|
|
|
||
|
|
%description source
|
||
|
|
Produce redistributable builds of Python
|
||
|
|
|
||
|
|
%prep
|
||
|
|
%setup -q -n python
|
||
|
|
|
||
|
|
%build
|
||
|
|
|
||
|
|
%install
|
||
|
|
mkdir -p %{buildroot}%{src_install_dir}
|
||
|
|
%ifarch x86_64 aarch64
|
||
|
|
tar -xf %{SOURCE0} --strip-components=1 -C %{buildroot}%{src_install_dir}
|
||
|
|
rm -rf %{buildroot}%{src_install_dir}/lib/python3.9/test %{buildroot}%{src_install_dir}/lib/python3.9/lib2to3/tests
|
||
|
|
sed -i 's/\t/ /g' %{buildroot}%{src_install_dir}/lib/Tix8.4.3/pref/WmDefault.py
|
||
|
|
sed -i 's/print retval/print(retval)/g' %{buildroot}%{src_install_dir}/lib/Tix8.4.3/pref/WmDefault.py
|
||
|
|
sed -i "s|\/usr\/local\/bin\/python|\/usr\/bin\/env python3|g" %{buildroot}%{src_install_dir}/lib/python3.9/cgi.py
|
||
|
|
sed -i "s|\/install\/bin\/python3.9|\/usr\/bin\/env python3|g" %{buildroot}%{src_install_dir}/lib/python3.9/config-3.9-%{_arch}-linux-gnu/python-config.py
|
||
|
|
%endif
|
||
|
|
|
||
|
|
%files source
|
||
|
|
%{src_install_dir}
|
||
|
|
|
||
|
|
%changelog
|
||
|
|
* Mon Apr 07 2025 xinghe <xinghe2@h-partners.com> - 20220502-1
|
||
|
|
- Init Package
|