On 12/26/20 9:03 AM, Rich Shepard wrote:
The ldd tool tells us which shared object libraries are required by a
specific application. Is there a tool that does the opposite; that is, tells
us what appliacations are dependent upon a specific library?

I use only python3 now, but python2 is still installed, and has most Python modules are in its site-packages/ directory. EOL for python2 is Thursday and I'd like to remove it and clean up all Python modules so they're the Python3
versions and in python3.9/site-packages/.

Having both versions installed causes problems here and I want to fix my
installations so only Python3 is used.

TIA,

Rich


Normally this is handled by the distro's package manager (APT/emerger/pacman or whatever) but on slackware we track this ourselves. I don't use anything to automate SBo but there might be some tools that are aware of the SBo requires variable.


The normal method of running ldd on all your applications and then parsing the result won't work because python apps load their dependencies at runtime. What you need to do is make a list of all your python apps and then go through them one by one, making a list of their dependencies and writing them down.


This is where going old school with a pencil and paper (Real paper!) is handy.   If you use SBo to do most of your installs they list dependencies there. As an alternative you can go to the python package index for more details. A lot of times the SlackBuild is just packaging the pypi downloads.

https://pypi.org/


Once you have a list of apps and their dependences that you want to keep comparing that to your installation and removing anything extra should be trivial. The one thing to be really careful of is that some python modules will detect a python3 installation and build for both versions. It is not unusual for a single package to install to both python2.x/site-packages/ and python3.x/site-packages/

-Ben



_______________________________________________
PLUG: https://pdxlinux.org
PLUG mailing list
[email protected]
http://lists.pdxlinux.org/mailman/listinfo/plug

Reply via email to