--- vim.spec.orig	2008-08-02 16:01:17.899705000 +0200
+++ vim.spec	2008-08-02 16:01:22.247466000 +0200
@@ -457,6 +457,14 @@
         -e 's;^/\* \(#define SYS_GVIMRC_FILE\).*$;\1 "%{l_prefix}/etc/vim/gvimrc";' \
         vim%{V_vs}/src/feature.h
 
+%if "%{with_python}" == "yes"
+    # fix python includes
+    %{l_shtool} subst \
+        -e 's;PYTHON_CFLAGS=.*$;PYTHON_CFLAGS="`python-config --includes`";' \
+        vim%{V_vs}/src/configure.in \
+        vim%{V_vs}/src/auto/configure
+%endif
+
 %build
     #   configure package
     cd vim%{V_vs}/src
@@ -501,6 +509,7 @@
 %endif
 %if "%{with_python}" == "yes"
         --enable-pythoninterp \
+        --with-python-config-dir=%{l_prefix}/lib/python/config \
 %endif
 %if "%{with_tcl}" == "yes"
         --enable-tclinterp \
