@@ -253,11 +253,16 @@ def object_filenames(self, source_filenames, strip_dir=0, output_dir=''):
253
253
output_dir = ''
254
254
obj_names = []
255
255
for src_name in source_filenames :
256
- # use normcase to make sure '.rc' is really '.rc' and not '.RC'
257
- base , ext = os .path .splitext (os .path .normcase (src_name ))
256
+ base , ext = os .path .splitext (src_name )
257
+ # use 'normcase' only for resource suffixes
258
+ ext_normcase = os .path .normcase (ext )
259
+ if ext_normcase in ['.rc' ,'.res' ]:
260
+ ext = ext_normcase
258
261
if ext not in (self .src_extensions + ['.rc' ,'.res' ]):
259
262
raise UnknownFileError ("unknown file type '%s' (from '%s')" % \
260
263
(ext , src_name ))
264
+ base = os .path .splitdrive (base )[1 ] # Chop off the drive
265
+ base = base [os .path .isabs (base ):] # If abs, chop off leading /
261
266
if strip_dir :
262
267
base = os .path .basename (base )
263
268
if ext in ('.res' , '.rc' ):
@@ -313,7 +318,7 @@ def __init__(self, verbose=0, dry_run=0, force=0):
313
318
314
319
# Include the appropriate MSVC runtime library if Python was built
315
320
# with MSVC 7.0 or later.
316
- self .dll_libraries = get_msvcr ()
321
+ self .dll_libraries = get_msvcr () or []
317
322
318
323
# Because these compilers aren't configured in Python's pyconfig.h file by
319
324
# default, we should at least warn the user if he is using an unmodified
0 commit comments