!1 Init package

From: @xinghe_1 
Reviewed-by: @xujing99, @jimmy_hero 
Signed-off-by: @jimmy_hero
This commit is contained in:
openeuler-ci-bot 2025-04-08 14:06:22 +00:00 committed by Gitee
commit 0b1d67a7a6
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
4 changed files with 48 additions and 0 deletions

View File

@ -0,0 +1,44 @@
%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

View File

@ -0,0 +1,4 @@
version_control: github
src_repo: indygreg/python-build-standalone
tag_prefix:
separator: