On Mon, Mar 2, 2009 at 2:33 PM, Jorge Vargas <[email protected]> wrote: > > On Mon, Mar 2, 2009 at 12:03 PM, Lukasz Szybalski <[email protected]> wrote: >> >> On Sun, Mar 1, 2009 at 11:06 PM, Jorge Vargas <[email protected]> wrote: >>> >>> On Sun, Mar 1, 2009 at 11:10 PM, Lukasz Szybalski <[email protected]> >>> wrote: >>>> >>>> On Sun, Mar 1, 2009 at 2:53 PM, Mark Ramm <[email protected]> >>>> wrote: >>>>> >>>>> Looks like beta 6 is doing pretty well except for the repoze.who >>>>> install issues. >>>>> >>>>> I line with "practicality beats purity" I think we should explicitly >>>>> add repoze.who to he tg.devtools reqirements list so that it gets >>>>> installed directly, and before any of our other dependencies. This >>>>> will make things "just work" again and should provide an improved >>>>> install experience. >>>>> >>>>> Also we may want to tell people how to use our index for setup.py >>>>> develop on their quickstarted projects so that they can avoid the pypi >>>>> problems that people have recently reported to the list. >>>> >>>> is setup.py develop required? >>>> >>>> When deploying the app via modwsgi, you don't want to install the >>>> package you want to deploy. If setup.py deploy is required then it >>>> needs to be installed, all the requirements pulled, and then the >>>> package has to be uninstalled. >>>> >>> python setup.py install will be equivalent. >> >> There reason you don't want to python setup.py install or develop is >> because that puts all you code in libs(site-packages) folder. When you >> run the app under modwsg/apache your app will be read from >> site-packages instead of your deployment folder. >> > Not if you follow http://code.google.com/p/modwsgi/wiki/VirtualEnvironments
I am using virtualenv. But when you install it setup.py install if my virtual env is here: /usr/local/pythonenv/Baseline then the app will be installed : /usr/local/pythonenv/Baseline/python2.5/lib/site-packages/myapp and if apache/modwsgi script says "import myapp " it will import it from the above location instead : /usr/local/turbogears/myapp where my actual app is at, and where I want the files to be imported from. **With python setup.py install from myapp import __file__ = /usr/local/pythonenv/Baseline/python2.5/lib/site-packages/myapp ** Without python setup.py install from myapp import __file__ = /usr/local/turbogears/myapp Do you guys follow? It has nothing to do with virtualenv or not. By installing the app the location of my app is changing and location of my static data is changing, permissions need to be set appropriately for that folder. So now instead of running my app in /usr/local/turbogears/myapp with web server permissions I am running in /usr/local/pythonenv/Baseline/python2.5/lib/site-packages/myapp with root permissions or user permissions, or what ever the permissions are when things get installed via easy_install. Thanks, Lucas > >> This means every time you need to deploy an app you will have to do: >> >> cd myapp >> python setup.py install >> easy_install -m myapp >> > > Since some time now we have suggested you always work on a venv. this > way you won't have a global site-package side effect. Now if you don't > have a venv install will go to the global site-packages so I'm not > entirely sure I see your issue. > >> If that is final of what tg2.0 will do then this needs to be >> documented otherwise deployment will happen from the wrong folder. I >> assume this change has happen in tg2b6, correct? >> > yes >> Thanks, >> Lucas >> >> > >> > > > > -- How to create python package? http://lucasmanual.com/mywiki/PythonPaste Bazaar and Launchpad http://lucasmanual.com/mywiki/Bazaar --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "TurboGears Trunk" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/turbogears-trunk?hl=en -~----------~----~----~----~------~----~------~--~---
