I think msys-python multiprocessing is broken though as it calls mingw-w64-python instead of msys-python. This is not a in for this package, but it might be wise to prevent gyp from using multiprocessing until it is fixed.
193 lines
7.5 KiB
Diff
193 lines
7.5 KiB
Diff
diff -Naur gyp-orig/buildbot/buildbot_run.py gyp/buildbot/buildbot_run.py
|
|
--- gyp-orig/buildbot/buildbot_run.py 2014-02-06 15:52:52.933400000 +0400
|
|
+++ gyp/buildbot/buildbot_run.py 2014-02-06 16:00:51.213600000 +0400
|
|
@@ -13,7 +13,7 @@
|
|
import sys
|
|
|
|
|
|
-if sys.platform in ['win32', 'cygwin']:
|
|
+if sys.platform in ['win32', 'cygwin', 'msys']:
|
|
EXE_SUFFIX = '.exe'
|
|
else:
|
|
EXE_SUFFIX = ''
|
|
diff -Naur gyp-orig/gyptest.py gyp/gyptest.py
|
|
--- gyp-orig/gyptest.py 2014-02-06 15:52:50.000600000 +0400
|
|
+++ gyp/gyptest.py 2014-02-06 15:56:47.260200000 +0400
|
|
@@ -221,6 +221,7 @@
|
|
'freebsd8': ['make'],
|
|
'openbsd5': ['make'],
|
|
'cygwin': ['msvs'],
|
|
+ 'msys': ['msvs'],
|
|
'win32': ['msvs', 'ninja'],
|
|
'linux2': ['make', 'ninja'],
|
|
'linux3': ['make', 'ninja'],
|
|
diff -Naur gyp-orig/pylib/gyp/__init__.py gyp/pylib/gyp/__init__.py
|
|
--- gyp-orig/pylib/gyp/__init__.py 2014-02-06 15:51:58.005800000 +0400
|
|
+++ gyp/pylib/gyp/__init__.py 2014-02-06 16:02:40.678800000 +0400
|
|
@@ -349,7 +349,7 @@
|
|
|
|
if not home_dot_gyp:
|
|
home_vars = ['HOME']
|
|
- if sys.platform in ('cygwin', 'win32'):
|
|
+ if sys.platform in ('cygwin', 'msys', 'win32'):
|
|
home_vars.append('USERPROFILE')
|
|
for home_var in home_vars:
|
|
home = os.getenv(home_var)
|
|
@@ -378,7 +378,7 @@
|
|
# Nothing in the variable, default based on platform.
|
|
if sys.platform == 'darwin':
|
|
options.formats = ['xcode']
|
|
- elif sys.platform in ('win32', 'cygwin'):
|
|
+ elif sys.platform in ('win32', 'cygwin', 'msys'):
|
|
options.formats = ['msvs']
|
|
else:
|
|
options.formats = ['make']
|
|
diff -Naur gyp-orig/pylib/gyp/common.py gyp/pylib/gyp/common.py
|
|
--- gyp-orig/pylib/gyp/common.py 2014-02-06 15:51:57.974600000 +0400
|
|
+++ gyp/pylib/gyp/common.py 2014-02-06 16:01:09.964800000 +0400
|
|
@@ -403,6 +403,7 @@
|
|
"""Returns |params.flavor| if it's set, the system's default flavor else."""
|
|
flavors = {
|
|
'cygwin': 'win',
|
|
+ 'msys': 'win',
|
|
'win32': 'win',
|
|
'darwin': 'mac',
|
|
}
|
|
diff -Naur gyp-orig/pylib/gyp/generator/ninja.py gyp/pylib/gyp/generator/ninja.py
|
|
--- gyp-orig/pylib/gyp/generator/ninja.py 2014-02-06 15:51:58.068200000 +0400
|
|
+++ gyp/pylib/gyp/generator/ninja.py 2014-02-06 16:03:40.723200000 +0400
|
|
@@ -1535,7 +1535,7 @@
|
|
if pool_size:
|
|
return pool_size
|
|
|
|
- if sys.platform in ('win32', 'cygwin'):
|
|
+ if sys.platform in ('win32', 'cygwin', 'msys'):
|
|
import ctypes
|
|
|
|
class MEMORYSTATUSEX(ctypes.Structure):
|
|
diff -Naur gyp-orig/pylib/gyp/MSVSVersion.py gyp/pylib/gyp/MSVSVersion.py
|
|
--- gyp-orig/pylib/gyp/MSVSVersion.py 2014-02-06 15:51:57.990200000 +0400
|
|
+++ gyp/pylib/gyp/MSVSVersion.py 2014-02-06 16:01:41.133600000 +0400
|
|
@@ -120,7 +120,7 @@
|
|
stdout from reg.exe, or None for failure.
|
|
"""
|
|
# Skip if not on Windows or Python Win32 setup issue
|
|
- if sys.platform not in ('win32', 'cygwin'):
|
|
+ if sys.platform not in ('win32', 'cygwin', 'msys'):
|
|
return None
|
|
# Setup params to pass to and attempt to launch reg.exe
|
|
cmd = [os.path.join(os.environ.get('WINDIR', ''), sysdir, 'reg.exe'),
|
|
@@ -297,7 +297,7 @@
|
|
|
|
def _ConvertToCygpath(path):
|
|
"""Convert to cygwin path if we are using cygwin."""
|
|
- if sys.platform == 'cygwin':
|
|
+ if sys.platform in ('cygwin', 'msys'):
|
|
p = subprocess.Popen(['cygpath', path], stdout=subprocess.PIPE)
|
|
path = p.communicate()[0].strip()
|
|
return path
|
|
diff -Naur gyp-orig/test/actions-multiple/gyptest-all.py gyp/test/actions-multiple/gyptest-all.py
|
|
--- gyp-orig/test/actions-multiple/gyptest-all.py 2014-02-06 15:52:15.181400000 +0400
|
|
+++ gyp/test/actions-multiple/gyptest-all.py 2014-02-06 16:04:08.709600000 +0400
|
|
@@ -35,7 +35,7 @@
|
|
if test.format == 'make':
|
|
target = 'multi2.txt'
|
|
elif test.format == 'ninja':
|
|
- if sys.platform in ['win32', 'cygwin']:
|
|
+ if sys.platform in ['win32', 'cygwin', 'msys']:
|
|
target = '..\\..\\multi2.txt'
|
|
else:
|
|
target = '../../multi2.txt'
|
|
diff -Naur gyp-orig/test/lib/TestCommon.py gyp/test/lib/TestCommon.py
|
|
--- gyp-orig/test/lib/TestCommon.py 2014-02-06 15:52:31.405400000 +0400
|
|
+++ gyp/test/lib/TestCommon.py 2014-02-06 16:04:38.958000000 +0400
|
|
@@ -125,7 +125,7 @@
|
|
lib_suffix = '.lib'
|
|
dll_prefix = ''
|
|
dll_suffix = '.dll'
|
|
-elif sys.platform == 'cygwin':
|
|
+elif sys.platform in ('cygwin', 'msys'):
|
|
exe_suffix = '.exe'
|
|
obj_suffix = '.o'
|
|
shobj_suffix = '.os'
|
|
diff -Naur gyp-orig/test/lib/TestGyp.py gyp/test/lib/TestGyp.py
|
|
--- gyp-orig/test/lib/TestGyp.py 2014-02-06 15:52:31.421000000 +0400
|
|
+++ gyp/test/lib/TestGyp.py 2014-02-06 16:05:16.257600000 +0400
|
|
@@ -725,7 +725,7 @@
|
|
|
|
def ConvertToCygpath(path):
|
|
"""Convert to cygwin path if we are using cygwin."""
|
|
- if sys.platform == 'cygwin':
|
|
+ if sys.platform in ('cygwin', 'msys'):
|
|
p = subprocess.Popen(['cygpath', path], stdout=subprocess.PIPE)
|
|
path = p.communicate()[0].strip()
|
|
return path
|
|
@@ -805,7 +805,7 @@
|
|
|
|
def initialize_build_tool(self):
|
|
super(TestGypOnMSToolchain, self).initialize_build_tool()
|
|
- if sys.platform in ('win32', 'cygwin'):
|
|
+ if sys.platform in ('win32', 'cygwin', 'msys'):
|
|
build_tools = FindVisualStudioInstallation()
|
|
self.devenv_path, self.uses_msbuild, self.msbuild_path = build_tools
|
|
self.vsvars_path = TestGypOnMSToolchain._ComputeVsvarsPath(
|
|
@@ -813,7 +813,7 @@
|
|
def run_dumpbin(self, *dumpbin_args):
|
|
"""Run the dumpbin tool with the specified arguments, and capturing and
|
|
returning stdout."""
|
|
- assert sys.platform in ('win32', 'cygwin')
|
|
+ assert sys.platform in ('win32', 'cygwin', 'msys')
|
|
cmd = os.environ.get('COMSPEC', 'cmd.exe')
|
|
arguments = [cmd, '/c', self.vsvars_path, '&&', 'dumpbin']
|
|
arguments.extend(dumpbin_args)
|
|
diff -Naur gyp-orig/test/library_dirs/gyptest-library-dirs.py gyp/test/library_dirs/gyptest-library-dirs.py
|
|
--- gyp-orig/test/library_dirs/gyptest-library-dirs.py 2014-02-06 15:51:58.754600000 +0400
|
|
+++ gyp/test/library_dirs/gyptest-library-dirs.py 2014-02-06 16:05:33.480000000 +0400
|
|
@@ -31,7 +31,7 @@
|
|
test.run_built_executable(
|
|
'libraries-search-path-test', chdir='subdir', stdout=expect)
|
|
|
|
-if sys.platform in ('win32', 'cygwin'):
|
|
+if sys.platform in ('win32', 'cygwin', 'msys'):
|
|
test.run_gyp('test-win.gyp',
|
|
'-D',
|
|
'abs_path_to_secret_library_location={0}'.format(lib_dir),
|
|
diff -Naur gyp-orig/test/rules/src/external/external.gyp gyp/test/rules/src/external/external.gyp
|
|
--- gyp-orig/test/rules/src/external/external.gyp 2014-02-06 15:52:15.337400000 +0400
|
|
+++ gyp/test/rules/src/external/external.gyp 2014-02-06 18:56:28.516800000 +0400
|
|
@@ -19,7 +19,7 @@
|
|
'conditions': [
|
|
['OS=="win"', {
|
|
'dependencies': [
|
|
- 'cygwin',
|
|
+ 'msys',
|
|
],
|
|
}],
|
|
],
|
|
diff -Naur gyp-orig/test/target/gyptest-target.py gyp/test/target/gyptest-target.py
|
|
--- gyp-orig/test/target/gyptest-target.py 2014-02-06 15:52:11.765000000 +0400
|
|
+++ gyp/test/target/gyptest-target.py 2014-02-06 18:56:58.710600000 +0400
|
|
@@ -13,7 +13,7 @@
|
|
import sys
|
|
import TestGyp
|
|
|
|
-if sys.platform in ('win32', 'cygwin'):
|
|
+if sys.platform in ('win32', 'cygwin', 'msys'):
|
|
test = TestGyp.TestGyp()
|
|
|
|
test.run_gyp('target.gyp')
|
|
--- gyp-orig/pylib/gyp/generator/make.py 2014-02-07 11:51:03.172209400 +0000
|
|
+++ gyp/pylib/gyp/generator/make.py 2014-02-07 16:36:18.811209400 +0000
|
|
@@ -1314,7 +1314,10 @@
|
|
if target[:3] == 'lib':
|
|
target = target[3:]
|
|
target_prefix = 'lib'
|
|
- target_ext = '.so'
|
|
+ if self.flavor == 'win':
|
|
+ target_ext = '.dll'
|
|
+ else:
|
|
+ target_ext = '.so'
|
|
elif self.type == 'none':
|
|
target = '%s.stamp' % target
|
|
elif self.type != 'executable':
|