From 7a24dbb2f6dca9e0c30f75c3c9b12d81c41bd984 Mon Sep 17 00:00:00 2001 From: Omar Vega Ramos Date: Thu, 16 Jul 2015 14:21:34 -0500 Subject: sagemath: add new package to [libre] --- libre/sagemath/pexpect-env.patch | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 libre/sagemath/pexpect-env.patch (limited to 'libre/sagemath/pexpect-env.patch') diff --git a/libre/sagemath/pexpect-env.patch b/libre/sagemath/pexpect-env.patch new file mode 100644 index 000000000..99cf44885 --- /dev/null +++ b/libre/sagemath/pexpect-env.patch @@ -0,0 +1,32 @@ +diff -ru src.p4/pexpect.py src.new/pexpect.py +--- src.p4/pexpect.py 2009-01-23 11:01:57.000000000 +0100 ++++ src.new/pexpect.py 2012-01-12 13:38:06.000000000 +0100 +@@ -209,7 +209,7 @@ + Use this class to start and control child applications. + """ + +- def __init__(self, command, args=[], timeout=30, maxread=2000, searchwindowsize=None, logfile=None): ++ def __init__(self, command, args=[], timeout=30, maxread=2000, searchwindowsize=None, logfile=None, env=None): + """This is the constructor. The command parameter may be a string + that includes a command and any arguments to the command. For example: + p = pexpect.spawn ('/usr/bin/ftp') +@@ -302,6 +302,7 @@ + self.child_fd = -1 # initially closed + self.timeout = timeout + self.delimiter = EOF ++ self.env = env + self.logfile = logfile + self.maxread = maxread # Max bytes to read at one time into buffer. + self.buffer = '' # This is the read buffer. See maxread. +@@ -421,7 +422,10 @@ + # (specifically, Tomcat). + signal.signal(signal.SIGHUP, signal.SIG_IGN) + +- os.execv(self.command, self.args) ++ if self.env is None: ++ os.execv(self.command, self.args) ++ else: ++ os.execve(self.command, self.args, self.env) + + # Parent + self.terminated = 0 -- cgit v1.2.3-2-g168b