diff --git a/macros.python b/macros.python index 334c0ab51ee06e91ca7e82dd3accf311b3181c32..59df73513baf08f0fb27bfe04522888e10525145 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 beb211ced4cee207b1a04e14edee851313b10874..753a2332ea167e1bd5246841727f7339c9bc96ea 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