From a20620c10933d811cedcc524008fcd8dcc548132 Mon Sep 17 00:00:00 2001 From: caodongxia <315816521@qq.com> Date: Thu, 11 May 2023 10:44:59 +0800 Subject: [PATCH] improve pyproject_install macro --- add-pyproject-macros.patch | 9 +++++---- openEuler-rpm-config.spec | 5 ++++- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/add-pyproject-macros.patch b/add-pyproject-macros.patch index 8190acd..c6664c9 100644 --- a/add-pyproject-macros.patch +++ b/add-pyproject-macros.patch @@ -4,8 +4,8 @@ Date: Thu, 13 Apr 2023 17:11:53 +0800 Subject: [PATCH] add pyproject macros --- - macros.python | 11 +++++++++++ - 1 file changed, 11 insertions(+) + macros.python | 12 +++++++++++ + 1 file changed, 12 insertions(+) diff --git a/macros.python b/macros.python index d504d3f..d5a7a86 100644 @@ -24,13 +24,14 @@ index d504d3f..d5a7a86 100644 %py_build_egg() %{expand:\\\ CFLAGS="${CFLAGS:-${RPM_OPT_FLAGS}}" LDFLAGS="${LDFLAGS:-${RPM_LD_FLAGS}}"\\\ %{__python} %{py_setup} %{?py_setup_args} bdist_egg %{?*} -@@ -45,6 +51,11 @@ find $bytecode_compilation_path -type f -a -name "*.py" -print0 | xargs -0 $pyth +@@ -45,6 +51,12 @@ find $bytecode_compilation_path -type f -a -name "*.py" -print0 | xargs -0 $pyth %{__python} %{py_setup} %{?py_setup_args} install -O1 --skip-build --root %{buildroot} %{?*} } +%pyproject_install() %{expand:\\\ ++ specifier=$(ls ./build/*.whl | xargs basename --multiple | sed -E 's/([^-]+)-([^-]+)-.+\\\.whl/\\\1==\\\2/') + CFLAGS="${CFLAGS:-${RPM_OPT_FLAGS}}" LDFLAGS="${LDFLAGS:-${RPM_LD_FLAGS}}"\\\ -+ %{__python3} -mpip install --verbose --progress-bar off --disable-pip-version-check --root %{buildroot} --no-compile --ignore-installed --no-deps --no-index --find-links ./build %{?*} ++ %{__python3} -mpip install --verbose --progress-bar off --disable-pip-version-check --root %{buildroot} --no-compile --ignore-installed --no-deps --no-index --find-links ./build $specifier %{?*} +} + %py_install_egg() %{expand:\\\ diff --git a/openEuler-rpm-config.spec b/openEuler-rpm-config.spec index 37baafa..fb07902 100644 --- a/openEuler-rpm-config.spec +++ b/openEuler-rpm-config.spec @@ -3,7 +3,7 @@ Name: %{vendor}-rpm-config Version: 30 -Release: 38 +Release: 39 License: GPL+ Summary: specific rpm configuration files URL: https://gitee.com/openeuler/openEuler-rpm-config @@ -141,6 +141,9 @@ sed -i "s/__vendor/%{vendor}/g" `grep "__vendor" -rl %{buildroot}%{_rpmconfigdir %{rpmvdir}/find-requires.ksyms %changelog +* Thu May 11 2023 caodongxia - 30-39 +- improve pyproject_install macro + * Thu Apr 20 2023 caodongxia - 30-38 - support pyproject compilation