Ryan J Ollos skrev 05. jan. 2010 08:53: > I ran through the setup procedure again, starting at "Setting up the > environment" [1] and stopping just before the section "Alternative frontend: > mod_python" [2]. > > Two issues: > > 1. It seems that the install of virtualenv needs to be run as root (`python > -m easy_install virtualenv`). If this is really the case, I think we should > add a `sudo` to the command in the documentation, so that the uninitiated > (like myself) don't get confused by this.
Yes and no. My recommendation would be to use distro-packages for easy-install and virtualenv -- these kind of work like system level commands. It's isn't strictly necessary; while it's been a while since i set up a devel environment for trac, I ended up doing the following dance to install mercurial and a working virutal python environment in my home-folder on a shared server where I did not have root access: #!/usr/bin/env bash # Copy an paste and execute each command, or save as a script if you're # feeling overly confident... #See also: #http://peak.telecommunity.com/DevCenter/EasyInstall#creating-a-virtual-python # Create a virtual python install under home: wget http://peak.telecommunity.com/dist/virtual-python.py python virtual-python.py --prefix="$HOME/opt/python" # Remove virtual-python installer: rm virtual-python.py wget \ http://pypi.python.org/packages/source/s/setuptools/setuptools-0.6c11.tar.gz#md5=7df2a529a074f613b509fb44feefe74e tar xzf setuptools-0.6c11.tar.gz cd setuptools-0.6c11 # Install setup-tools/easy_install in the above virtual python: ../python/bin/python setup.py install cd .. rm -r setuptools-0.6c11 setuptools-0.6c11.tar.gz # Install virtualenv using easy_install, to install it to the local # virtual-python installation: export PYTHONPATH="$HOME/opt/python/lib" ./python/bin/easy_install --prefix="$HOME/opt/python" virtualenv # Setup a virtual environment, from local virtual python: ./python/bin/virtualenv vpython # Install mercurial: ./vpython/bin/easy_install mercurial # Set up sym-links in personal bin-folder: for command in python hg activate easy_install; do ln -s "$HOME/opt/vpython/bin/$command" "$HOME/bin" done Apart from the last few bits, this is more-or-less the same stuff that is linked to from your [1]-link -- namely the section for "Custom Install Locations" for easy_install on the external link to the eays_install site[3]. I agree the wording on the wiki should be changed -- but I defer to the more experienced trac developers what we should recommend users do; install easy_install with sudo, install using package manager (eg: sudo aptitude install python easy_install) or something else. I assume this is the intended meaning behind: "You may already have easy_install if you have "setuptools" installed." But we could make that clearer, I think. > 2. I'm still seeing the error with the python egg cache being written into > my home directory. I looked for a `.python` file for setting the > PYTHON_EGG_CACHE parameter, but didn't find such a file in my home > directory. If anyone can help with where I should specify this > configuration parameter, I would greatly appreciate it! Which problems are you getting exactly ? As far as I can tell from your previous mail, you set up mod_py, and an apache (presumably) running as www-user ? If you run tracd as your own uid, there shouldn't be a permission problem ? Or you might add yourself to the www-data-group, and allow it write access to your (or another) egg cache? Maybe the bit about mod_python / mod_wsgi should be moved to a section for debugging/working with these specific environments -- as you'd either have to have root (eg: bind to port 80 under *nix), or set up apache to run as your own user, and bind to a high port -- it appears to me to be a bit of a separate issue. > > [1] > http://trac.edgewall.org/wiki/TracDev/DevelopmentEnvironmentSetup#Settinguptheenvironment [3] http://peak.telecommunity.com/DevCenter/EasyInstall#custom-installation-locations -- .---. Eirik Schwenke <[email protected]> ( NSD ) Harald HÃ¥rfagresgate 29 Rom 150 '---' N-5007 Bergen tlf: (555) 889 13 GPG-key at pgp.mit.edu Id 0x8AA3392C
signature.asc
Description: OpenPGP digital signature
