diff --git a/cpython-3.9.12+20220502-aarch64-unknown-linux-gnu-install_only.tar.gz b/cpython-3.9.12+20220502-aarch64-unknown-linux-gnu-install_only.tar.gz new file mode 100644 index 0000000..a48dc98 Binary files /dev/null and b/cpython-3.9.12+20220502-aarch64-unknown-linux-gnu-install_only.tar.gz differ diff --git a/cpython-3.9.12+20220502-x86_64-unknown-linux-gnu-install_only.tar.gz b/cpython-3.9.12+20220502-x86_64-unknown-linux-gnu-install_only.tar.gz new file mode 100644 index 0000000..c3dcf69 Binary files /dev/null and b/cpython-3.9.12+20220502-x86_64-unknown-linux-gnu-install_only.tar.gz differ diff --git a/python-build-standalone.spec b/python-build-standalone.spec new file mode 100644 index 0000000..f240339 --- /dev/null +++ b/python-build-standalone.spec @@ -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 - 20220502-1 +- Init Package diff --git a/python-build-standalone.yaml b/python-build-standalone.yaml new file mode 100644 index 0000000..6e5390b --- /dev/null +++ b/python-build-standalone.yaml @@ -0,0 +1,4 @@ +version_control: github +src_repo: indygreg/python-build-standalone +tag_prefix: +separator: