Allow non-interactive build #993

Closed
opened 2017-04-28 02:22:32 +02:00 by orlitzky · 2 comments
orlitzky commented 2017-04-28 02:22:32 +02:00 (Migrated from github.com)

When building v0.6.2 on Gentoo, the setup.py crashes while waiting for the user to press return:

Press Return to continue
Traceback (most recent call last):
  File "setup.py", line 165, in <module>
    nothing = raw_input()
EOFError: EOF when reading a line

The code handles one possible exception there, a NameError, but it misses the EOFError. The following one-line patch allows the automatic build to proceed:

diff --git a/setup.py b/setup.py
index 2c769a6..166ab14 100644
--- a/setup.py
+++ b/setup.py
@@ -163,7 +163,7 @@ if __name__ == "__main__":
         print "Press Return to continue"
         try:
             nothing = raw_input()
-        except NameError:
+        except EOFError,NameError:
             pass

     here = os.path.abspath(os.path.dirname(__file__))

I'm not sure if that's the best way to fix it, but it does work =)

When building v0.6.2 on Gentoo, the setup.py crashes while waiting for the user to press return: ``` Press Return to continue Traceback (most recent call last): File "setup.py", line 165, in <module> nothing = raw_input() EOFError: EOF when reading a line ``` The code handles one possible exception there, a `NameError`, but it misses the `EOFError`. The following one-line patch allows the automatic build to proceed: ``` diff --git a/setup.py b/setup.py index 2c769a6..166ab14 100644 --- a/setup.py +++ b/setup.py @@ -163,7 +163,7 @@ if __name__ == "__main__": print "Press Return to continue" try: nothing = raw_input() - except NameError: + except EOFError,NameError: pass here = os.path.abspath(os.path.dirname(__file__)) ``` I'm not sure if that's the best way to fix it, but it does work =)
PeterSurda commented 2017-04-28 07:34:08 +02:00 (Migrated from github.com)

Please try v0.6 branch and let me know if the problem still persists.

Please try v0.6 branch and let me know if the problem still persists.
PeterSurda commented 2017-04-28 07:35:54 +02:00 (Migrated from github.com)

Also thank you for the patch, I'll review it as well.

Also thank you for the patch, I'll review it as well.
This repo is archived. You cannot comment on issues.
No Milestone
No project
No Assignees
1 Participants
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: Bitmessage/PyBitmessage-2024-12-15#993
No description provided.