setuptools version
84.0.0
Python version
Python 3.12, 3.14
OS
RHEL8, Ubuntu 24.04
Additional environment information
No response
Description
Since setuptools 84.0.0, executable permission bits (e.g. +x on scripts included via package_data ) are silently dropped from wheels. setuptools 83.0.0 preserves them correctly.
Expected behavior
Mode bits should not be changed from 83.0.0 to 84.0.0
How to Reproduce
mkdir pkg
cat << EOF > pkg/pyproject.toml
[build-system]
requires = ["setuptools"]
build-backend = "setuptools.build_meta"
[project]
name = "mypkg"
version = "0.0.1"
[tool.setuptools.package-data]
mypkg = ["scripts/*"]
EOF
mkdir -p pkg/mypkg/scripts
printf '#!/usr/bin/env python\nprint("hi")\n' > pkg/mypkg/scripts/some_script.py
chmod 755 pkg/mypkg/scripts/some_script.py
touch pkg/mypkg/__init__.py
python -m venv venv83 && venv83/bin/pip install setuptools==83.0.0 build
python -m venv venv84 && venv84/bin/pip install setuptools==84.0.0 build
cd pkg
../venv83/bin/python -m build --wheel --no-isolation -o ../dist83 .
../venv84/bin/python -m build --wheel --no-isolation -o ../dist84 .
cd ..
unzip -Z -l dist83/*.whl | grep some_script
unzip -Z -l dist84/*.whl | grep some_script
Output
$ unzip -Z -l dist83/*.whl | grep some_script
-rwxr-xr-x 2.0 unx 34 b- 36 defN 26-Aug-10 07:28 mypkg/scripts/some_script.py
$ unzip -Z -l dist84/*.whl | grep some_script
-rw-rw-r-- 2.0 unx 34 b- 36 defN 26-Aug-10 07:28 mypkg/scripts/some_script.py
setuptools version
84.0.0
Python version
Python 3.12, 3.14
OS
RHEL8, Ubuntu 24.04
Additional environment information
No response
Description
Since setuptools 84.0.0, executable permission bits (e.g. +x on scripts included via package_data ) are silently dropped from wheels. setuptools 83.0.0 preserves them correctly.
Expected behavior
Mode bits should not be changed from 83.0.0 to 84.0.0
How to Reproduce
Output