Re: Where to put data

2012-01-27 Thread bvdp
On Friday, January 27, 2012 3:15:44 PM UTC-7, John Nagle wrote: > On 1/25/2012 9:26 AM, bvdp wrote: > > I'm having a disagreement with a buddy on the packaging of a program > > we're doing in Python. It's got a number of modules and large number > > of library files. The library stuff is data, not

Re: Where to put data

2012-01-27 Thread bvdp
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 sub

Re: Where to put data

2012-01-27 Thread John Nagle
On 1/25/2012 9:26 AM, bvdp wrote: I'm having a disagreement with a buddy on the packaging of a program we're doing in Python. It's got a number of modules and large number of library files. The library stuff is data, not code. How much data? Megabytes? Gigabytes? I have some modules w

Re: Where to put data

2012-01-26 Thread Michael Torrie
On 01/26/2012 09:30 AM, bvdp wrote: > Yes. I agree and it's nice to have a confirmation. So far I've been > putting all my program into /usr/local/share/MYPROGRAM and then > simply inserting an entry into sys.path. > > Then, for other systems, I check a few common locations until I find > the inst

Re: Where to put data

2012-01-26 Thread Martin P. Hellwig
On 25/01/2012 17:26, bvdp wrote: Well once you think about distributing, here is the guide line I use: - If it is meant as a library that can be 'imported' in python: > site-packages is the place to be, some linux distros are rather creative with them so be careful. - If it is a 'stand-alon

Re: Where to put data

2012-01-26 Thread Dan Stromberg
I think that /usr/*/python-whatever/site-packages and related directories are very much overused in the python world, and tend to cause problems eventually - EG when you need to install two versions of a program on the same machine, same interpreter. I prefer to provide a configure script that acc

Re: Where to put data

2012-01-26 Thread bvdp
On Wednesday, January 25, 2012 8:30:54 PM UTC-7, Michael Torrie wrote: > Unless you are writing a python library that will be used by others, I > don't think that where you put your files has anything to do with being > "pythonic" or not. Just do what works for your OS. Yes. I agree and it's nic

Re: Where to put data

2012-01-25 Thread Michael Torrie
On 01/25/2012 03:29 PM, bvdp wrote: > Right now my program does a search for modules in "all the normal > places", which seems to work for windows, mac and linux. Once the > modules are found I just insert that location into sys.path[0]. > > Which permits the modules to reside anywhere on the HDD.

Re: Where to put data

2012-01-25 Thread bvdp
> I would not put anything in the toplevel Python folder. You need to > place everything under site-packages --> "Python27\Lib\site-packages > \PackageName\blah". Of course client created files should be saved to > a more accessible place. Oh. Just looking at my setup (Ubunutu 11.10) and I see th

Re: Where to put data

2012-01-25 Thread bvdp
Right now my program does a search for modules in "all the normal places", which seems to work for windows, mac and linux. Once the modules are found I just insert that location into sys.path[0]. Which permits the modules to reside anywhere on the HDD. However, I have feeling that this isn't qu

Re: Where to put data

2012-01-25 Thread Evan Driscoll
I would just like to make a strong plea that you make it possible to install in places other than /usr. Bascially, 'python setup.py install --prefix /some/alternative/place' should work. Evan On 01/25/2012 11:26 AM, bvdp wrote: I'm having a disagreement with a buddy on the packaging of a pro

Re: Where to put data

2012-01-25 Thread Rick Johnson
On Jan 25, 11:26 am, bvdp wrote: > I've got 2 issues with this: > >    1. I don't know if putting data in the python tree is "legit". >    2. I'd have to do a lot of rewritting. My modules currently use: I would not put anything in the toplevel Python folder. You need to place everything under s

Where to put data

2012-01-25 Thread bvdp
I'm having a disagreement with a buddy on the packaging of a program we're doing in Python. It's got a number of modules and large number of library files. The library stuff is data, not code. I'd like to put the modules in /usr/lib/pythonX.Y/mymodules or wherever setup.py decides. And the dat