On Tue, Oct 25, 2011 at 6:05 AM, Andrea Crotti <andrea.crotti.0@gmail.com> wrote:
I have the following situation:
suppose that there is a framework composed by many many eggs, which
doesn't change very often.

Then there are N applications using this framework, where every
application is also composed by 2-3 eggs, and everything is run in a
"funny" way (using Envisage).

So at the moment every application fiddles around with the global
easy_install.pth, which is bad and needs to be changed, and I have to
figure out how.

If you use the "-m" option to easy_install, the easy-install.pth won't be changed (or even created, if it doesn't exist).  Instead, the application scripts will simply add the needed eggs to their path at runtime.

This is the most flexible approach; the only downside to it is if you just start a Python interpreter, none of the eggs will be on sys.path unless you explicitly pkg_resources.require() them.  But for stable app deployment, or even app development (using "setup.py develop" or "setup.py test") it works rather well.

 
The other future problems that I still see now are:
1. I have to be able to develop also the eggs from the framework

Use "setup.py develop -m" to install a project in development mode, without altering easy-install.pth.  Any changes made in the source then take effect immediately in the target environment.
 
2. I have to make everything very simple to do from and Eclipse

The "develop" command only needs to be re-run if you change your setup.py options or your dependencies, so it's not hard to do.

 
3. These applications have to be shared on SVN, so maybe zc.buildout
  might be a better choice in this sense.


To me buildout sounds like overkill - I have a whole bunch of projects I develop that are installed with "setup.py develop" on my development machine.  Any changes I make to the source are immediately seen by any other projects sharing the same targeted installation directory.
 
 
Thanks a lot,
Andrea
_______________________________________________
Distutils-SIG maillist  -  Distutils-SIG@python.org
http://mail.python.org/mailman/listinfo/distutils-sig