|
50 | 50 | from pants.engine.rules import collect_rules, rule
|
51 | 51 | from pants.engine.target import AllTargets, HydratedSources, HydrateSourcesRequest, SourcesField
|
52 | 52 | from pants.engine.unions import UnionMembership, UnionRule
|
53 |
| -from pants.option.option_types import BoolOption, EnumOption, StrListOption |
| 53 | +from pants.option.option_types import EnumOption, StrListOption |
54 | 54 | from pants.util.strutil import path_safe, softwrap
|
55 | 55 |
|
56 | 56 | logger = logging.getLogger(__name__)
|
@@ -110,38 +110,6 @@ class ExportPluginOptions:
|
110 | 110 | advanced=True,
|
111 | 111 | )
|
112 | 112 |
|
113 |
| - py_hermetic_scripts = BoolOption( |
114 |
| - default=True, |
115 |
| - help=softwrap( |
116 |
| - """ |
117 |
| - When exporting a mutable virtualenv for a resolve, by default |
118 |
| - modify console script shebang lines to make them "hermetic". |
119 |
| - The shebang of hermetic console scripts uses the python args: `-sE`: |
120 |
| -
|
121 |
| - - `-s` skips inclusion of the user site-packages directory, |
122 |
| - - `-E` ignores all `PYTHON*` env vars like `PYTHONPATH`. |
123 |
| -
|
124 |
| - Set this to false if you need non-hermetic scripts with |
125 |
| - simple python shebangs that respect vars like `PYTHONPATH`, |
126 |
| - to, for example, allow IDEs like PyCharm to inject its debugger, |
127 |
| - coverage, or other IDE-specific libs when running a script. |
128 |
| -
|
129 |
| - This only applies when when exporting a `mutable_virtualenv` |
130 |
| - (`symlinked_immutable_virtualenv` exports are not "full" |
131 |
| - virtualenvs because they are used internally by pants itself. |
132 |
| - Pants requires hermetic scripts to provide its reproduciblity |
133 |
| - guarantee, fine-grained caching, and other features). |
134 |
| - """ |
135 |
| - ), |
136 |
| - advanced=True, |
137 |
| - removal_version="2.26.0.dev0", |
138 |
| - removal_hint=softwrap( |
139 |
| - """ |
140 |
| - Use `--export-py-non-hermetic-scripts-in-resolve` instead. |
141 |
| - """ |
142 |
| - ), |
143 |
| - ) |
144 |
| - |
145 | 113 | py_non_hermetic_scripts_in_resolve = StrListOption(
|
146 | 114 | help=softwrap(
|
147 | 115 | """
|
@@ -284,10 +252,7 @@ async def do_export(
|
284 | 252 | f"--prompt={venv_prompt}",
|
285 | 253 | output_path,
|
286 | 254 | ]
|
287 |
| - if ( |
288 |
| - req.resolve_name in export_subsys.options.py_non_hermetic_scripts_in_resolve |
289 |
| - or not export_subsys.options.py_hermetic_scripts |
290 |
| - ): |
| 255 | + if req.resolve_name in export_subsys.options.py_non_hermetic_scripts_in_resolve: |
291 | 256 | pex_args.insert(-1, "--non-hermetic-scripts")
|
292 | 257 |
|
293 | 258 | post_processing_cmds = [
|
|
0 commit comments