Cross-Platform build scripts for audio plugins
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

53 lines
2.4KB

  1. diff -Naur Python-3.8.0-orig/Lib/distutils/ccompiler.py Python-3.8.0/Lib/distutils/ccompiler.py
  2. --- Python-3.8.0-orig/Lib/distutils/ccompiler.py 2019-10-14 16:34:47.000000000 +0300
  3. +++ Python-3.8.0/Lib/distutils/ccompiler.py 2019-10-22 10:01:58.266844500 +0300
  4. @@ -9,7 +9,7 @@
  5. from distutils.file_util import move_file
  6. from distutils.dir_util import mkpath
  7. from distutils.dep_util import newer_pairwise, newer_group
  8. -from distutils.util import split_quoted, execute
  9. +from distutils.util import split_quoted, execute, get_platform
  10. from distutils import log
  11. class CCompiler:
  12. @@ -948,6 +948,8 @@
  13. osname = os.name
  14. if platform is None:
  15. platform = sys.platform
  16. + if True:
  17. + return 'mingw32'
  18. for pattern, compiler in _default_compilers:
  19. if re.match(pattern, platform) is not None or \
  20. re.match(pattern, osname) is not None:
  21. diff -Naur Python-3.8.0-orig/Lib/distutils/cygwinccompiler.py Python-3.8.0/Lib/distutils/cygwinccompiler.py
  22. --- Python-3.8.0-orig/Lib/distutils/cygwinccompiler.py 2019-10-14 16:34:47.000000000 +0300
  23. +++ Python-3.8.0/Lib/distutils/cygwinccompiler.py 2019-10-22 10:01:58.656845200 +0300
  24. @@ -255,11 +255,16 @@
  25. output_dir = ''
  26. obj_names = []
  27. for src_name in source_filenames:
  28. - # use normcase to make sure '.rc' is really '.rc' and not '.RC'
  29. - base, ext = os.path.splitext(os.path.normcase(src_name))
  30. + base, ext = os.path.splitext(src_name)
  31. + # use 'normcase' only for resource suffixes
  32. + ext_normcase = os.path.normcase(ext)
  33. + if ext_normcase in ['.rc','.res']:
  34. + ext = ext_normcase
  35. if ext not in (self.src_extensions + ['.rc','.res']):
  36. raise UnknownFileError("unknown file type '%s' (from '%s')" % \
  37. (ext, src_name))
  38. + base = os.path.splitdrive(base)[1] # Chop off the drive
  39. + base = base[os.path.isabs(base):] # If abs, chop off leading /
  40. if strip_dir:
  41. base = os.path.basename (base)
  42. if ext in ('.res', '.rc'):
  43. @@ -315,7 +320,7 @@
  44. # Include the appropriate MSVC runtime library if Python was built
  45. # with MSVC 7.0 or later.
  46. - self.dll_libraries = get_msvcr()
  47. + self.dll_libraries = get_msvcr() or []
  48. # Because these compilers aren't configured in Python's pyconfig.h file by
  49. # default, we should at least warn the user if he is using an unmodified