Installing modules via setuptools in a script

Ben Finney bignose+hates-spam at benfinney.id.au
Sun Nov 25 17:04:51 EST 2007


Thorsten Kampe <thorsten at thorstenkampe.de> writes:

> * Robert Kern (Sat, 24 Nov 2007 16:33:37 -0600)
> > Thorsten Kampe wrote:
> > > can anyone give me a short code snippet how to install a missing
> > > module via setuptools (assuming setuptools is already
> > > installed)?!
> > 
> > The recommended way to handle dependencies using setuptools is to
> > specify them in the install_requires metadata in the setup()
> > function call in your setup.py:
> 
> It's just a simple script - no package. So I don't even have a
> setup.py.

The recommended way of installing a simple script that has
dependencies is to write a setup.py for the simple script, so that you
can declare its dependencies and have them checked on install.

-- 
 \       "Pinky, are you pondering what I'm pondering?" "Well, I think |
  `\              so, Brain, but pantyhose are so uncomfortable in the |
_o__)                           summertime."  -- _Pinky and The Brain_ |
Ben Finney



More information about the Python-list mailing list