Fix up issue with python2_version* macros

Also move the macros to the proper location (%rpmmacrodir) and copy over
one fix from the macros that were in epel-rpm-macros.
This commit is contained in:
Jason Tibbitts 2016-09-15 15:40:12 -05:00
commit 83441663a4
2 changed files with 18 additions and 10 deletions

View file

@ -1,8 +1,8 @@
%__python2 /usr/bin/python2
%__python2 /usr/bin/python2.6
%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_version %(%{__python2} -c "import sys; sys.stdout.write(sys.version[:3])")
%python2_version_nodots %(%{__python2} -c "import sys; sys.stdout.write(sys.version[:3:2])")
%py2_shbang_opts -s