diff options
Diffstat (limited to 'macros.in')
-rw-r--r-- | macros.in | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -549,9 +549,15 @@ Internationalization and locale data for %{?1:%{1}}%{?!1:%{name}}\ # %py_ver %(python -c "import sys; v=sys.version_info[:2]; print '%%d.%%d'%%v" 2>/dev/null || echo PYTHON-NOT-FOUND) %py_prefix %(python -c "import sys; print sys.prefix" 2>/dev/null || echo PYTHON-NOT-FOUND) -%py_libdir %(python -c 'import distutils.sysconfig; print distutils.sysconfig.get_python_lib(0,1)' 2>/dev/null || echo PYTHON-LIBDIR-NOT-FOUND) +# backward compatibility +%py_libdir %py_purelibdir +%py_platlibdir %(python -c 'import distutils.sysconfig; print distutils.sysconfig.get_python_lib(standard_lib=1,plat_specific=1)' 2>/dev/null || echo PYTHON-LIBDIR-NOT-FOUND) +%py_purelibdir %(python -c 'import distutils.sysconfig; print distutils.sysconfig.get_python_lib(standard_lib=1,plat_specific=0)' 2>/dev/null || echo PYTHON-LIBDIR-NOT-FOUND) %py_incdir %(python -c 'import distutils.sysconfig; print distutils.sysconfig.get_python_inc()' 2>/dev/null || echo PYTHON-INCLUDEDIR-NOT-FOUND) -%py_sitedir %(python -c 'import distutils.sysconfig; print distutils.sysconfig.get_python_lib()' 2>/dev/null || echo PYTHON-SITEDIR-NOT-FOUND) +%py_sitedir %py_puresitedir +%py_platsitedir %(python -c 'import distutils.sysconfig; print distutils.sysconfig.get_python_lib(plat_specific=1)' 2>/dev/null || echo PYTHON-LIBDIR-NOT-FOUND) +%py_puresitedir %(python -c 'import distutils.sysconfig; print distutils.sysconfig.get_python_lib()' 2>/dev/null || echo PYTHON-LIBDIR-NOT-FOUND) + %py_compile(O) \ find %1 -name '*.pyc' -exec rm -f {} \\; \ python -c "import sys, os, compileall; br='%{buildroot}'; compileall.compile_dir(sys.argv[1], ddir=br and (sys.argv[1][len(os.path.abspath(br)):]+'/') or None)" %1 \ |