]> git.ipfire.org Git - ipfire-3.x.git/blobdiff - python/python.nm
python: Make package ready for x86_64.
[ipfire-3.x.git] / python / python.nm
index cfb8e03548392c8a55c9bb305ab12c0bda7837b3..2fe2004a685d92ddefe80b35cda7be5df018defe 100644 (file)
@@ -47,6 +47,12 @@ build
        export CFLAGS  += -D_GNU_SOURCE -fwrapv
 
        prepare_cmds
+               # Apply patches for x86_64.
+               if [ "$(uname -m)" = "x86_64" ]; then
+                       patch -Np1 -i %{DIR_SOURCE}/python-2.7.1-lib64.patch
+                       patch -Np1 -i %{DIR_SOURCE}/python-2.7-lib64-sysconfig.patch
+               fi
+
                sed -e "s/#*shared*/*shared*/g" -i Modules/Setup.dist
 
                # Remove embedded copies of expat, zlib and libffi
@@ -77,7 +83,7 @@ build
 
        install_cmds
                # All *.py files don't need to be executeable...
-               find %{BUILDROOT}%{libdir}/python*/ -name "*.py" | xargs chmod a-x -v
+               find %{BUILDROOT}%{libdir}/python*/ -name "*.py" | xargs -r chmod a-x -v
 
                # Create symlink for shared lib.
                ln -svf ../../libpython%{major_ver}.so %{BUILDROOT}%{libdir}/python%{major_ver}/config/