aboutsummaryrefslogtreecommitdiff
path: root/sandbox/testAppNevena/Front/node_modules/node-gyp/gyp/gyp_main.py
diff options
context:
space:
mode:
authorNevena Bojovic <nenabojov@gmail.com>2022-03-01 20:05:50 +0100
committerNevena Bojovic <nenabojov@gmail.com>2022-03-01 20:05:50 +0100
commit291803c31f829fe0d32bb3207bc11def95a7408c (patch)
treec7d43107d79291b19d8c9eceefbe91c9f9a52acf /sandbox/testAppNevena/Front/node_modules/node-gyp/gyp/gyp_main.py
parent1fa69862057db4db53cfda5be9c24b4228ef63f7 (diff)
Urađena test aplikacija. Povezan front i back.
Diffstat (limited to 'sandbox/testAppNevena/Front/node_modules/node-gyp/gyp/gyp_main.py')
-rw-r--r--sandbox/testAppNevena/Front/node_modules/node-gyp/gyp/gyp_main.py45
1 files changed, 45 insertions, 0 deletions
diff --git a/sandbox/testAppNevena/Front/node_modules/node-gyp/gyp/gyp_main.py b/sandbox/testAppNevena/Front/node_modules/node-gyp/gyp/gyp_main.py
new file mode 100644
index 00000000..f23dcdf8
--- /dev/null
+++ b/sandbox/testAppNevena/Front/node_modules/node-gyp/gyp/gyp_main.py
@@ -0,0 +1,45 @@
+#!/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())