diff options
author | Omar Vega Ramos <ovruni@gnu.org.pe> | 2015-07-16 14:21:34 -0500 |
---|---|---|
committer | Omar Vega Ramos <ovruni@gnu.org.pe> | 2015-07-16 14:21:34 -0500 |
commit | 7a24dbb2f6dca9e0c30f75c3c9b12d81c41bd984 (patch) | |
tree | 95c21b175d249070039a7eaa2ab8b8a2b2a6aa27 /libre/sagemath/pexpect-env.patch | |
parent | 5c9e07c02b8174ddb3782bfd24c58451654bfe5a (diff) | |
download | abslibre-7a24dbb2f6dca9e0c30f75c3c9b12d81c41bd984.tar.gz abslibre-7a24dbb2f6dca9e0c30f75c3c9b12d81c41bd984.tar.bz2 abslibre-7a24dbb2f6dca9e0c30f75c3c9b12d81c41bd984.zip |
sagemath: add new package to [libre]
Diffstat (limited to 'libre/sagemath/pexpect-env.patch')
-rw-r--r-- | libre/sagemath/pexpect-env.patch | 32 |
1 files changed, 32 insertions, 0 deletions
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 |