[petsc-dev] #!/usr/bin/env python2?

Jed Brown jed at 59A2.org
Tue Oct 19 09:08:54 CDT 2010


On Tue, Oct 19, 2010 at 15:58, Toby D. Young <tyoung at ippt.gov.pl> wrote:

> I wonder if a simpler approach would be to start the PETSc configure with
> a check on the python version? That way one can edit a single file rather
> than many and would make future compatibility/development/migration to
> python3 easier. It should be possible to check for the existance of
> python2 on the system and if so use that as a default.
>
> Something like:
>
> if (python -V gives major number >= 3)
>   check for python2
>      if (no python2 exists)
>         panic and/or vomit on the petsc-user
>      else
>         use python2
> else
>   (do nothing, use python major number <= 3)
>

1. configure is written in python

2. shell wrappers suck for many reasons, but they don't work on windows
without cygwin

3. users can just run

  /path/to/python2.5 configure --options

and this python will be written into the reconfigure script

4. The reason to automatically locate python2 instead of possibly python3 is
so that the python scripts that can be run stand-alone will automatically
behave correctly.


I think people will just have to specify a particular python when they
invoke configure and any other scripts, until configure itself can be
transitioned to python3.

Jed
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20101019/d8de2de7/attachment.html>


More information about the petsc-dev mailing list