diff --git a/generic-rpm-config.spec b/generic-rpm-config.spec index 43df33ff34029698eeb4552030c314651d676637..ef98beabbc00230a4a0c60eb803d1bece3c637e2 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 7ca581bbfc3bdddeb20d5f3b9b8550e1a2db3a57..ff0af95ef8e26083f89d7054f7ab594bdc0e549e 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])")