Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Trac: Users

install - python2.6 to 2.7 - virtualenv - index out of range - tag_svn - tickect 10658

 

 

Trac users RSS feed   Index | Next | Previous | View Threaded


james.cook at bluewin

Jul 16, 2012, 3:02 AM

Post #1 of 3 (201 views)
Permalink
install - python2.6 to 2.7 - virtualenv - index out of range - tag_svn - tickect 10658

Hallo Folks,

I've had python/trac running on a hosted/managed server where I'm not
root etc. for quite a time.

Now the underlying system has been switched from python2.6 to 2.7.
Subversion has gone from 1.6 to 1.7

So I've updated the virtualenv - and now have:
# ~/virtualpython/lib/python2.7/site-packages/

In the old setup
#~/virtualpython/lib/python2.6/site-packages/
I had Trac-0.13dev_r11008-py2.6.egg

In ~/virtualpython/bin I do:
# easy_install -U Trac==dev
which begins to install - but flags up an Index out of Range Error at
the end ... which is a known problem
See http://trac.edgewall.org/ticket/10658

It seems the subversion/svn update to 1.7 leads to this error.
__________________________________________________________

I can see that I have to patch the setup.py file in the dev
distribution (of Trac) before installation. But I'm unclear how to
proceed.

My questions are:

* would directly copying the Trac-0.13dev_r11008-py2.6.egg to
~/virtualpython/lib/python2.7/site-packages/ just WORK?

If not:
* How/Where do I find the sources for dev?
** I can find 0.12, 0.11 as tar.gzs etc. but not dev
** Doing a trunk checkout :
svn co http://svn.edgewall.org/repos/trac/trunk trac
as advised on page
http://trac.edgewall.org/wiki/TracDownload#Tractrunk
seems to return 0.12!?

* Is it posible to (MUST I?) check out the exact revision 11008 to
match my previous running python2.6 installation?
* what is the easy-install command to install the patched source
directory?

Thanks for any pointers
JC

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


ryano at physiosonics

Jul 16, 2012, 11:17 AM

Post #2 of 3 (193 views)
Permalink
Re: install - python2.6 to 2.7 - virtualenv - index out of range - tag_svn - tickect 10658 [In reply to]

On Monday, July 16, 2012 3:02:10 AM UTC-7, James Cook wrote:
>
> * would directly copying the Trac-0.13dev_r11008-py2.6.egg to
> ~/virtualpython/lib/python2.7/site-packages/ just WORK?
>
>
I've never been successful in doing this. Best I can tell, you must create
the egg against the version of Python you are using.


> If not:
> * How/Where do I find the sources for dev?
> ** I can find 0.12, 0.11 as tar.gzs etc. but not dev
> ** Doing a trunk checkout :
> svn co http://svn.edgewall.org/repos/trac/trunk trac
> as advised on page
> http://trac.edgewall.org/wiki/TracDownload#Tractrunk
> seems to return 0.12!?
>

What makes you think that checking out the trunk returns 0.12? The trunk is
1.0dev, the latest revision as of today being r11115. You should see
1.0dev-r11115 in the Trac footer.



> * Is it posible to (MUST I?) check out the exact revision 11008 to
> match my previous running python2.6 installation?
> * what is the easy-install command to install the patched source
> directory?
>


svn co http://svn.edgewall.org/repos/trac/trunk trac
source ~/virtualpython/lib/python2.7/bin/activate
python setup.py install

--
You received this message because you are subscribed to the Google Groups "Trac Users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/trac-users/-/j178diXma6EJ.
To post to this group, send email to trac-users [at] googlegroups
To unsubscribe from this group, send email to trac-users+unsubscribe [at] googlegroups
For more options, visit this group at http://groups.google.com/group/trac-users?hl=en.


james.cook at bluewin

Jul 17, 2012, 4:44 AM

Post #3 of 3 (201 views)
Permalink
Re: install - python2.6 to 2.7 - virtualenv - index out of range - tag_svn - tickect 10658 [In reply to]

Thanks for your reply.
I re-checked the svn co and you were right. I must have
viewed the wrong directory

I applied the patch, but still got the same error.
So I deleted the tag_svn line as shown in
http://trac.edgewall.org/ticket/10479.
At least that stopped the errors
The new egg is in the correct location. (BTW it's twice the size of the old
2.6/Trac egg - is that right?)

But when I access trac on the website I get:
# malformed header from script. Bad header= XXXXXX/virtualpython/l:
index.cgi

When I run ./trac.cgi (I know) directly in cgi-bin
It reports :

Trac detected an internal error: 'SERVER_PORT'

Traceback (most recent call last):

File "./trac.cgi", line 36, in <module>

cgi_frontend.run()

File
"build/bdist.freebsd-8.3-RELEASE-p1-amd64/egg/trac/web/cgi_frontend.py",
line 71, in run

gateway.run(dispatch_request)

File "build/bdist.freebsd-8.3-RELEASE-p1-amd64/egg/trac/web/wsgi.py", line
91, in run

response = application(self.environ, self._start_response)

File "build/bdist.freebsd-8.3-RELEASE-p1-amd64/egg/trac/web/main.py", line
455, in dispatch_request

req = Request(environ, start_response)

File "build/bdist.freebsd-8.3-RELEASE-p1-amd64/egg/trac/web/api.py", line
295, in __init__

self.base_url = self._reconstruct_url()

File "build/bdist.freebsd-8.3-RELEASE-p1-amd64/egg/trac/web/api.py", line
689, in _reconstruct_url

if self.server_port and self.server_port != \

File "build/bdist.freebsd-8.3-RELEASE-p1-amd64/egg/trac/web/api.py", line
366, in server_port

return int(self.environ['SERVER_PORT'])

KeyError: 'SERVER_PORT'


Which I've seen in error messages.
I've checked the web/trac directory structure and it is 755 all the way
down.
I've tried setting the SERVER_PORT to 80 in trac.cgi but then I just
getting a SERVER_NAME error ...
I've tried setting the SERVER_NAME to xxxx in trac.cgi but then I just
getting a REQUEST_METHOD error ...
so that doesn't seem like a good path to follow.

I even tried
# trac-admin ~/trac-sites/<instance name> upgrade

As I said, this trac instance has been up and running since Feb2012. It's
on a managed server, hence all the virtualpython stuff.
I reckon I'm just missing a small detail somewhere here.
_______

On Monday, 16 July 2012 20:17:14 UTC+2, RjOllos wrote:

>
> On Monday, July 16, 2012 3:02:10 AM UTC-7, James Cook wrote:
>
>> * would directly copying the Trac-0.13dev_r11008-py2.6.egg to
>> ~/virtualpython/lib/python2.7/site-packages/ just WORK?
>>
>>
>>
> I've never been successful in doing this. Best I can tell, you must create
> the egg against the version of Python you are using.
>
>
>> If not:
>> * How/Where do I find the sources for dev?
>> ** I can find 0.12, 0.11 as tar.gzs etc. but not dev
>> ** Doing a trunk checkout :
>> svn co http://svn.edgewall.org/repos/trac/trunk trac
>> as advised on page
>> http://trac.edgewall.org/wiki/TracDownload#Tractrunk
>> seems to return 0.12!?
>>
>>
> What makes you think that checking out the trunk returns 0.12? The trunk
> is 1.0dev, the latest revision as of today being r11115. You should see
> 1.0dev-r11115 in the Trac footer.
>


>
>
Errmm, not sure now, must have been checking the wrong directory(!)


>
>
>> * Is it posible to (MUST I?) check out the exact revision 11008 to
>> match my previous running python2.6 installation?
>> * what is the easy-install command to install the patched source
>> directory?
>>
>>
>
> svn co http://svn.edgewall.org/repos/trac/trunk trac
> source ~/virtualpython/lib/python2.7/bin/activate
>
>

source ~/virtualpython/bin/activate the same thing?


>
> python setup.py install
>
>
>

--
You received this message because you are subscribed to the Google Groups "Trac Users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/trac-users/-/LjbzaOii9R0J.
To post to this group, send email to trac-users [at] googlegroups
To unsubscribe from this group, send email to trac-users+unsubscribe [at] googlegroups
For more options, visit this group at http://groups.google.com/group/trac-users?hl=en.

Trac users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.