Skip to content

Commit

Permalink
Revert "Implement `--executable' option (#257) (#258)" (#263)
Browse files Browse the repository at this point in the history
This reverts commit 375cd94.
  • Loading branch information
Secrus authored Jan 30, 2025
1 parent 375cd94 commit 2697e78
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 30 deletions.
9 changes: 1 addition & 8 deletions src/installer/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,6 @@ def _get_main_parser() -> argparse.ArgumentParser:
type=str,
help="override prefix to install packages to",
)
parser.add_argument(
"--executable",
metavar="path",
default=sys.executable,
type=str,
help="#! executable to install scripts with (default=sys.executable)",
)
parser.add_argument(
"--compile-bytecode",
action="append",
Expand Down Expand Up @@ -110,7 +103,7 @@ def _main(cli_args: Sequence[str], program: Optional[str] = None) -> None:
source.validate_record(validate_contents=args.validate_record == "all")
destination = SchemeDictionaryDestination(
scheme_dict=_get_scheme_dict(source.distribution, prefix=args.prefix),
interpreter=args.executable,
interpreter=sys.executable,
script_kind=get_launcher_kind(),
bytecode_optimization_levels=bytecode_levels,
destdir=args.destdir,
Expand Down
22 changes: 0 additions & 22 deletions tests/test_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,28 +74,6 @@ def test_main_prefix(fancy_wheel, tmp_path):
}


def test_main_executable(fancy_wheel, tmp_path):
destdir = tmp_path / "dest"

main(
[
str(fancy_wheel),
"-d",
str(destdir),
"--executable",
"/monty/python3.x",
],
"python -m installer",
)

installed_scripts = destdir.rglob("bin/*")

for f in installed_scripts:
with f.open("rb") as fp:
shebang = fp.readline()
assert shebang == b"#!/monty/python3.x\n"


def test_main_no_pyc(fancy_wheel, tmp_path):
destdir = tmp_path / "dest"

Expand Down

0 comments on commit 2697e78

Please sign in to comment.