Extracting python dependencies automatically

Panu Matilainen pmatilai at laiskiainen.org
Wed Aug 15 15:33:13 UTC 2007


On Wed, 15 Aug 2007, James Bowes wrote:

> On Wed, Aug 15, 2007 at 04:51:06PM +0300, Panu Matilainen wrote:
>>
>> Started looking into possibilities of extracting python dependency
>> information similarly to perl dependencies...
>
> Cool. This would be nice to have.
>
>> For requires, try to locate any python scripts and modules and for each
>> found, run them through python's modulefinder which attempts to figure out
>> which modules a script/module uses. Then, based on the filenames gotten
>> from modulefinder results, turn them into python(<name>) entries, for
>> example:
>> [pmatilai at localhost ~]$ rpm -ql createrepo|./pythondeps.py -R
>> python(_sqlitecache)
>
> Something wonky is going on here, I think. Nothing should be importing
> _sqlitecache besides sqlitecachec, so maybe modulefinder is recursing?

It shows various indirectly loaded modules as well, because 
modulefinder loads the modules it looks at and then figures out 
what files got loaded (or roughly so).

Should be harmless though...

 	- Panu -




More information about the fedora-devel-list mailing list