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.

37 lines
1.8KB

  1. diff -Naur Python-3.8.0-orig/Lib/distutils/sysconfig.py Python-3.8.0/Lib/distutils/sysconfig.py
  2. --- Python-3.8.0-orig/Lib/distutils/sysconfig.py 2019-10-14 16:34:47.000000000 +0300
  3. +++ Python-3.8.0/Lib/distutils/sysconfig.py 2019-10-22 10:01:09.125758100 +0300
  4. @@ -170,7 +170,23 @@
  5. Mainly needed on Unix, so we can plug in the information that
  6. varies across Unices and is stored in Python's Makefile.
  7. """
  8. - if compiler.compiler_type == "unix":
  9. + global _config_vars
  10. + if compiler.compiler_type in ["cygwin", "mingw32"]:
  11. + # Note that cygwin use posix build and 'unix' compiler.
  12. + # If build is not based on posix then we must predefine
  13. + # some environment variables corresponding to posix
  14. + # build rules and defaults.
  15. + if not 'GCC' in sys.version:
  16. + _config_vars['CC'] = "gcc"
  17. + _config_vars['CXX'] = "g++"
  18. + _config_vars['OPT'] = "-fwrapv -O3 -Wall -Wstrict-prototypes"
  19. + _config_vars['CFLAGS'] = ""
  20. + _config_vars['CCSHARED'] = ""
  21. + _config_vars['LDSHARED'] = "gcc -shared -Wl,--enable-auto-image-base"
  22. + _config_vars['AR'] = "ar"
  23. + _config_vars['ARFLAGS'] = "rc"
  24. +
  25. + if compiler.compiler_type in ["unix", "cygwin", "mingw32"]:
  26. if sys.platform == "darwin":
  27. # Perform first-time customization of compiler-related
  28. # config vars on OS X now that we know we need a compiler.
  29. @@ -180,7 +196,6 @@
  30. # that Python itself was built on. Also the user OS
  31. # version and build tools may not support the same set
  32. # of CPU architectures for universal builds.
  33. - global _config_vars
  34. # Use get_config_var() to ensure _config_vars is initialized.
  35. if not get_config_var('CUSTOMIZED_OSX_COMPILER'):
  36. import _osx_support