netinvent / command_runner

Substitute for subprocess that handles all hassle that comes from different platform and python versions, and allows live stdout and stderr capture for background job/interactive GUI programming ;)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

`command_runner` with `psutil` 5.5.1 (or lower)

brendan-simon-indt opened this issue · comments

I tried installing command_runner on via an embedded linux build system targeting a Debian 10 Buster distribution.
The build effectively does a pip install command-runner inside a ARM qemu system.

However the install fails due to the requirement for psutil>=5.6.0. pip tries to download this and build it, however I don't have the necessary build tools (i.e. gcc and friends) installed in the qemu system.

Debian 10 does have psutil 5.5.1 available as a package so I can install that easily.

Is there anyway to make command_runner work (install) with psutil 5.5.1 ??

What features of command_runner specifically need psutil > 5.6.0?

Interestingly command_runner installs ok for Python 2 (pip install command_runner), but not for Python 3 (pip3 install command_runner). I had to use psutil-5.7.2 from buster-backports to get it to install for Python 3.

# pip list | grep "runner\|psutil"
command-runner                1.4.0      
psutil                        5.5.1    

# pip3 list | grep "runner\|psutil"
command-runner     1.4.0  
psutil             5.7.2  

NOTE:

  • psutil 5.7.2 is available from Debian Buster Backports repo, but only for Python 3.
  • I could install the build tools (gcc, etc) but I didn't want them on my embedded filesystem (might take up too much space) - I might be able to remove those tools after the build?
  • I might be able to build a wheel manually and locate that somewhere where I could install it.
  • Might be time to finally upgrade legacy Python2 codebase to Python3 ;-)

The requirements seems to be introduced in commit 7ac85be9a1cb23475f957bc70a5331882ce689b9.

7ac85be

Actually psutil 5.6.0 was a requirement since I built command_runner when that was the actual version.
Having read the changelogs at https://github.com/giampaolo/psutil/blob/master/HISTORY.rst, I see no reason you could not use psutil 5.5.1.

Btw, really still on Python 2 ? Python 2 gives me so much work for retrocompat :(

Yes I know. I still have legacy code to support. Eventually I will be able to migrate it to Python 3, but not now unfortunately. But I need/want to run on both Python 2.7 and Python >= 3.7.

Would you be able to do another release will the psutil dependency lowered to 5.5 or 5.5.1?

Not really, I'm not making non battle tested releases.
Perhaps you could just raw download command_runner and use it without pip ?
Do you have to build distributables for other computers ?

I have migrated all my code to Python3 and am using psutil 5.7.2 from Debian Buster Backports (buster-backports).

I intend to update my embedded distro to a newer version (Debian 12 Bookworm) sometime in 2023, which will avoid the backports (for a while at least).

I will close this issue.

Worked around using psutil 5.7.2 from Debian Backports (python3-psutil/buster-backports)

Thanks for the feedback.