Sha256: 4ca6a9dfdbb18041c11bbd4bd841ec0cd96aeab8cee750dfc48a8d02a99551e4

Contents?: true

Size: 1.22 KB

Versions: 25

Compression:

Stored size: 1.22 KB

Contents

#!/usr/bin/env python3

# 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 os
import sys
import subprocess


def IsCygwin():
    # Function copied from pylib/gyp/common.py
    try:
        out = subprocess.Popen(
            "uname", stdout=subprocess.PIPE, stderr=subprocess.STDOUT
        )
        stdout, _ = out.communicate()
        return "CYGWIN" in stdout.decode("utf-8")
    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, _ = out.communicate()
        return stdout.decode("utf-8")
    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  # noqa: E402

if __name__ == "__main__":
    sys.exit(gyp.script_main())

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
immosquare-cleaner-0.1.52 node_modules/node-gyp/gyp/gyp_main.py
immosquare-cleaner-0.1.51 node_modules/node-gyp/gyp/gyp_main.py
immosquare-cleaner-0.1.50 node_modules/node-gyp/gyp/gyp_main.py
immosquare-cleaner-0.1.49 node_modules/node-gyp/gyp/gyp_main.py
immosquare-cleaner-0.1.48 node_modules/node-gyp/gyp/gyp_main.py
immosquare-cleaner-0.1.47 node_modules/node-gyp/gyp/gyp_main.py
immosquare-cleaner-0.1.46 node_modules/node-gyp/gyp/gyp_main.py
immosquare-cleaner-0.1.45 node_modules/node-gyp/gyp/gyp_main.py
immosquare-cleaner-0.1.44 node_modules/node-gyp/gyp/gyp_main.py
immosquare-cleaner-0.1.43 node_modules/node-gyp/gyp/gyp_main.py
immosquare-cleaner-0.1.42 node_modules/node-gyp/gyp/gyp_main.py
immosquare-cleaner-0.1.41 node_modules/node-gyp/gyp/gyp_main.py
immosquare-cleaner-0.1.40 node_modules/node-gyp/gyp/gyp_main.py
immosquare-cleaner-0.1.39 node_modules/node-gyp/gyp/gyp_main.py
immosquare-cleaner-0.1.38 node_modules/node-gyp/gyp/gyp_main.py
immosquare-cleaner-0.1.32 node_modules/node-gyp/gyp/gyp_main.py
immosquare-cleaner-0.1.31 node_modules/node-gyp/gyp/gyp_main.py
immosquare-cleaner-0.1.30 node_modules/node-gyp/gyp/gyp_main.py
immosquare-cleaner-0.1.29 node_modules/node-gyp/gyp/gyp_main.py
immosquare-cleaner-0.1.28 node_modules/node-gyp/gyp/gyp_main.py