-
Notifications
You must be signed in to change notification settings - Fork 112
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
Find python binary dynamically #671
Conversation
In addition to the problem described in #670 the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, probably search and replace on the json files should be enough
Reviewed 1 of 1 files at r1, 1 of 1 files at r2.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @airtower-luna)
tests/scripts_retention.py, line 200 at r2 (raw file):
command = srv_conf["server_command"] if command[0] == 'python': command[0] = sys.executable
I think using {python}
to indicate that it will be replaced is a cleaner solution—principle of least surprise and all that
This works regardless of the name of the installed interpreter, and has the additional advantage of always using the same interpreter as used to call the script. The JSON test configurations now use a "{python}" token instead of "python" to avoid confusion about it being replaced with sys.executable at runtime.
00cd226
to
848c36e
Compare
@tomato42: I've changed the server setup to use a |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 3 of 3 files at r3.
Reviewable status:complete! all files reviewed, all discussions resolved
looks good, thank you! |
Tlsfuzzer also assumed the Python interpreter would be called "python", this update is necessary to get a fixed version (see tlsfuzzer/tlsfuzzer#671). Signed-off-by: Fiona Klute <fiona.klute@gmx.de>
Tlsfuzzer also assumed the Python interpreter would be called "python", this update is necessary to get a fixed version (see tlsfuzzer/tlsfuzzer#671). Signed-off-by: Fiona Klute <fiona.klute@gmx.de>
Some systems have a suitable Python interpreter, but not under the expected
python
binary name. E.g. on Debian(-ish) systems the Python 3 interpreter is calledpython3
. This PR aims to support both.Description
Makefile
now searches for bothpython3
andpython
(usingwhich
), and uses the first one found.tests/scripts_retention.py
usessys.executable
instead of hardcoded'python'
. That should work completely independent of the platform.Motivation and Context
Fixes #670
Checklist
tlslite-ng.json
andtlslite-ng-random-subset.json
This change is![Reviewable](https://camo.githubusercontent.com/23b05f5fb48215c989e92cc44cf6512512d083132bd3daf689867c8d9d386888/68747470733a2f2f72657669657761626c652e696f2f7265766965775f627574746f6e2e737667)