add macros to macros.python

This commit is contained in:
openeuler-basic 2020-01-14 17:41:51 +08:00
parent baaf83bfbd
commit 4a57c0491a
2 changed files with 13 additions and 1 deletions

View File

@ -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 <buildteam@openeuler.org> - 30-5
- Type:enhancement
- ID:NA
- SUG:NA
- DESC:add macros to macros.python
* Mon Jan 13 2020 openEuler Buildteam <buildteam@openeuler.org> - 30-4
- Type:enhancement
- ID:NA

View File

@ -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])")