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
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/