Skip to content

Commit 2697e78

Browse files
authored
Revert "Implement `--executable' option (#257) (#258)" (#263)
This reverts commit 375cd94.
1 parent 375cd94 commit 2697e78

File tree

2 files changed

+1
-30
lines changed

2 files changed

+1
-30
lines changed

src/installer/__main__.py

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,6 @@ def _get_main_parser() -> argparse.ArgumentParser:
3131
type=str,
3232
help="override prefix to install packages to",
3333
)
34-
parser.add_argument(
35-
"--executable",
36-
metavar="path",
37-
default=sys.executable,
38-
type=str,
39-
help="#! executable to install scripts with (default=sys.executable)",
40-
)
4134
parser.add_argument(
4235
"--compile-bytecode",
4336
action="append",
@@ -110,7 +103,7 @@ def _main(cli_args: Sequence[str], program: Optional[str] = None) -> None:
110103
source.validate_record(validate_contents=args.validate_record == "all")
111104
destination = SchemeDictionaryDestination(
112105
scheme_dict=_get_scheme_dict(source.distribution, prefix=args.prefix),
113-
interpreter=args.executable,
106+
interpreter=sys.executable,
114107
script_kind=get_launcher_kind(),
115108
bytecode_optimization_levels=bytecode_levels,
116109
destdir=args.destdir,

tests/test_main.py

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -74,28 +74,6 @@ def test_main_prefix(fancy_wheel, tmp_path):
7474
}
7575

7676

77-
def test_main_executable(fancy_wheel, tmp_path):
78-
destdir = tmp_path / "dest"
79-
80-
main(
81-
[
82-
str(fancy_wheel),
83-
"-d",
84-
str(destdir),
85-
"--executable",
86-
"/monty/python3.x",
87-
],
88-
"python -m installer",
89-
)
90-
91-
installed_scripts = destdir.rglob("bin/*")
92-
93-
for f in installed_scripts:
94-
with f.open("rb") as fp:
95-
shebang = fp.readline()
96-
assert shebang == b"#!/monty/python3.x\n"
97-
98-
9977
def test_main_no_pyc(fancy_wheel, tmp_path):
10078
destdir = tmp_path / "dest"
10179

0 commit comments

Comments
 (0)