From 4a57c0491a2ca583ff27152533f63ac60229a036 Mon Sep 17 00:00:00 2001 From: openeuler-basic Date: Tue, 14 Jan 2020 17:41:51 +0800 Subject: [PATCH] add macros to macros.python --- generic-rpm-config.spec | 8 +++++++- macros.python | 6 ++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/generic-rpm-config.spec b/generic-rpm-config.spec index 43df33f..ef98bea 100644 --- a/generic-rpm-config.spec +++ b/generic-rpm-config.spec @@ -2,7 +2,7 @@ Name: %{vendor}-rpm-config Version: 30 -Release: 4 +Release: 5 License: GPL+ Summary: specific rpm configuration files URL: https://gitee.com/src-openeuler/openEuler-rpm-config @@ -104,6 +104,12 @@ mkdir -p %{buildroot}%{_fileattrsdir} %{_rpmconfigdir}/macros.d/* %changelog +* Tue Jan 14 2020 openEuler Buildteam - 30-5 +- Type:enhancement +- ID:NA +- SUG:NA +- DESC:add macros to macros.python + * Mon Jan 13 2020 openEuler Buildteam - 30-4 - Type:enhancement - ID:NA diff --git a/macros.python b/macros.python index 7ca581b..ff0af95 100644 --- a/macros.python +++ b/macros.python @@ -289,3 +289,9 @@ find $bytecode_compilation_path -type f -a -name "*.py" -print0 | xargs -0 $pyth \ print(url .. first .. '/' .. src .. '/' .. src .. '-' .. ver .. '.' .. ext) } + +# New python macros +%__python /usr/bin/python +%python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; import sys; sys.stdout.write(get_python_lib())") +%python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; import sys; sys.stdout.write(get_python_lib(1))") +%python_version %(%{__python} -c "import sys; sys.stdout.write(sys.version[:3])") -- Gitee