anatoly techtonik | 3 Jan 17:55 2010
Picon

Re: [Trac-dev] Re: Trac 0.11.6 Released

On Thu, Dec 3, 2009 at 8:05 PM, Christian Boos <cboos <at> neuf.fr> wrote:
>
> You're welcome. I think we now have an answer to give to people
> complaining about the lack of a full featured installer on Windows ;-)

BTW, why there is no installer? `setup.py bdist_wininst` seems to work ok.

> Some ideas for a future v0.12 stack: Python 2.6, mod_wsgi 3.x instead of
> mod_python, and, why not, Mercurial and TracMercurial, in addition to
> Subversion ;-)

mod_wsgi is ready for 0.11 too.

--

-- 
anatoly t.

--

You received this message because you are subscribed to the Google Groups "Trac Development" group.
To post to this group, send email to trac-dev <at> googlegroups.com.
To unsubscribe from this group, send email to trac-dev+unsubscribe <at> googlegroups.com.
For more options, visit this group at http://groups.google.com/group/trac-dev?hl=en.

Ryan J Ollos | 4 Jan 12:21 2010

[Trac-dev] Questions about setting up Trac development environment


Hello,

A few questions about settings up the Trac development environment.

1. When running `python setup.py develop` for Genshi and Trac as described
in [1], I've found that I need to run the command as sudo, or else I get the
error [3].  Am I doing something wrong, or should the instructions be
updated?

2. I've followed the directions as described in the docs [2], and edited
/etc/apache2/sites-enabled/trac to (I think) put the python egg cache within
the ~/tracdev directory, where tracdev contains:

> ls tracdev
bin                   genshi-trunk  lib   tracdeveloperplugin
genshi-advanced-i18n  include       test  trac-trunk

> cat /etc/apache2/sites-enabled/trac
 <Location /trac>
  SetHandler mod_python
  PythonInterpreter main_interpreter
  PythonHandler trac.web.modpython_frontend
  PythonOption TracEnvParentDir /var/lib/trac
  PythonOption TracUriRoot /trac
  SetEnv PYTHON_EGG_CACHE /home/rjollos/tracdev
 </Location>

However, I still get the permission denied error [4] because the python egg
cache is being written into my home directory, which I presume trac or
(Continue reading)

Grzegorz Sobanski | 4 Jan 13:47 2010
Picon

Re: [Trac-dev] Questions about setting up Trac development environment

* Ryan J Ollos <ryano <at> physiosonics.com> [2010-01-04 12:21]:
> 1. When running `python setup.py develop` for Genshi and Trac as described
> in [1], I've found that I need to run the command as sudo, or else I get the

You shouldn't need to. And you should not do that.
You will have to clean your /usr/local/... python dirs from what
you have installed there.

> error [3].  Am I doing something wrong, or should the instructions be
> updated?
[...]
> [3] > ~/tracdev/genshi-trunk$ python setup.py develop
> running develop
> Checking .pth file support in /usr/local/lib/python2.6/dist-packages/
> error: can't create or remove files in install directory

As seen here it tries to install into /usr/local and not into your
virtual env.
Did you run 'setup.py develop' from the shell where you did 
'source bin/activate'?

When you want to work with your virtual env you always have to issue
a 'source bin/activate' in that shell.

hth
silk

--

You received this message because you are subscribed to the Google Groups "Trac Development" group.
(Continue reading)

Noah Kantrowitz | 4 Jan 19:03 2010
Picon

Re: [Trac-dev] Questions about setting up Trac development environment


On Jan 4, 2010, at 3:21 AM, Ryan J Ollos wrote:

>
> Hello,
>
> A few questions about settings up the Trac development environment.
>
> 1. When running `python setup.py develop` for Genshi and Trac as  
> described
> in [1], I've found that I need to run the command as sudo, or else I  
> get the
> error [3].  Am I doing something wrong, or should the instructions be
> updated?
>

By default it would try to install into a global folder, so yes, you  
would need to be root. If you want to do it that way, use virtualenv.

> 2. I've followed the directions as described in the docs [2], and  
> edited
> /etc/apache2/sites-enabled/trac to (I think) put the python egg  
> cache within
> the ~/tracdev directory, where tracdev contains:
>
>> ls tracdev
> bin                   genshi-trunk  lib   tracdeveloperplugin
> genshi-advanced-i18n  include       test  trac-trunk
>
>> cat /etc/apache2/sites-enabled/trac
(Continue reading)

Ryan J Ollos | 4 Jan 22:47 2010

Re: [Trac-dev] Questions about setting up Trac development environment


Grzegorz Sobanski wrote:
> 
> As seen here it tries to install into /usr/local and not into your
> virtual env.
> Did you run 'setup.py develop' from the shell where you did 
> 'source bin/activate'?
> 
> When you want to work with your virtual env you always have to issue
> a 'source bin/activate' in that shell.
> 

I appears that I messed up installation into a virtual env.  I will give
that a try once again.  Thanks!

Noah Kantrowitz-3 wrote:
> 
> 
> Make that a PythonOption. Its a long story involving setuptool's  
> braindead init framework.
> 
> On a related note, you really don't want to use mod_py for  
> development. You want to use tracd. For an example dev environment,  
> look at https://coderanger.net/svn/projects/trac/devenv/
> 
> 

Now that you mention, I think that I'm not using mod_py, which explains why
the option wasn't taking effect.

(Continue reading)

Ryan J Ollos | 5 Jan 08:53 2010

Re: [Trac-dev] Questions about setting up Trac development environment


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.

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!

[1]
http://trac.edgewall.org/wiki/TracDev/DevelopmentEnvironmentSetup#Settinguptheenvironment
[2]
http://trac.edgewall.org/wiki/TracDev/DevelopmentEnvironmentSetup#Settinguptheenvironment
--

-- 
View this message in context: http://old.nabble.com/Questions-about-setting-up-Trac-development-environment-tp27011625p27024845.html
Sent from the Trac Dev mailing list archive at Nabble.com.

--

You received this message because you are subscribed to the Google Groups "Trac Development" group.
To post to this group, send email to trac-dev <at> googlegroups.com.
(Continue reading)

Eirik Schwenke | 5 Jan 09:40 2010
Picon
Picon

Re: [Trac-dev] Questions about setting up Trac development environment

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"
(Continue reading)

Ryan J Ollos | 5 Jan 09:43 2010

Re: [Trac-dev] Questions about setting up Trac development environment


Eirik Schwenke-2 wrote:
> 
> 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?
> 

I think that I just setup to run tracd, which as I understand does not
involve apache?

However, when I install a plugin, I still get the error below.

I installed the development environment to ~/tracdev and started tracd as
specified in the wiki page.  I assume that I'm getting this error because
the python egg cache is outside of the virtualenv that I setup, namely
~/tracdev.

I'm guessing that what I need to do is specify that the egg cache is written
within ~/tracdev/.

Does that make any sense?

[Errno 13] Permission denied:
'/home/rjollos/.python-eggs/TracDeveloper-0.2-py2.6.egg-tmp'

(Continue reading)

Eirik Schwenke | 5 Jan 11:22 2010
Picon
Picon

Re: [Trac-dev] Questions about setting up Trac development environment

Ryan J Ollos skrev 05. jan. 2010 09:43:
> I think that I just setup to run tracd, which as I understand does not
> involve apache?
> 

No, it does not -- I was unsure what you had tried with tracd.

> However, when I install a plugin, I still get the error below.
> 
> I installed the development environment to ~/tracdev and started tracd as
> specified in the wiki page.  I assume that I'm getting this error because
> the python egg cache is outside of the virtualenv that I setup, namely
> ~/tracdev.
> 
> I'm guessing that what I need to do is specify that the egg cache is written
> within ~/tracdev/.
> 
> Does that make any sense?
> 
> [Errno 13] Permission denied:
> '/home/rjollos/.python-eggs/TracDeveloper-0.2-py2.6.egg-tmp'
> 
> The Python egg cache directory is currently set to:
> 
>   /home/rjollos/.python-eggs
> 
> Perhaps your account does not have write access to this directory?  You can
> change the cache directory by setting the PYTHON_EGG_CACHE environment
> variable to point to an accessible directory. 

(Continue reading)

Ryan J Ollos | 6 Jan 08:27 2010

Re: [Trac-dev] Questions about setting up Trac development environment


Eirik Schwenke-2 wrote:
> 
> That error doesn't make much sense to me ... unless you've hit sudo by
> accident, and /home/rjollos/.python-eggs is owned by root ?
> 

The first thing I realized is that I need to run `source bin/activate` each
time I open a shell in order to start working in the virtual environment.

Second, I got pretty stuck on the idea that the .python-eggs directory
should be written into the virtual environment rather than my home
directory, but that does not seem to be the case.  You were right, it turned
out to be a permissions issue.

Even though the `.egg` files were owned by the user I was logged in as, the
~/.python-eggs directory was owned by root, no doubt caused by prefixing the
sudo command to every command when setting up the development environment,
which caused me all sorts of issues.  The reason I started doing that was
the first command `python -m easy_install virtualenv` failed when not run as
root, and I didn't really think through what was going on here.

My understanding of it now is that virtualenv needs to be installed
globally, but all of the commands after that involve installing in the home
directory of a user.

Eirik Schwenke-2 wrote:
> 
> I just ran through the steps outlined in [1] now; and found I had to
> init the virtualenv without global site packages, and locally upgrade
(Continue reading)


Gmane