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.

94 lines
3.8KB

  1. diff -Naur Python-3.8.0-orig/Lib/distutils/command/install.py Python-3.8.0/Lib/distutils/command/install.py
  2. --- Python-3.8.0-orig/Lib/distutils/command/install.py 2019-10-14 16:34:47.000000000 +0300
  3. +++ Python-3.8.0/Lib/distutils/command/install.py 2019-10-22 10:03:18.045384600 +0300
  4. @@ -341,7 +341,8 @@
  5. # Convert directories from Unix /-separated syntax to the local
  6. # convention.
  7. - self.convert_paths('lib', 'purelib', 'platlib',
  8. + self.convert_paths('base', 'platbase',
  9. + 'lib', 'purelib', 'platlib',
  10. 'scripts', 'data', 'headers',
  11. 'userbase', 'usersite')
  12. diff -Naur Python-3.8.0-orig/Lib/distutils/util.py Python-3.8.0/Lib/distutils/util.py
  13. --- Python-3.8.0-orig/Lib/distutils/util.py 2019-10-22 10:01:56.753641800 +0300
  14. +++ Python-3.8.0/Lib/distutils/util.py 2019-10-22 10:03:18.450985300 +0300
  15. @@ -130,6 +130,13 @@
  16. paths.remove('.')
  17. if not paths:
  18. return os.curdir
  19. + # On Windows, if paths is ['C:','folder','subfolder'] then
  20. + # os.path.join(*paths) will return 'C:folder\subfolder' which
  21. + # is thus relative to the CWD on that drive. So we work around
  22. + # this by adding a \ to path[0]
  23. + if (len(paths) > 0 and paths[0].endswith(':') and
  24. + sys.platform == "win32" and sys.version.find("GCC") >= 0):
  25. + paths[0] += '\\'
  26. return os.path.join(*paths)
  27. # convert_path ()
  28. @@ -140,6 +147,10 @@
  29. relative, this is equivalent to "os.path.join(new_root,pathname)".
  30. Otherwise, it requires making 'pathname' relative and then joining the
  31. two, which is tricky on DOS/Windows and Mac OS.
  32. +
  33. + If on Windows or OS/2 and both new_root and pathname are on different
  34. + drives, raises DistutilsChangeRootError as this is nonsensical,
  35. + otherwise use drive which can be in either of new_root or pathname.
  36. """
  37. if os.name == 'posix':
  38. if not os.path.isabs(pathname):
  39. @@ -149,9 +160,20 @@
  40. elif os.name == 'nt':
  41. (drive, path) = os.path.splitdrive(pathname)
  42. - if path[0] == '\\':
  43. + if path[0] == os.sep:
  44. path = path[1:]
  45. - return os.path.join(new_root, path)
  46. + (drive_r, path_r) = os.path.splitdrive(new_root)
  47. + if path_r and path_r[0] == os.sep:
  48. + path_r = path_r[1:]
  49. + drive_used = ''
  50. + if len(drive) == 2 and len(drive_r) == 2 and drive != drive_r:
  51. + raise DistutilsChangeRootError("root and pathname not on same drive (%s, %s)"
  52. + % (drive_r,drive))
  53. + elif len(drive_r) == 2:
  54. + drive_used = drive_r+os.sep
  55. + elif len(drive) == 2:
  56. + drive_used = drive+os.sep
  57. + return os.path.join(drive_used+path_r, path)
  58. else:
  59. raise DistutilsPlatformError("nothing known about platform '%s'" % os.name)
  60. diff -Naur Python-3.8.0-orig/Makefile.pre.in Python-3.8.0/Makefile.pre.in
  61. --- Python-3.8.0-orig/Makefile.pre.in 2019-10-22 10:02:59.949352800 +0300
  62. +++ Python-3.8.0/Makefile.pre.in 2019-10-22 10:03:18.840986000 +0300
  63. @@ -1612,6 +1612,12 @@
  64. else true; \
  65. fi
  66. +ifeq (Msys,Msys)
  67. +DESTDIRFINAL=$(DESTDIR)
  68. +else
  69. +DESTDIRFINAL=$(DESTDIR)/
  70. +endif
  71. +
  72. # Install the dynamically loadable modules
  73. # This goes into $(exec_prefix)
  74. sharedinstall: sharedmods
  75. @@ -1619,9 +1625,9 @@
  76. --prefix=$(prefix) \
  77. --install-scripts=$(BINDIR) \
  78. --install-platlib=$(DESTSHARED) \
  79. - --root=$(DESTDIR)/
  80. - -rm $(DESTDIR)$(DESTSHARED)/_sysconfigdata_$(ABIFLAGS)_$(MACHDEP)_$(MULTIARCH).py
  81. - -rm -r $(DESTDIR)$(DESTSHARED)/__pycache__
  82. + --root=$(DESTDIRFINAL)
  83. + -rm $(DESTDIRFINAL)$(DESTSHARED)/_sysconfigdata_$(ABIFLAGS)_$(MACHDEP)_$(MULTIARCH).py
  84. + -rm -r $(DESTDIRFINAL)$(DESTSHARED)/__pycache__
  85. # Here are a couple of targets for MacOSX again, to install a full
  86. # framework-based Python. frameworkinstall installs everything, the