@@ -124,6 +124,8 @@ def check_include_file(include_dirs, filename, package):
124124 """
125125 Raises an exception if the given include file can not be found.
126126 """
127+ if sys .platform == 'win32' :
128+ include_dirs .extend (os .getenv ('INCLUDE' , '.' ).split (';' ))
127129 if not has_include_file (include_dirs , filename ):
128130 raise CheckFailed (
129131 "The C/C++ header for %s (%s) could not be found. You "
@@ -1295,32 +1297,32 @@ def get_extension(self):
12951297
12961298 def add_flags (self , ext ):
12971299 if sys .platform == 'win32' :
1298- # popen broken on my win32 plaform so I can't use pkgconfig
1299- ext .library_dirs .extend (
1300- ['C:/GTK/bin' , 'C:/GTK/lib' ])
1301-
1302- ext .include_dirs .extend (
1303- ['win32_static/include/pygtk-2.0' ,
1304- 'C:/GTK/include' ,
1305- 'C:/GTK/include/gobject' ,
1306- 'C:/GTK/include/gext' ,
1307- 'C:/GTK/include/glib' ,
1308- 'C:/GTK/include/pango' ,
1309- 'C:/GTK/include/atk' ,
1310- 'C:/GTK/include/X11' ,
1311- 'C:/GTK/include/cairo' ,
1312- 'C:/GTK/include/gdk' ,
1313- 'C:/GTK/include/gdk-pixbuf' ,
1314- 'C:/GTK/include/gtk' ,
1315- ])
1316-
13171300 def getoutput (s ):
13181301 ret = os .popen (s ).read ().strip ()
13191302 return ret
13201303
13211304 if 'PKG_CONFIG_PATH' not in os .environ :
13221305 # If Gtk+ is installed, pkg-config is required to be installed
1323- os .environ ['PKG_CONFIG_PATH' ] = 'C:\GTK\lib\pkgconfig'
1306+ os .environ ['PKG_CONFIG_PATH' ] = 'C:\\ GTK\\ lib\\ pkgconfig'
1307+
1308+ # popen broken on my win32 plaform so I can't use pkgconfig
1309+ ext .library_dirs .extend (
1310+ ['C:/GTK/bin' , 'C:/GTK/lib' ])
1311+
1312+ ext .include_dirs .extend (
1313+ ['win32_static/include/pygtk-2.0' ,
1314+ 'C:/GTK/include' ,
1315+ 'C:/GTK/include/gobject' ,
1316+ 'C:/GTK/include/gext' ,
1317+ 'C:/GTK/include/glib' ,
1318+ 'C:/GTK/include/pango' ,
1319+ 'C:/GTK/include/atk' ,
1320+ 'C:/GTK/include/X11' ,
1321+ 'C:/GTK/include/cairo' ,
1322+ 'C:/GTK/include/gdk' ,
1323+ 'C:/GTK/include/gdk-pixbuf' ,
1324+ 'C:/GTK/include/gtk' ,
1325+ ])
13241326
13251327 pygtkIncludes = getoutput (
13261328 'pkg-config --cflags-only-I pygtk-2.0' ).split ()
0 commit comments