From 647c2383acc51b48427e2e0a3d9f7f12a0990c3f Mon Sep 17 00:00:00 2001 From: Funda Wang Date: Wed, 11 Dec 2024 16:45:11 +0800 Subject: [PATCH] update py_install_wheel declaration --- macros.python | 18 ++++++++++++++++-- openEuler-rpm-config.spec | 5 ++++- 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/macros.python b/macros.python index 334c0ab..59df735 100644 --- a/macros.python +++ b/macros.python @@ -63,7 +63,14 @@ find $bytecode_compilation_path -type f -a -name "*.py" -print0 | xargs -0 $pyth } %py_install_wheel() %{expand:\\\ - pip install -I dist/%{1} --root %{buildroot} --strip-file-prefix %{buildroot} --no-deps + %{__python} -m pip install -I dist/%{1} --root %{buildroot} --prefix %{_prefix} --no-deps --no-index --no-warn-script-location + rm -rfv %{buildroot}%{_bindir}/__pycache__ + for distinfo in %{buildroot}%{python_sitelib}/*.dist-info %{buildroot}%{python_sitearch}/*.dist-info; do + if [ -f ${distinfo}/direct_url.json ]; then + rm -fv ${distinfo}/direct_url.json + sed -i '/direct_url.json/d' ${distinfo}/RECORD + fi + done } %python_provide() %{lua: @@ -189,7 +196,14 @@ find $bytecode_compilation_path -type f -a -name "*.py" -print0 | xargs -0 $pyth } %py3_install_wheel() %{expand:\\\ - pip%{python3_version} install -I dist/%{1} --root %{buildroot} --no-deps + %{__python3} -m pip install -I dist/%{1} --root %{buildroot} --prefix %{_prefix} --no-deps --no-index --no-warn-script-location + rm -rfv %{buildroot}%{_bindir}/__pycache__ + for distinfo in %{buildroot}%{python3_sitelib}/*.dist-info %{buildroot}%{python3_sitearch}/*.dist-info; do + if [ -f ${distinfo}/direct_url.json ]; then + rm -fv ${distinfo}/direct_url.json + sed -i '/direct_url.json/d' ${distinfo}/RECORD + fi + done } # python3_pkgversion specifies the version of Python 3 in the distro. It can be # a specific version (e.g. 34 in Fedora EPEL7) diff --git a/openEuler-rpm-config.spec b/openEuler-rpm-config.spec index beb211c..753a233 100644 --- a/openEuler-rpm-config.spec +++ b/openEuler-rpm-config.spec @@ -3,7 +3,7 @@ Name: %{vendor}-rpm-config Version: 31 -Release: 8 +Release: 9 License: GPL+ Summary: specific rpm configuration files URL: https://gitee.com/src-openeuler/openEuler-rpm-config @@ -184,6 +184,9 @@ sed -i "s/@VENDOR@/%{vendor}/g" `grep "@VENDOR@" -rl %{buildroot}%{_rpmconfigdir %{rpmvdir}/find-requires.ksyms %changelog +* Wed Dec 11 2024 Funda Wang - 31-9 +- update py_install_wheel declaration + * Sat Nov 16 2024 Funda Wang - 31-8 - compile LLVM IR bitcode in object files or static libraries into ELF object code for clang < 18 -- Gitee