Beispiel #1
0
      stdout = stdout.decode("utf-8")
    return "CYGWIN" in str(stdout)
  except Exception:
    return False


def UnixifyPath(path):
  try:
    if not IsCygwin():
      return path
    out = subprocess.Popen(["cygpath", "-u", path],
            stdout=subprocess.PIPE,
            stderr=subprocess.STDOUT)
    stdout, stderr = out.communicate()
    if PY3:
      stdout = stdout.decode("utf-8")
    return str(stdout)
  except Exception:
    return path


# Make sure we're using the version of pylib in this repo, not one installed
# elsewhere on the system. Also convert to Unix style path on Cygwin systems,
# else the 'gyp' library will not be found
path = UnixifyPath(sys.argv[0])
sys.path.insert(0, os.path.join(os.path.dirname(path), 'pylib'))
import gyp

if __name__ == '__main__':
  sys.exit(gyp.script_main())
Beispiel #2
0
# Copyright (c) 2015, the Fletch project authors.  Please see the AUTHORS file
# for details. All rights reserved. Use of this source code is governed by a
# BSD-style license that can be found in the LICENSE file.

import os
import sys

script_dir = os.path.dirname(os.path.realpath(__file__))
fletch_src = os.path.abspath(os.path.join(script_dir, os.pardir))

assert os.path.exists(os.path.join(fletch_src, 'third_party', 'gyp', 'pylib'))
sys.path.append(os.path.join(fletch_src, 'third_party', 'gyp', 'pylib'))
import gyp

sys.path.append(os.path.join(fletch_src, 'tools', 'vs_dependency'))
import vs_toolchain

vs2013_runtime_dll_dirs = vs_toolchain.SetEnvironmentAndGetRuntimeDllDirs()

gyp_rc = gyp.script_main()

# TODO(herhut): Make the below work for fletch once compilation works.
if vs2013_runtime_dll_dirs:
  x64_runtime, x86_runtime = vs2013_runtime_dll_dirs
  vs_toolchain.CopyVsRuntimeDlls(
    os.path.join(fletch_src, "out"),
    (x86_runtime, x64_runtime))

sys.exit(gyp_rc)

Beispiel #3
0
#!/usr/bin/env python

# Copyright (c) 2009 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

import sys

# TODO(mark): sys.path manipulation is some temporary testing stuff.
try:
  import gyp
except ImportError, e:
  import os.path
  sys.path.append(os.path.join(os.path.dirname(sys.argv[0]), 'pylib'))
  import gyp

if __name__ == '__main__':
  sys.exit(gyp.script_main())
Beispiel #4
0
#!/usr/bin/env python
# Copyright (c) 2015, the Dartino project authors.  Please see the AUTHORS file
# for details. All rights reserved. Use of this source code is governed by a
# BSD-style license that can be found in the LICENSE file.

import os
import sys

script_dir = os.path.dirname(os.path.realpath(__file__))
dartino_src = os.path.abspath(os.path.join(script_dir, os.pardir))

assert os.path.exists(os.path.join(dartino_src, 'third_party', 'gyp', 'pylib'))
sys.path.append(os.path.join(dartino_src, 'third_party', 'gyp', 'pylib'))
import gyp

sys.path.append(os.path.join(dartino_src, 'tools', 'vs_dependency'))
import vs_toolchain

vs2013_runtime_dll_dirs = vs_toolchain.SetEnvironmentAndGetRuntimeDllDirs()

gyp_rc = gyp.script_main()

# TODO(herhut): Make the below work for dartino once compilation works.
if vs2013_runtime_dll_dirs:
    x64_runtime, x86_runtime = vs2013_runtime_dll_dirs
    vs_toolchain.CopyVsRuntimeDlls(os.path.join(dartino_src, "out"),
                                   (x86_runtime, x64_runtime))

sys.exit(gyp_rc)