-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Closed
pypa/distutils
#358Labels
Description
setuptools version
setuptools==78.1.0
Python version
python 3.10
OS
Ubuntu 22.04 ARM64
Additional environment information
I am building rosmaster
It creates a package then calls setup(...) for the install part.
Source: https://github.com/ros/ros_comm/tree/noetic-devel/tools/rosmaster
Description
The shebangs #!/usr/bin/env python are being replaced by #!python making the scripts non working.
This seems to be related to
setuptools/setuptools/_distutils/command/build_scripts.py
Lines 105 to 113 in 6ead555
| if shebang_match: | |
| log.info("copying and adjusting %s -> %s", script, self.build_dir) | |
| if not self.dry_run: | |
| post_interp = shebang_match.group(1) or '' | |
| shebang = f"#!python{post_interp}\n" | |
| self._validate_shebang(shebang, f.encoding) | |
| with open(outfile, "w", encoding=f.encoding) as outf: | |
| outf.write(shebang) | |
| outf.writelines(f.readlines()) |
Expected behavior
The shebangs are not modified
How to Reproduce
pip install rosinstall_generator
rosinstall_generator --rosdistro noetic --deps --tar \
rosmaster > rosmaster.rosinstall && \
mkdir -p src && \
vcs import src < rosmaster.rosinstall
ROS_VERSION=1 ./src/catkin/bin/catkin_make_isolated --install \
-DCMAKE_BUILD_TYPE=Release \
-DPYTHON_EXECUTABLE=/usr/bin/python3Output
$ cat install_isolated/bin/rosmaster
#!python
[...]Reactions are currently unavailable