Index: ports/python_modules/ipython/nacl.patch |
=================================================================== |
new file mode 100644 |
--- /dev/null |
+++ b/ports/python_modules/ipython/nacl.patch |
@@ -0,0 +1,42 @@ |
+diff -r f628d005a84e IPython/external/pexpect/_pexpect.py |
+--- a/IPython/external/pexpect/_pexpect.py Wed Dec 25 03:31:05 2013 +0000 |
++++ b/IPython/external/pexpect/_pexpect.py Mon Dec 30 16:24:58 2013 +0000 |
+@@ -70,7 +70,7 @@ |
+ import select |
+ import re |
+ import struct |
+- import resource |
++ #import resource |
+ import types |
+ import pty |
+ import tty |
+@@ -568,7 +568,8 @@ |
+ # This is a serious limitation, but not a show stopper. |
+ pass |
+ # Do not allow child to inherit open file descriptors from parent. |
+- max_fd = resource.getrlimit(resource.RLIMIT_NOFILE)[0] |
++ #max_fd = resource.getrlimit(resource.RLIMIT_NOFILE)[0] |
++ max_fd = 1024 |
+ for i in range (3, max_fd): |
+ try: |
+ os.close (i) |
+diff -r f628d005a84e IPython/utils/io.py |
+--- a/IPython/utils/io.py Wed Dec 25 03:31:05 2013 +0000 |
++++ b/IPython/utils/io.py Mon Dec 30 16:24:58 2013 +0000 |
+@@ -72,8 +72,15 @@ |
+ def close(self): |
+ pass |
+ |
++class _EmptyWriter: |
++ def write(self, *args, **kwargs): |
++ pass |
++ |
+ # setup stdin/stdout/stderr to sys.stdin/sys.stdout/sys.stderr |
+-devnull = open(os.devnull, 'a') |
Sam Clegg
2014/01/22 01:46:50
Didn't you recently fix this in nacl_io? Perhaps
Matthew Turk
2014/01/22 21:14:31
Good catch. I've removed the chunk of the patch,
Sam Clegg
2014/01/22 22:22:26
I think you can do MIN_SDK_VERSION=34 in pkg_info
|
++try: |
++ devnull = open(os.devnull, 'a') |
++except IOError: |
++ devnull = _EmptyWriter() |
+ stdin = IOStream(sys.stdin, fallback=devnull) |
+ stdout = IOStream(sys.stdout, fallback=devnull) |
+ stderr = IOStream(sys.stderr, fallback=devnull) |