Re: Making code run in both source tree and installation path

2009-07-01 Thread Carl Banks
On Jun 29, 9:20 am, Javier Collado javier.coll...@gmail.com wrote: I've seen different approaches: - distutils trick in setup.py to modify the installed script (i.e. changing a global variable value) so that it has a reference to the data files location. One of my biggest complaints about

Re: Making code run in both source tree and installation path

2009-07-01 Thread Robert Kern
On 2009-07-01 01:04, Carl Banks wrote: On Jun 29, 9:20 am, Javier Colladojavier.coll...@gmail.com wrote: I've seen different approaches: - distutils trick in setup.py to modify the installed script (i.e. changing a global variable value) so that it has a reference to the data files location.

Re: Making code run in both source tree and installation path

2009-07-01 Thread Lawrence D'Oliveiro
In message mailman.2428.1246465065.8015.python-l...@python.org, Robert Kern wrote: On 2009-07-01 01:04, Carl Banks wrote: The most common way I've seen people work around this issue is to throw their data files into the package directories. Yuck. Huh. I always found that to be a more

Re: Making code run in both source tree and installation path

2009-06-30 Thread ryles
On Jun 29, 12:20 pm, Javier Collado javier.coll...@gmail.com wrote: Hello, I would like to be able to run the main script in a python project from both the source tree and the path in which it's installed on Ubuntu. The script, among other things, imports a package which in turns makes use

Making code run in both source tree and installation path

2009-06-29 Thread Javier Collado
Hello, I would like to be able to run the main script in a python project from both the source tree and the path in which it's installed on Ubuntu. The script, among other things, imports a package which in turns makes use of some data files that contains some metadata that is needed in xml

Re: Making code run in both source tree and installation path

2009-06-29 Thread Lawrence D'Oliveiro
In message mailman.2310.1246292443.8015.python-l...@python.org, Javier Collado wrote: - distutils trick in setup.py to modify the installed script (i.e. changing a global variable value) so that it has a reference to the data files location. This seems to me to be the cleanest solution, at