-
Notifications
You must be signed in to change notification settings - Fork 465
lapack_testing.py: python2 explicit in hashbang #489
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
lapack_testing.py: python2 explicit in hashbang #489
Conversation
wouldn't this be even more likely to break on systems that have only python3 installed, with a symlink to plain "python" ? AFAIK python2 itself is basically abandoned now. |
Codecov Report
@@ Coverage Diff @@
## master #489 +/- ##
=======================================
Coverage 83.33% 83.33%
=======================================
Files 1820 1820
Lines 170857 170857
=======================================
Hits 142384 142384
Misses 28473 28473 Continue to review full report at Codecov.
|
Here is what I read on my Mac when I type "python2" % python2 WARNING: Python 2.7 is not recommended. Python 2.7.16 (default, Jun 5 2020, 22:59:21) |
We should probably either leave |
Python 2 is decommissioned and almost no OS will provide in the near future hence this will become unusable very soon if |
What about leaving env_python="$(which python)"
if [[ "$env_python" == "" ]]; then env_python="$(which python3)"; fi
if [[ "$env_python" == "" ]]; then env_python="$(which python2)"; fi
ln -s "$env_python" python This could avoid problems to old systems that don't use python3. Altough I don't know where to trigger such a script. |
Python 3.0 was released in 2008 and Python 3.5 already reached its end of life in September 2020, eight months after Python 2. CentOS 7 is the distribution with the oldest packages that I am actively using and even this distro has a Python3 interpreter in its stable package repositories. |
Changing the hash bang to |
My opinion: (1) in favor of writing Quick survey: |
Let us move to python3 then. @christoph-conrads : can you modify your PR from python2 to python3? I'll merge right after. Another solution would be to close this PR, and then @weslleyspereira or me can submit a new one, but might be better if we follow up on this one, and merge from this one. Either way is fine though. Let us know @christoph-conrads . Cheers, J. |
Yes, it will be pushed later today. The changes will include
|
Use `python2` explicitly in the hashbang instead of just `python` because Ubuntu 20.04 does not ship with a `python` executable any longer.
The `-x` flag was never a valid short option for the `getopt` command line parser.
The getopt command line parser did not expect arguments after the `--bin` and `--dir` options.
Remove C-isms: * remove unnecessary braces in "if" conditions * use booleans instead of 0/1 variables
* search for a Python3 interpreter for the test summary * replace an unnecessary macro invocation with a function * make summary depend on all other tests Making the summary depend on all other tests fixes test execution in random order (e.g., with `ctest --schedule-random`).
5289b94
to
a51f8ba
Compare
Thanks @christoph-conrads. Looks great to me. |
…2-in-hashbang lapack_testing.py: python2 explicit in hashbang
There is no
python
executable in Ubuntu anymore. From Debian packagepython-is-python2
description: