unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [PATCH] fix python
@ 2014-04-04  8:42 Alírio Eyng
  2014-04-04 15:36 ` Eric Bavier
  0 siblings, 1 reply; 3+ messages in thread
From: Alírio Eyng @ 2014-04-04  8:42 UTC (permalink / raw)
  To: guix-devel

This fixes 'OSError: out of pty devices' with '#
CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set'

From 0757ec00fa23ed82b14e272b6329f6d89e2f5dd2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Al=C3=ADrio=20Eyng?= <alirioeyng@gmail.com>
Date: Fri, 4 Apr 2014 08:28:02 +0000
Subject: [PATCH] gnu: python: Revert "gnu: Remove unused lambda arguments and
 prefer separate phases over augmented phases."

* gnu/packages/python.scm (python): Revert commit
d4bf49b140bd5cfb3580d2a038679160dc1331b5.
---
 gnu/packages/python.scm | 23 ++++++++++++-----------
 1 file changed, 12 insertions(+), 11 deletions(-)

diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index bc56d7a..01de2f6 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -139,17 +139,18 @@
              (with-directory-excursion out
                (for-each (cut augment-rpath <> lib)
                          (find-files "bin" ".*")))))
-         (alist-cons-before
-          'configure 'patch-lib-shells
-          (lambda _
-            ;; Filter for existing files, since some may not exist in all
-            ;; versions of python that are built with this recipe.
-            (substitute* (filter file-exists?
-                                 '("Lib/subprocess.py"
-                                   "Lib/popen2.py"
-                                   "Lib/distutils/tests/test_spawn.py"
-                                   "Lib/test/test_subprocess.py"))
-              (("/bin/sh") (which "sh"))))
+         (alist-replace
+          'configure
+          (lambda* (#:key outputs #:allow-other-keys #:rest args)
+            (let ((configure (assoc-ref %standard-phases 'configure)))
+             (substitute* "Lib/subprocess.py"
+               (("args = \\[\"/bin/sh")
+                (string-append "args = [\"" (which "sh"))))
+             (substitute*
+               '("Lib/distutils/tests/test_spawn.py"
+                 "Lib/test/test_subprocess.py")
+               (("/bin/sh") (which "sh")))
+             (apply configure args)))
           (alist-cons-before
            'check 'pre-check
            (lambda _
-- 
1.8.4

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] fix python
  2014-04-04  8:42 [PATCH] fix python Alírio Eyng
@ 2014-04-04 15:36 ` Eric Bavier
  2014-04-04 19:36   ` Ludovic Courtès
  0 siblings, 1 reply; 3+ messages in thread
From: Eric Bavier @ 2014-04-04 15:36 UTC (permalink / raw)
  To: Alírio Eyng; +Cc: guix-devel

Alírio Eyng <alirioeyng@gmail.com> writes:

> This fixes 'OSError: out of pty devices' with '#
> CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set'

This does not fix the error it claims to fix on my machine.  It also
undoes commit bb184d9884891ad190f2ebc4ffb71d6f361ab488

The errors I get from building python-3.3.3 are:

======================================================================
FAIL: test_wait_result (test.test_multiprocessing.WithProcessesTestCondition)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/tmp/nix-build-python-3.3.3.drv-11/Python-3.3.3/Lib/test/test_multiprocessing.py", line 1035, in test_wait_result
    self.assertRaises(KeyboardInterrupt, c.wait, 10)
AssertionError: KeyboardInterrupt not raised by wait

----------------------------------------------------------------------
Ran 242 tests in 60.644s

FAILED (failures=1, skipped=4)
Re-running test 'test_openpty' in verbose mode
test (test.test_openpty.OpenptyTest) ... test test_openpty failed
ERROR

======================================================================
ERROR: test (test.test_openpty.OpenptyTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/tmp/nix-build-python-3.3.3.drv-11/Python-3.3.3/Lib/test/test_openpty.py", line 12, in test
    master, slave = os.openpty()
FileNotFoundError: [Errno 2] No such file or directory

----------------------------------------------------------------------
Ran 1 test in 0.001s

FAILED (errors=1)
Re-running test 'test_pty' in verbose mode
test__copy_eof_on_all (test.test_pty.SmallPtyTests)
Test the empty read EOF case on both master_fd and stdin. ... ok
test__copy_to_each (test.test_pty.SmallPtyTests)
Test the normal data case on both master_fd and stdin. ... ok
test_basic (test.test_pty.PtyTest) ... Calling master_open()
skipped 'Pseudo-terminals (seemingly) not functional.'
test_fork (test.test_pty.PtyTest) ... test test_pty failed
calling pty.fork()
ERROR

======================================================================
ERROR: test_fork (test.test_pty.PtyTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/tmp/nix-build-python-3.3.3.drv-11/Python-3.3.3/Lib/test/test_pty.py", line 116, in test_fork
    pid, master_fd = pty.fork()
  File "/tmp/nix-build-python-3.3.3.drv-11/Python-3.3.3/Lib/pty.py", line 107, in fork
    master_fd, slave_fd = openpty()
  File "/tmp/nix-build-python-3.3.3.drv-11/Python-3.3.3/Lib/pty.py", line 29, in openpty
    master_fd, slave_name = _open_terminal()
  File "/tmp/nix-build-python-3.3.3.drv-11/Python-3.3.3/Lib/pty.py", line 70, in _open_terminal
    raise os.error('out of pty devices')
OSError: out of pty devices

-- 
`~Eric

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] fix python
  2014-04-04 15:36 ` Eric Bavier
@ 2014-04-04 19:36   ` Ludovic Courtès
  0 siblings, 0 replies; 3+ messages in thread
From: Ludovic Courtès @ 2014-04-04 19:36 UTC (permalink / raw)
  To: Eric Bavier; +Cc: guix-devel, Alírio Eyng

Eric Bavier <ericbavier@gmail.com> skribis:

> Alírio Eyng <alirioeyng@gmail.com> writes:
>
>> This fixes 'OSError: out of pty devices' with '#
>> CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set'
>
> This does not fix the error it claims to fix on my machine.

Yeah, as discussed in the other thread, there’s no obvious way to fix
that on systems with CONFIG_DEVPTS_MULTIPLE_INSTANCES=n (but we do have
a fix for other systems.)

> The errors I get from building python-3.3.3 are:
>
> ======================================================================
> FAIL: test_wait_result (test.test_multiprocessing.WithProcessesTestCondition)
> ----------------------------------------------------------------------
> Traceback (most recent call last):
>   File "/tmp/nix-build-python-3.3.3.drv-11/Python-3.3.3/Lib/test/test_multiprocessing.py", line 1035, in test_wait_result
>     self.assertRaises(KeyboardInterrupt, c.wait, 10)
> AssertionError: KeyboardInterrupt not raised by wait

Same here.

Ludo’.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-04-04 19:36 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-04-04  8:42 [PATCH] fix python Alírio Eyng
2014-04-04 15:36 ` Eric Bavier
2014-04-04 19:36   ` Ludovic Courtès

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).