[Distutils] Patch for build_ext.py (Win32)

Lyle Johnson jlj@cfd1.cfdrc.com
Wed, 12 Apr 2000 17:43:19 -0500


Here's a patch for distutils/command/build_ext.py to ensure that the output
directory for scratch files created while building the extension DLL
actually exists.

Index: build_ext.py
===================================================================
RCS file: /projects/cvsroot/distutils/distutils/command/build_ext.py,v
retrieving revision 1.30
diff -c -r1.30 build_ext.py
*** build_ext.py	2000/04/10 00:19:42	1.30
--- build_ext.py	2000/04/12 22:33:10
***************
*** 331,336 ****
--- 331,342 ----
                  implib_dir = os.path.join(self.build_temp,\

self.get_ext_libname(extension_name))
                  extra_args.append ('/IMPLIB:' + implib_dir)
+
+ 		# Ensure that this directory exists!
+ 		ext_path = string.split(extension_name, '.')
+ 		ext_path = apply(os.path.join, ext_path[:-1])
+ 		self.mkpath(os.path.join(self.build_temp, ext_path))
+
              # if MSVC

              fullname = self.get_ext_fullname (extension_name)