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.

58 lines
2.5KB

  1. diff -Naur Python-3.8.0-orig/Lib/distutils/command/build_ext.py Python-3.8.0/Lib/distutils/command/build_ext.py
  2. --- Python-3.8.0-orig/Lib/distutils/command/build_ext.py 2019-10-14 16:34:47.000000000 +0300
  3. +++ Python-3.8.0/Lib/distutils/command/build_ext.py 2019-10-22 10:01:53.789636600 +0300
  4. @@ -186,7 +186,7 @@
  5. # for extensions under windows use different directories
  6. # for Release and Debug builds.
  7. # also Python's library directory must be appended to library_dirs
  8. - if os.name == 'nt':
  9. + if False:
  10. # the 'libs' directory is for binary installs - we assume that
  11. # must be the *native* platform. But we don't really support
  12. # cross-compiling via a binary install anyway, so we let it go.
  13. @@ -703,6 +703,20 @@
  14. # pyconfig.h that MSVC groks. The other Windows compilers all seem
  15. # to need it mentioned explicitly, though, so that's what we do.
  16. # Append '_d' to the python import library on debug builds.
  17. +
  18. + # Use self.plat_name as it works even in case of
  19. + # cross-compilation (at least for mingw build).
  20. + if True:
  21. + from distutils import sysconfig
  22. + extra = []
  23. + for lib in (
  24. + sysconfig.get_config_var('BLDLIBRARY').split()
  25. + + sysconfig.get_config_var('SHLIBS').split()
  26. + ):
  27. + if lib.startswith('-l'):
  28. + extra.append(lib[2:])
  29. + return ext.libraries + extra
  30. +
  31. if sys.platform == "win32":
  32. from distutils._msvccompiler import MSVCCompiler
  33. if not isinstance(self.compiler, MSVCCompiler):
  34. diff -Naur Python-3.8.0-orig/Lib/distutils/util.py Python-3.8.0/Lib/distutils/util.py
  35. --- Python-3.8.0-orig/Lib/distutils/util.py 2019-10-14 16:34:47.000000000 +0300
  36. +++ Python-3.8.0/Lib/distutils/util.py 2019-10-22 10:01:54.210837300 +0300
  37. @@ -36,6 +36,8 @@
  38. """
  39. if os.name == 'nt':
  40. + if True:
  41. + return 'mingw'
  42. if 'amd64' in sys.version.lower():
  43. return 'win-amd64'
  44. if '(arm)' in sys.version.lower():
  45. diff -Naur Python-3.8.0-orig/Lib/sysconfig.py Python-3.8.0/Lib/sysconfig.py
  46. --- Python-3.8.0-orig/Lib/sysconfig.py 2019-10-22 10:00:21.731874800 +0300
  47. +++ Python-3.8.0/Lib/sysconfig.py 2019-10-22 10:01:54.600838000 +0300
  48. @@ -643,6 +643,8 @@
  49. """
  50. if os.name == 'nt':
  51. + if True:
  52. + return 'mingw'
  53. if 'amd64' in sys.version.lower():
  54. return 'win-amd64'
  55. if '(arm)' in sys.version.lower():