File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change 36
36
from .build import build as build_cls
37
37
from .build_py import build_py as build_py_cls
38
38
from .dist_info import dist_info as dist_info_cls
39
+ from .distutils .commands import build_scripts as build_scripts_cls
39
40
from .egg_info import egg_info as egg_info_cls
40
41
from .install import install as install_cls
41
42
from .install_scripts import install_scripts as install_scripts_cls
@@ -211,6 +212,11 @@ def _configure_build(
211
212
install .install_headers = headers
212
213
install .install_data = data
213
214
215
+ # For portability, ensure scripts are built with #!python shebang
216
+ # pypa/setuptools#4863
217
+ build_scripts = cast (build_scripts_cls , dist .get_command_obj ("build_scripts" ))
218
+ build_scripts .executable = 'python'
219
+
214
220
install_scripts = cast (
215
221
install_scripts_cls , dist .get_command_obj ("install_scripts" )
216
222
)
You can’t perform that action at this time.
0 commit comments