I've got a Makefile that uses gtk-config to get the appropriate OpenGL includes and libraries: LDFLAGS = -shared -fPIC $(shell gtk-config --libs gtk gthread) -lGL -lgtkgl GTK_INCLUDES = $(shell gtk-config --cflags gtk gthread) CFLAGS = -I. $(CXX_INCLUDES) $(PYTHON_INCLUDES) $(GTK_INCLUDES) How do I do the equivalent in a Distutils script?