Skip to content
This repository has been archived by the owner on Jan 8, 2024. It is now read-only.

Python interpreter can now be overridden #87

Merged
merged 4 commits into from
Dec 19, 2018
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions compiler/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,9 @@ def make_command_line_parser():
'--stub_file',
help='Read imports and interpreter path from the specified stub file',
required=True)
parser.add_argument(
'--interpreter',
help='Interpreter to use instead of determining it from the stub file')
# The default timestamp is "Jan 1 1980 00:00:00 utc", which is the
# earliest time that can be stored in a zip file.
#
Expand Down Expand Up @@ -138,6 +141,9 @@ def main(argv):
# Parse information from stub file that's too hard to compute in Skylark
import_roots, interpreter = parse_stub(args.stub_file)

if args.interpreter:
interpreter = args.interpreter

par = python_archive.PythonArchive(
main_filename=args.main_filename,
import_roots=import_roots,
Expand Down