[Pythonmac-SIG] a beginner's list

Bob Ippolito bob at redivi.com
Sun Feb 12 03:46:33 CET 2006


On Feb 11, 2006, at 6:12 PM, has wrote:

> Bob Ippolito wrote:
>
>>>> Totally off-topic, but if you'd move to setuptools you can keep  
>>>> several separate packages, but users could install using  
>>>> 'easy_install appscript' which would then take care of the  
>>>> dependencies for you.
>>>
>>> I think setuptools is going to be a great solution and definitely  
>>> plan to more there eventually. For now though, the mpkg-based  
>>> distribution
>>
>> They're not mutually exclusive.  Do both.  Just don't use  
>> pkg_resources or entry points yet.
>
> Since that's more work for me, what benefit would setuptools  
> distros provide over the point-n-click package installer, which is  
> already very simple and works for anyone?

The major benefit is that people who develop setuptools-based  
applications can say (in their setup.py):

	install_requires=['appscript']

And then if someone does this:

	easy_install app_requiring_appscript

Then it will Just Work.  If you have binary eggs up, they don't even  
need a compiler to be installed.

The work involved in supporting setuptools one or two lines per  
setup.py, so you really shouldn't even have to ask what the benefits  
are.. it's trivial.

- from distutils.core import setup
+ from setuptools import setup

setup(...
+ install_requires=['other', 'components', 'that', 'are', 'needed'],
)

On top of that, you'll have to register your modules on Cheese Shop  
in order for this to be useful, but you should be doing that anyway.   
This is also trivial.

# register on cheese shop, build an egg and source distribution, sign  
it all with GPG, and upload to cheese shop
python setup.py register bdist_egg sdist upload -s

And if you don't have setuptools installed already.. well, that's  
trivial too:

python -c "import urllib; urllib.main()" \
http://peak.telecommunity.com/dist/ez_setup.py \
| sudo python - -U setuptools

-bob



More information about the Pythonmac-SIG mailing list