Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 19 Dec 2006 17:47:51 +0300
From:      "Andrew Pantyukhin" <infofarmer@FreeBSD.org>
To:        "FreeBSD Ports" <ports@freebsd.org>
Subject:   Detecting real python (perl/ruby/.so/...) dependencies
Message-ID:  <cb5206420612190647k3ce21c6ag81c274fb1a39aefc@mail.gmail.com>

next in thread | raw e-mail | index | archive | help
It's never clear what a program really needs. Ports
solve this problem (mostly), but whenever you make
an update or port something new, you face the same
issue.

Developers tend to maintain a list of dependencies,
but you're in big luck if you find it up-to-date
and accurate. It would be nice to verify anyway.

So I need to find out what modules does a particu-
lar python program require. I can grep for import,
but many modules are present in our python bundle.
Is there a way to see:

1) Which of the modules are present, and any single
file for each of them, so we can map to installed
packages

2) Which of the modules are not present

Ideally, also

3) A hint as to where can I find a missing module,
maybe from some CPAN-like repo

4) Whether the module is critical for the app, e.g.
whether it's imported inside a try block

I've seen something like this for Perl, but not
for Python apps. If you successfully use an automa-
ted way of detecting dependencies for Python (and
maybe other languages like Perl, Tcl/Tk, Ruby, or
maybe even C/C++, based on headers or something),
please share.

Thanks!



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?cb5206420612190647k3ce21c6ag81c274fb1a39aefc>