472,958 Members | 2,441 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,958 software developers and data experts.

Tool for finding external dependencies

Hi,

I need to find external dependencies for modules (not Python standard
library imports).

Currently I use pylint and manually scan the output, which is very
nice, or use pylint's --ext-import-graph option to create a .dot file
and extract the info from it, but either way can take a very long
time.

I'm aware of Python's modulefinder.py, but it doesn't find external
dependencies (or at least I don't know how to make it do them).

Thanks,
Rob

Jul 9 '07 #1
8 8265
On Jul 8, 8:39 pm, Rob Cakebread <gentoo...@gmail.comwrote:
Hi,

I need to find external dependencies for modules (not Python standard
library imports).

Currently I use pylint and manually scan the output, which is very
nice, or use pylint's --ext-import-graph option to create a .dot file
and extract the info from it, but either way can take a very long
time.

I'm aware of Python's modulefinder.py, but it doesn't find external
dependencies (or at least I don't know how to make it do them).

Thanks,
Rob
Recently I ran into some debugging issues and the freeware app
"Dependency Walker" was suggested to me. I still haven't used it much
since I only got it last Friday, but it looks promising:
http://www.dependencywalker.com

Mike

Jul 9 '07 #2
On Jul 9, 7:17 am, kyoso...@gmail.com wrote:
>
Recently I ran into some debugging issues and the freeware app
"Dependency Walker" was suggested to me. I still haven't used it much
since I only got it last Friday, but it looks promising:http://www.dependencywalker.com

Mike
Thanks Mike, but I'm just trying to determine Python imports, like:

$ pylint g_pypi

[snip lots of other tests which take a lonnnnnng time]

External dependencies
---------------------
::

configobj (g_pypi.config)
portage (g_pypi.enamer,g_pypi.portage_utils,g_pypi.cli)
pkg_resources (g_pypi.cli,g_pypi.ebuild)
yolk
\-pypi (g_pypi.cli)
\-setuptools_support (g_pypi.cli)
\-yolklib (g_pypi.cli)
gentoolkit (g_pypi.portage_utils)
pygments (g_pypi.ebuild)
\-lexers (g_pypi.ebuild)
\-formatters (g_pypi.ebuild)
Cheetah
\-Template (g_pypi.ebuild)
Jul 9 '07 #3
On Jul 9, 9:27 am, Rob Cakebread <gentoo...@gmail.comwrote:
On Jul 9, 7:17 am, kyoso...@gmail.com wrote:
Recently I ran into some debugging issues and the freeware app
"Dependency Walker" was suggested to me. I still haven't used it much
since I only got it last Friday, but it looks promising:http://www.dependencywalker.com
Mike

Thanks Mike, but I'm just trying to determine Python imports, like:

$ pylint g_pypi

[snip lots of other tests which take a lonnnnnng time]

External dependencies
---------------------
::

configobj (g_pypi.config)
portage (g_pypi.enamer,g_pypi.portage_utils,g_pypi.cli)
pkg_resources (g_pypi.cli,g_pypi.ebuild)
yolk
\-pypi (g_pypi.cli)
\-setuptools_support (g_pypi.cli)
\-yolklib (g_pypi.cli)
gentoolkit (g_pypi.portage_utils)
pygments (g_pypi.ebuild)
\-lexers (g_pypi.ebuild)
\-formatters (g_pypi.ebuild)
Cheetah
\-Template (g_pypi.ebuild)
Hmmm...I also use GUI2Exe, which may help you too. It'll list "missing
modules" and binary dependencies. It's basically a GUI interface to
py2exe:

http://xoomer.alice.it/infinity77/eng/GUI2Exe.html
This looks interesting, but I've never used it:

http://www.tarind.com/depgraph.html
Finally, here's some more info on modulefinder:

http://svn.python.org/projects/pytho...odulefinder.py

Looks like you run modulefinder like this:

<code>

mod = modulefinder.ModuleFinder()
mod.run_script(path/to/python_script.py)
mod.report()

</code>

Mike

Jul 9 '07 #4
On Jul 9, 7:54 am, kyoso...@gmail.com wrote:
<snip>
<code>

mod = modulefinder.ModuleFinder()
mod.run_script(path/to/python_script.py)
mod.report()

</code>

Mike
Nope. All of those tools and the code above show *all* imports/
dependencies, which is way too much information. I just need the
'external' dependencies, like in the example from pylint I pasted
above. If nothing exists I'll just have to figure out how pylint does
it.

I'm working on g-pypi which creates ebuilds for Gentoo Linux. For
packages that use setuptools I can get the dependencies easily enough
because of 'install_requires', but for packages that don't, I need
another way to find them.

Thanks,
Rob

Jul 9 '07 #5
On Jul 9, 6:42 pm, Rob Cakebread <gentoo...@gmail.comwrote:
On Jul 9, 7:54 am, kyoso...@gmail.com wrote:
<snip>
<code>
mod = modulefinder.ModuleFinder()
mod.run_script(path/to/python_script.py)
mod.report()
</code>
Mike

Nope. All of those tools and the code above show *all* imports/
dependencies, which is way too much information. I just need the
'external' dependencies, like in the example from pylint I pasted
above. If nothing exists I'll just have to figure out how pylint does
it.
Isn't it possible to get from modulefinder what it has found and just
filter it out according to your rules?
This way you are in control and can deicde what is internal/external.

../alex
--
..w( the_mindstorm )p.
I'm working on g-pypi which creates ebuilds for Gentoo Linux. For
packages that use setuptools I can get the dependencies easily enough
because of 'install_requires', but for packages that don't, I need
another way to find them.

Thanks,
Rob

Jul 9 '07 #6
On Jul 9, 9:23 am, Alex Popescu <the.mindstorm.mailingl...@gmail.com>
wrote:
Isn't it possible to get from modulefinder what it has found and just
filter it out according to your rules?
This way you are in control and can deicde what is internal/external.
At first glance it looked easy enough, by just filtering out
everything that isn't in site-packages, but that isn't quite accurate
as accurate as pylint and it also shows indirect dependencies too.
e.g. pkga imports pkgb, which imports pkgc. I don't want pkgc.

To clarify, if I had a module with:

import os,sys, re
import sqlobject

I only want to know about sqlobject. I don't want any of sqlobject's
dependencies, such as MySQLdb, pysqlite2, psycopg2 etc. which
modulefinder shows also.

And as far as I can tell, modulefinder needs a Python script, but its
much easier for me to find a package's modules automatically.
Thanks,
Rob

Jul 9 '07 #7
Rob Cakebread <ge*******@gmail.comwrites:
Hi,

I need to find external dependencies for modules (not Python standard
library imports).

Currently I use pylint and manually scan the output, which is very
nice, or use pylint's --ext-import-graph option to create a .dot file
and extract the info from it, but either way can take a very long
time.

I'm aware of Python's modulefinder.py, but it doesn't find external
dependencies (or at least I don't know how to make it do them).
Try looking at py2exe and pyinstaller. They may have useful ideas.
John
Jul 10 '07 #8
syt
On Jul 9, 3:39 am, Rob Cakebread <gentoo...@gmail.comwrote:
Hi,

I need to find external dependencies for modules (not Python standard
library imports).

Currently I usepylintand manually scan the output, which is very
nice, or usepylint's--ext-import-graph option to create a .dot file
and extract the info from it, but either way can take a very long
time.

I'm aware of Python's modulefinder.py, but it doesn't find external
dependencies (or at least I don't know how to make it do them).
notice that you can launch pylint in the following way to disabling
everything but dependencies analysis : ::

pylint --enable-checker=imports yourproject

this will disable all others checkers and you may gain a signifiant
speedup.

-- Sylvain

Jul 13 '07 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Linus Nikander | last post by:
After trying to manually reverse-engineer a piece of code i've been handed using Visio I figure someone must have developed a tool that can do automatically in 5 minutes what took me 2 hours. ...
1
by: Guyon Morée | last post by:
Hi, I'm developing an application with Delphi+Python. Distributing such an application requires me to include all the used modules + python23.dll. At the moment I'm using 'trial-and-error' on...
0
by: Maarten | last post by:
L.S. I have a project to which I want to ad a few external dependencies, but I can't seem to get it working properly. How do I add external dependencies in MS Visual Studio? Can anyone help? ...
7
by: Brian Sabolik | last post by:
I'm not sure if I've broken any Object Oriented rules or not, but ... I have projects in 2 different solutions that need to use each other's methods. Therefore I may have an "update" method in...
0
by: Maarten | last post by:
Hello, I've been trying to add a few files to the external dependencies of my project, but I cant seem to get it done. How do I do this? I'm using MSVisual Studio 6.0 and I'm programming in...
1
by: Gaetan | last post by:
I'm experiencing problems with assembly references and version conflicts. I get many messages similar to this one: <<< Warning: The dependency 'MM_Exceptions, Version=1.0.2060.29180,...
2
by: Justin T. Gibbs | last post by:
I'm currently using MSVC.Net 2003. My task is to extract header dependencies from C++ source code. To that end, I invoke "cl /E" and parse the preprocessor output. While this approach is...
8
by: Scott Sauyet | last post by:
I found myself needing to find my way recursively through a document in XSLT, finding the dependencies one element had on others, and including only those in an initial set, their dependencies, the...
4
by: Bernhard Merkle | last post by:
Hi there, think %Subject says all. I am wondering if there is some tool to check dependencies within python programs. (something like jdepend for python ;-) Of course the dependencies are...
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 4 Oct 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: Aliciasmith | last post by:
In an age dominated by smartphones, having a mobile app for your business is no longer an option; it's a necessity. Whether you're a startup or an established enterprise, finding the right mobile app...
4
NeoPa
by: NeoPa | last post by:
Hello everyone. I find myself stuck trying to find the VBA way to get Access to create a PDF of the currently-selected (and open) object (Form or Report). I know it can be done by selecting :...
3
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be using a very simple database which has Form (clsForm) & Report (clsReport) classes that simply handle making the calling Form invisible until the Form, or all...
1
by: Teri B | last post by:
Hi, I have created a sub-form Roles. In my course form the user selects the roles assigned to the course. 0ne-to-many. One course many roles. Then I created a report based on the Course form and...
3
by: nia12 | last post by:
Hi there, I am very new to Access so apologies if any of this is obvious/not clear. I am creating a data collection tool for health care employees to complete. It consists of a number of...
0
isladogs
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...
2
by: GKJR | last post by:
Does anyone have a recommendation to build a standalone application to replace an Access database? I have my bookkeeping software I developed in Access that I would like to make available to other...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.