Menu

#9 Dialog doesn't work with pip

v3
closed
nobody
None
5
2021-06-17
2017-01-13
Samer Afach
No

When Dialog is used during a pip installation, it doesn't work properly and shows the input() keyboard strokes.

This is tested on Debian Jessie.

Discussion

  • Florent Rougon

    Florent Rougon - 2017-01-14

    Sorry, I don't understand what you are doing. Can you please give a precise description of how to reproduce this?

     
  • Samer Afach

    Samer Afach - 2017-01-14

    If you create a setup.py file for your software, and then create a source distribution package (sdist) and try to use pip to install it (pip3 install mypackage-0.1.0.tar-gz), the dialog will not work properly.

    To give even more information: In the "build" step of pip (which is basically inherited from distutils.command.build, I tried to put a dialog there, and it didn't work. The same code for the dialog worked fine on an independent Python notebook.

     

    Last edit: Samer Afach 2017-01-14
  • Florent Rougon

    Florent Rougon - 2017-01-14

    pythondialog needs to be properly installed to work. From your description, it's impossible to tell what is happening in what you call the "build step of pip". It seems to me your problem is more about Python packaging than pythondialog...

     
  • Samer Afach

    Samer Afach - 2017-01-14

    Sir, pythondialog is installed properly on my machine. With all due respect, it's not rocket science to install it. I build Python packages for other people, so installing pythondialog shouldn't be an issue for me. On the same machine, the code runs properly as standalone, but when it's inside a build script of setup.py, it doesn't work and shows graphics problems. Does that still tell you it's an installation problem?

    It's my fault that I haven't created a minimal example, but on the other hand this problem made me stop using pythondialog, because I need it exclusively for my installers. You can try to reproduce the problem by simply creating a build script in setup.py, where you override the function run() of a class inherited distutils.command.build, and then pip install that. Sorry for not doing that myself.

     
  • Florent Rougon

    Florent Rougon - 2017-01-15

    Did you try replacing the pythondialog calls with direct dialog invocations in your script? You can obtain equivalent dialog commands for your pythondialog calls using Dialog.setup_debug() as documented here in the pythondialog Manual.

     
  • Florent Rougon

    Florent Rougon - 2021-06-17
    • status: open --> closed
     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.