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

Toby D. Young tyoung at ippt.gov.pl
Tue Oct 19 09:56:34 CDT 2010


Jed,

I think you misinterpeted my main point which is actually very close to
your point. That's my bad; and nevermind   :-)

> 3. users can just run
>
>   /path/to/python2.5 configure --options
>
> and this python will be written into the reconfigure script
>
> 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.

My point was, rather than to hard-wire python2 into petsc, with
#!/usr/bin/env python2 one could do the check at configure time.

A quick look at the real petsc-configure script... perhaps add the
following after (or in) the check that already exist there (see lines 14
to 21 there):

if not sys.version_info[0] <= 2:
   print '*** You must have Python version lower than 3.* to run
   config/configure.py *****'
   print '*** If Python2 is installed in your system call that explcitly
   with "/path/to/python2.* ./configure --options" *****'
sys.exit (4)

I think that way would be a *temporary* solution that would make a real
migration to python3 less complicated in future works where a choice may
be possible.

Best,
	Toby


-----

Toby D. Young
Assistant Professor

Institute of Fundamental Technological Problems
Polish Academy of Sciences
ul Adolfa Pawinskiego 5b
02-106 Warsaw
Poland

www:   http://www.ippt.gov.pl/~tyoung
skype: stenografia




More information about the petsc-dev mailing list