Dirk
Dirk

Reputation: 3221

python dependency + deployment tool?

Does anybody know of a tool to handle module dependencies + deployment in Python?

Details: By handle, I mean:

This evening I tried to count the modules that Pylons depends on. After a detour into Snakefood and Graphviz, the answer is A LOT. 100+ (and Snakefood did not get them all).

As I'm getting more and more into Python, handling this problem manually is starting to take up more of my time than I would like, and it's unreliable.

If it matters, I use Python 2.7 on Windows 7.

* I know this will introduce some artifacts.  
** Combining virtualenv and pip freeze goes some way to solving this, but it's still not what I am looking for. 

Upvotes: 5

Views: 1550

Answers (2)

sateesh
sateesh

Reputation: 28683

Since you are on windows take a look at py2exe. Something of interest from the py2exe FAQ:

How does py2exe decide which modules you need?
To determine which modules should go in the final .exe file, py2exe 
does a recursive search of the script that you are packaging to find 
its dependencies and, in turn, all of their dependencies.

Upvotes: 2

Keith
Keith

Reputation: 43024

Setuptools plus pypi is made for that. The setuptools is an enhanced distutils, with which you can specify dependencies. For example, in the setup function:

install_requires = ['simplejson>=2.0,==dev'],

Will pull in that dependency when you use easy_install.

Upvotes: 5

Related Questions