[Vobject] distribution of my script in two modes

Jeffrey Harris jeffrey at osafoundation.org
Mon Jul 16 12:13:46 CDT 2007


Hello,

> I wrote a script I would like to distribute in two modes. The first will
> ask the user to install vobject and dateutil before using my script.
> In the second mode I would like to distribute a all-in-one solution.
> 
> Is there a way to make this second mode working ?

The best way to do this is to distribute a Python Egg which requires
vobject.  This is actually pretty easy, take a look at

http://svn.osafoundation.org/vobject/trunk/setup.py

Basically, you need

install_requires = ['vobject >= 0.4.8']

in your setup.  You could also require dateutil, but it's not necessary
since vobject requires dateutil.

Once you've got your setup.py, run

python setup.py bdist_egg

to create an egg, or

python setup.py bdist_egg register upload

to create an egg and upload it to the Python Cheeseshop.  If you upload
your script to the Cheeseshop, your users can get your script by running

easy_install _your_package_name_

If you aren't going to be distributing your package publicly, your users
can install it with

easy_install _your_egg_filename_

For more info on packages and setuptools, see

http://peak.telecommunity.com/DevCenter/setuptools

Sincerely,
Jeffrey


More information about the VObject mailing list