NodeJS 4.x LTS OBS-URL: https://build.opensuse.org/request/show/424018 OBS-URL: https://build.opensuse.org/package/show/devel:languages:nodejs/nodejs4?expand=0&rev=1
34 lines
1.3 KiB
Diff
34 lines
1.3 KiB
Diff
Index: node-v5.3.0/configure
|
|
===================================================================
|
|
--- node-v5.3.0.orig/configure
|
|
+++ node-v5.3.0/configure
|
|
@@ -9,6 +9,28 @@ import sys
|
|
import shutil
|
|
import string
|
|
|
|
+# http://stackoverflow.com/questions/28904750/python-check-output-workaround-in-2-6
|
|
+if "check_output" not in dir( subprocess ): # duck punch it in!
|
|
+ def check_output(*popenargs, **kwargs):
|
|
+ r"""Run command with arguments and return its output as a byte string.
|
|
+ Backported from Python 2.7 as it's implemented as pure python on stdlib.
|
|
+
|
|
+ >>> check_output(['/usr/bin/python', '--version'])
|
|
+ Python 2.6.2+ """
|
|
+ process = subprocess.Popen(stdout=subprocess.PIPE, *popenargs, **kwargs)
|
|
+ output, unused_err = process.communicate()
|
|
+ retcode = process.poll()
|
|
+ if retcode:
|
|
+ cmd = kwargs.get("args")
|
|
+ if cmd is None:
|
|
+ cmd = popenargs[0]
|
|
+ error = subprocess.CalledProcessError(retcode, cmd)
|
|
+ error.output = output
|
|
+ raise error
|
|
+ return output
|
|
+
|
|
+ subprocess.check_output = check_output
|
|
+
|
|
# gcc and g++ as defaults matches what GYP's Makefile generator does,
|
|
# except on OS X.
|
|
CC = os.environ.get('CC', 'cc' if sys.platform == 'darwin' else 'gcc')
|