Using "" for an application, not a library module.

Philip Semanchuk philip at
Wed Nov 18 23:17:47 CET 2009

On Nov 18, 2009, at 3:53 PM, John Nagle wrote:

>    Most of the documentation for "" assumes you're packaging a
> library module. (Ref: " 
> ")
> How do you properly package an application?  What happens
> on " install"?  Where does the application get installed?   
> Where does
> the main program go?
>  If I package and build my app, it packages properly, and
> unpacks and builds into
> 	Messager1.0/build/lib
> which is appropriate for a library, but not an application.
> Here's the setup file.
> distutils.core.setup(
> 	name='Messager',
> 	description="Baudot Teletype RSS and SMS program",
> 	version='1.0',
> 	author="John Nagle",
> 	author_email="nagle at",
> 	packages=['messager'],
> 	requires=['pyserial', 'feedparser']
>    )

Hi John,
I'm not sure what part you find unpalatable other than "lib" being in  
the pathname. I recently wrote a for an app called Analysis.  
Under OS X, Linux and Windows it installs into the site-packages  
directory so I can run it like so:

python C:\Python25\Lib\site-packages\analysis\


python /usr/local/lib/python2.6/dist-packages/analysis/

Now, packaging an application according to the expectations of the  
platform to provide a double-clickable icon will require something  
like py2exe or py2app. distutils doesn't provide a facility for that.

DOes that give you an idea about what you were asking?


More information about the Python-list mailing list