Define %python_sitelib, %python_sitearch, %python_version, %python_version_nodots
In rpm 4.15 those are no longer defined.
The meaning of "python" is derived from %__python - and that errors by default
unless user defined.
Example usage:
%global __python /usr/bin/pypy3
...
%files
%{python_sitelib}/foo/
This commit is contained in:
parent
813a86fcc6
commit
d38048d54d
2 changed files with 13 additions and 1 deletions
|
|
@ -1,3 +1,10 @@
|
|||
# unversioned macros: used with user defined __python, no longer part of rpm >= 4.15
|
||||
%__python %{error:attempt to use unversioned python, define %%__python to %{_bindir}/python2 or %{_bindir}/python3 explicitly}
|
||||
%python_sitelib %(%{__python} -Esc "from distutils.sysconfig import get_python_lib; print(get_python_lib())")
|
||||
%python_sitearch %(%{__python} -Esc "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")
|
||||
%python_version %(%{__python} -Esc "import sys; sys.stdout.write('{0.major}.{0.minor}'.format(sys.version_info))")
|
||||
%python_version_nodots %(%{__python} -Esc "import sys; sys.stdout.write('{0.major}{0.minor}'.format(sys.version_info))")
|
||||
|
||||
%py_setup setup.py
|
||||
%py_shbang_opts -s
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue