--- texworks-0.5~svn930.orig/plugins-src/TWPythonPlugin/TWPythonPlugin.pro
+++ texworks-0.5~svn930/plugins-src/TWPythonPlugin/TWPythonPlugin.pro
@@ -50,8 +50,8 @@
 
 unix:!macx { # on Unix-ish platforms we should rely on pkgconfig
 	# Python prior to 3.x doesn't register properly with pkg-config
-	INCLUDEPATH	+= /usr/include/python2.6/
-	LIBS		+= -lpython2.6
+	INCLUDEPATH	+= /usr/include/$(PYTHON)/
+	LIBS		+= -l$(PYTHON)
 
 	# uncomment these lines (and comment those above) to use Python 3
 #	CONFIG		+= link_pkgconfig
