macros.python*: Use -Es/-I to invoke macro scriptlets
To avoid environment and user dir influence. https://bugzilla.redhat.com/show_bug.cgi?id=1506355
This commit is contained in:
parent
cb52c18aa9
commit
8d3d1dde64
|
@ -1,8 +1,8 @@
|
|||
%__python2 /usr/bin/python2
|
||||
%python2_sitelib %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")
|
||||
%python2_sitearch %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")
|
||||
%python2_version %(%{__python2} -c "import sys; sys.stdout.write('{0.major}.{0.minor}'.format(sys.version_info))")
|
||||
%python2_version_nodots %(%{__python2} -c "import sys; sys.stdout.write('{0.major}{0.minor}'.format(sys.version_info))")
|
||||
%python2_sitelib %(%{__python2} -Esc "from distutils.sysconfig import get_python_lib; print(get_python_lib())")
|
||||
%python2_sitearch %(%{__python2} -Esc "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")
|
||||
%python2_version %(%{__python2} -Esc "import sys; sys.stdout.write('{0.major}.{0.minor}'.format(sys.version_info))")
|
||||
%python2_version_nodots %(%{__python2} -Esc "import sys; sys.stdout.write('{0.major}{0.minor}'.format(sys.version_info))")
|
||||
|
||||
%py2_shbang_opts -s
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
%__python3 /usr/bin/python3
|
||||
%python3_sitelib %(%{__python3} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")
|
||||
%python3_sitearch %(%{__python3} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")
|
||||
%python3_version %(%{__python3} -c "import sys; sys.stdout.write(sys.version[:3])")
|
||||
%python3_version_nodots %(%{__python3} -c "import sys; sys.stdout.write(sys.version[:3].replace('.',''))")
|
||||
%python3_sitelib %(%{__python3} -Ic "from distutils.sysconfig import get_python_lib; print(get_python_lib())")
|
||||
%python3_sitearch %(%{__python3} -Ic "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")
|
||||
%python3_version %(%{__python3} -Ic "import sys; sys.stdout.write(sys.version[:3])")
|
||||
%python3_version_nodots %(%{__python3} -Ic "import sys; sys.stdout.write(sys.version[:3].replace('.',''))")
|
||||
%py3dir %{_builddir}/python3-%{name}-%{version}-%{release}
|
||||
|
||||
%py3_shbang_opts -s
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
Name: python-rpm-macros
|
||||
Version: 3
|
||||
Release: 22%{?dist}
|
||||
Release: 23%{?dist}
|
||||
Summary: The unversioned Python RPM macros
|
||||
|
||||
License: MIT
|
||||
|
@ -79,6 +79,9 @@ install -m 644 %{SOURCE0} %{SOURCE1} %{SOURCE2} %{SOURCE3} %{SOURCE4} \
|
|||
|
||||
|
||||
%changelog
|
||||
* Thu Oct 26 2017 Ville Skyttä <ville.skytta@iki.fi> - 3-23
|
||||
- Use -Es/-I to invoke macro scriptlets (#1506355)
|
||||
|
||||
* Wed Aug 02 2017 Tomas Orsava <torsava@redhat.com> - 3-22
|
||||
- Add platform-python macros (https://fedoraproject.org/wiki/Changes/Platform_Python_Stack)
|
||||
|
||||
|
|
Loading…
Reference in New Issue