diff options
author | Michael Scherer <misc@mandriva.com> | 2006-01-11 13:47:11 +0000 |
---|---|---|
committer | Michael Scherer <misc@mandriva.com> | 2006-01-11 13:47:11 +0000 |
commit | 0c1d7d7191d4e563c52a5934ae37285b72d562eb (patch) | |
tree | e441b46957e040b185ed08b55a59aac5cb181e97 /macros.in | |
parent | d4d6952df554d66eec8edc10d9234bc84edd72d2 (diff) | |
download | rpm-setup-0c1d7d7191d4e563c52a5934ae37285b72d562eb.tar rpm-setup-0c1d7d7191d4e563c52a5934ae37285b72d562eb.tar.gz rpm-setup-0c1d7d7191d4e563c52a5934ae37285b72d562eb.tar.bz2 rpm-setup-0c1d7d7191d4e563c52a5934ae37285b72d562eb.tar.xz rpm-setup-0c1d7d7191d4e563c52a5934ae37285b72d562eb.zip |
- add %py_platlibdir, %py_purelibdir and sister in order to be able to use a different directory for
pure python package and compiled python module.
use named arg function call for more readabilty and maintenability.
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 \ |