Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #19531

Re: Where to put data

Newsgroups comp.lang.python
Date 2012-01-27 19:11 -0800
References (1 earlier) <mailman.5084.1327517343.27778.python-list@python.org> <15493090.103.1327530570987.JavaMail.geo-discussion-forums@prhb20> <mailman.5110.1327548663.27778.python-list@python.org> <3439055.1436.1327595421060.JavaMail.geo-discussion-forums@prno22> <mailman.5151.1327634441.27778.python-list@python.org>
Subject Re: Where to put data
From bvdp <bob@mellowood.ca>
Message-ID <mailman.5162.1327720326.27778.python-list@python.org> (permalink)

Show all headers | View raw


On Thursday, January 26, 2012 8:20:24 PM UTC-7, Michael Torrie wrote:
>
> > I'm getting mangled by the debian maintainers and friends who seem to
> > believe that python modules need to go into /usr/lib/python...
> 
> I guess the maintainers aren't distinguishing between python apps and
> their submodules and general python modules (libraries), which is pretty
> silly.  Even as a mere user I would not like my /usr/lib/python
> directory cluttered with python code that is not useful generally but is
> only for specific apps.  Namespace collisions are inevitable with other
> python apps (not libraries) if folks insist on doing this.

Well, I might be wrong in my assumptions. Never got invited to join the inner circle so I'm looking at all this from the outside.

> 
> Calibre appears to be in the Ubuntu standard repositories.  I just

Yeah, I looked at that as well after your earlier post.

> checked and in calibre proper (not talking about dependent libraries and
> things that would be useful outside of calibre), there are no python
> files installed in /usr/lib/python/.  Calibre modules that belong to

But, when you dl from the calibre site the default location is /opt.

> calibre proper are in /usr/lib/calibre.  Recipes (really just python
> scripts) are in /usr/share/calibre.  Maybe Ubuntu is doing things
> differently than Debian, but I'm hard pressed to see the logic in
> forcing everything ever written in python, such as submodules, installed
> to /usr/lib/python.  Baffles the mind.

I completely agree.

Mind you, one consolation in putting things in, for example, /usr/lib/pythonX.Y are:

   - you can let setup find that that magic location
   - you don't need to worry about your app finding the lib (python modules).

But, I've pretty much decided that the easy way (and dare I say the correct way?) is to let my packager decide where to install the modules. My program really doesn't care (nor do I). And, then I'll end up with my program's stuff something like:

      myprogram
         mymodules ...
         mylib ...
         program-bin

And then have a link in the users path which is a link or a one line call to program-bin. With modules in a directory at the same level as program-bin I don't have to do any module searches, etc. Seems to be a simple and sort-of-elegant solution.

I've tried this with one-line callers and links and it seems to work in all cases. Any gotchas? 

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Where to put data bvdp <bob@mellowood.ca> - 2012-01-25 09:26 -0800
  Re: Where to put data Rick Johnson <rantingrickjohnson@gmail.com> - 2012-01-25 10:33 -0800
    Re: Where to put data bvdp <bob@mellowood.ca> - 2012-01-25 14:27 -0800
  Re: Where to put data Evan Driscoll <edriscoll@wisc.edu> - 2012-01-25 12:48 -0600
    Re: Where to put data bvdp <bob@mellowood.ca> - 2012-01-25 14:29 -0800
      Re: Where to put data Michael Torrie <torriem@gmail.com> - 2012-01-25 20:30 -0700
        Re: Where to put data bvdp <bob@mellowood.ca> - 2012-01-26 08:30 -0800
          Re: Where to put data Michael Torrie <torriem@gmail.com> - 2012-01-26 20:20 -0700
            Re: Where to put data bvdp <bob@mellowood.ca> - 2012-01-27 19:11 -0800
            Re: Where to put data bvdp <bob@mellowood.ca> - 2012-01-27 19:11 -0800
        Re: Where to put data bvdp <bob@mellowood.ca> - 2012-01-26 08:30 -0800
    Re: Where to put data bvdp <bob@mellowood.ca> - 2012-01-25 14:29 -0800
  Re: Where to put data "Martin P. Hellwig" <martin.hellwig@gmail.com> - 2012-01-26 02:16 +0000
  Re: Where to put data John Nagle <nagle@animats.com> - 2012-01-27 14:15 -0800
    Re: Where to put data bvdp <bob@mellowood.ca> - 2012-01-27 19:13 -0800

csiph-web