Extracting python dependencies automatically

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




Started looking into possibilities of extracting python dependency information similarly to perl dependencies...

Initial POC implementation looks like this:

For provides, look into site-packages and turn the dir/filenames found into foo.bar type entries in python() namespace, for example:
[pmatilai@localhost ~]$ rpm -ql yum-metadata-parser|./pythondeps.py -P
python(_sqlitecache)
python(sqlitecachec)

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@localhost ~]$ rpm -ql createrepo|./pythondeps.py -R
python(_sqlitecache)
python(abi) = 2.5
python(libxml2)
python(libxml2mod)
python(rpm._rpmmodule)
python(sqlitecachec)

Haven't tested it at all thoroughly, but visual inspection of what I've tried would appear to be reasonably sane. That said I'm often blind as a bat so there might be severe problems there and I just didn't notice :)

If any python-heads are interested in playing around / testing / improving, here's the initial attempt: http://laiskiainen.org/rpm/scripts/pythondeps.py

Thoughts / comments?

	- Panu -

--
fedora-devel-list mailing list
fedora-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/fedora-devel-list

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]
  Powered by Linux