[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: Extracting python dependencies automatically
- From: "Toshio Kuratomi" <a badger gmail com>
- To: "Development discussions related to Fedora Core" <fedora-devel-list redhat com>
- Subject: Re: Extracting python dependencies automatically
- Date: Wed, 15 Aug 2007 15:14:14 -0700
On 8/15/07, Panu Matilainen <pmatilai redhat com> wrote:
> 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?
Some python modules have started to use eggs from setuptools. These
can have dependency information that includes versions.
Look at /usr/lib/python2.5/site-packages/TurboGears-1.0.2.2-py2.5.egg-info/requires.txt
for an example.
Also, we probably want the ability to ship zipped eggs, not just
unzipped eggs at some point (to support installing multiple versions
of a module.)
egg documentation:
http://peak.telecommunity.com/DevCenter/PythonEggs
-Toshio
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]