Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Locating Python 2.x command for compiling doc
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  3 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Dirk Ullrich  
View profile   Translate to Translated (View Original)
 More options Jul 25 2012, 8:35 am
From: Dirk Ullrich <dirk.ullr...@gmail.com>
Date: Wed, 25 Jul 2012 14:35:30 +0200
Local: Wed, Jul 25 2012 8:35 am
Subject: Locating Python 2.x command for compiling doc

Hello,

I've noted that the Python script `doc/compile-doc.py' used for
generating HTML documentation works only with Python 2.x. Furthermore
it is called in the rake file by `sh doc/compile-doc.py ...'. Thus
locating of the Python command to use relies on the
`#!/usr/bin/python' line in the script.

Therefore the working of `doc/compile-doc.py' makes the asumption that
there is a Python 2 command at `/usr/bin/python'. This does not work,
for instance, for Arch Linux: On such a system `/usr/bin/python' is
Python 3; the Python 2 command would be at `/usr/bin/python2'. It
would also not work with Python 2 installation below `/usr/local'.

Thus I've implemented a in the rake file a search for a Python 2
command following the following heuristics: First we try to locate
`python2' whithin $PATH, and if this fails, we are looking for
`python' in $PATH. The diff appended patches `Rakefile' for doing
this.

Two caveats for my patch. I am not a Ruby programmer, so my
implementation my be a little bit clumsy. And and works only for
UNIX-like systems - but could easily enhanced for platform
independence (by enhancing the `which' function - see, for instance,
http://stackoverflow.com/questions/2108727/which-in-ruby-checking-if-...).

Dirk

  py2_search.diff
1K Download

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Joao  
View profile  
 More options Jul 25 2012, 12:41 pm
From: Joao <joaotav...@gmail.com>
Date: Wed, 25 Jul 2012 09:41:39 -0700 (PDT)
Local: Wed, Jul 25 2012 12:41 pm
Subject: Re: Locating Python 2.x command for compiling doc

Hi Dirk,

I would not bother much with trying to compile the .rst docs with the
python script since there have been almost no changes to the doc, and I am
trying to rewrite it. See my reply to the thread "Changelog for 0.7.0 and
up?" and concentrate your efforts in the new documentation if you can.

Thanks,
Joćo


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Dirk Ullrich  
View profile  
 More options Jul 25 2012, 3:09 pm
From: Dirk Ullrich <dirk.ullr...@gmail.com>
Date: Wed, 25 Jul 2012 21:09:38 +0200
Local: Wed, Jul 25 2012 3:09 pm
Subject: Re: Locating Python 2.x command for compiling doc
Hello Joćo,

2012/7/25 Joao <joaotav...@gmail.com>:

> Hi Dirk,

> I would not bother much with trying to compile the .rst docs with the python
> script since there have been almost no changes to the doc, and I am trying
> to rewrite it. See my reply to the thread "Changelog for 0.7.0 and up?" and
> concentrate your efforts in the new documentation if you can.

oops, than my attempt was a nice Ruby exercise.

Dirk


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »