[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

how to install python applications (was: RFS: themole)



On Tue, Feb 14, 2012 at 04:01:54PM +0200, Stefano Rivera wrote:
> We encourage an application's modules to be installed privately when
> they won't be of any use to other modules / applications.
> http://www.debian.org/doc/packaging-manuals/python-policy/ch-programs.html

so what is the preferred way to make the programs find their modules,
then?

* put the main python file in /usr/share/my_package/ and symlink it from
  /usr/bin (as it is done in themole), relying on python to resolve the
  symlink and find the required modules next to the invoked file

* have a "import sys; sys.path.append('/usr/share/my_program'); import
  my_main; my_main.run()" main wrapper in /usr/bin/

* some distutils/distribute/distutils2 magic i'm not aware of

and, unless it's the third option: is there an elegant way to integrate
that with packages that are already proper (in a python sense) packages
and have a setup.py?

thanks
chrysn

-- 
To use raw power is to make yourself infinitely vulnerable to greater powers.
  -- Bene Gesserit axiom

Attachment: signature.asc
Description: Digital signature


Reply to: